Short Ruby Newsletter

Share this post

๐Ÿ’ป Short Ruby News - The Code Edition #40

newsletter.shortruby.com

๐Ÿ’ป Short Ruby News - The Code Edition #40

Briefly about everything happening in Ruby world - week 17 of 2023

Lucian Ghinda
May 1, 2023
Share

You can jump directly to a section:

๐Ÿ‘ Our Community

๐Ÿ‘‰ย All about Code and Ruby

๐Ÿงฐย Gems, Libraries, and Updates

๐Ÿคย Related (but not Ruby-specific)


For just a small amount of $1.5 per week (only $6.5 a month), you can become a valued paid subscriber and actively support the thriving Ruby community we all love!

Support the newsletter for ~1.5$/week


๐Ÿ‘ Our Community

๐Ÿ‘ Friendly.Rb announced an update about the conference and proposed a new sponsorship package Read the full announcement

Source: @friendlyrb

๐Ÿ‘ Ruby Unconf announced their agenda visit 2023.rubyunconf.eu to find out:

Source: @RubyUnconfEU

๐Ÿ‘ Emmanuel Hayford shared a summary of Rails World conference:

Source: @siaw23

๐Ÿ‘ Naofumi Kagami shared that rubycentral.org launched membership:

Source: @naofumi
Source: Brandon Weaver, In Favor of Ruby Central Memberships

๐Ÿ‘ Brandon Weaver announced they would restart the SF Ruby meetups:

Source: @baweaver@ruby.social

๐Ÿ‘ Jason Swett announced they would start a couple of online presentations on ChatGPT-assisted-TDD. Register at codewithjason.com/meetup

Source: @JasonSwett

๐Ÿ‘ Koichi Ito announced that rubocop-rails now passed over 100M downloads:

Source: @koic

๐Ÿ‘ DragonRuby community is organizing a Game Jam:

Source: https://itch.io/jam/kifass

๐Ÿ‘‰ All about Code and Ruby

๐Ÿ‘‰ Akshay Khot asked a quiz about what is wrong with the following Ruby code:

Source: Akshay Khot on Linkedin

If you are curious about the answer, Akshay explored this in his article Can you spot the error?

๐Ÿ‘‰ Akshay Khot shared a code sample showing various ways to use case statements in Ruby. He extended this into an article Ruby's Switch Statement is More Flexible Than You Thought

Source: https://www.akshaykhot.com/ruby-switch-statement/

๐Ÿ‘‰ /u/BringTacos asked about how to build a web app in Ruby without any framework:

Source: /u/BringTacos

Here are some of the answers:

  • Rack Applications

  • Rebuilding Rails book where you learn how to build Rails from scratch

  • A series of articles from Akshay: Build a Web Application in Ruby Without Rails, Rendering Views Dynamically using ERB, The Definitive Guide to Rack for Rails Developers, Middleware in Rails: What It Is, How It Works, and Examples

  • RailsConf 2014 - Web Applications with Ruby (not Rails) by David Padilla

  • BookStore API using Rack

  • Bookstore in pure ruby using DDD

And two comments showing in a few lines how to do this:

Source: /u/Soggy_Educator_7364
Source: /u/ryjocodes

๐Ÿ‘‰ u/RecycleAt10k asked a question about using the subject in RSpec:

Source: /u/RecycleAt10k

First, I invite you to read the entire post (here, I only screenshot a part). Here are some of the replies:

Source: /u/innou (and here is the link to 4 Phase Test Pattern)
Source: /u/riktigtmaxat

There is a good discussion, and people are adding very good arguments in both directions.

๐Ÿ‘‰ u/RailsPro asked about what a day looks like as a Rails developer:

Source: /u/RailsPro

There are a lot of replies from solo founders, work-from-home employers, and team leaders.

๐Ÿ‘‰Dave Copeland shared a comment about the first time running a new Rails app test with fixtures when using foreign key constraints:

Source: @davetron5000@

Brian Kephart replied with some possible solutions:

Source: @brian_kephart@ruby.social
Source: @brian_kephart@ruby.social

๐Ÿ‘‰Stephen shared a security risk of setting the domain for cookies to :all in Rails:

Source: @stevediaconou@ruby.social

Here is the paper Stephen linked in their post: Oversharing Is Not Caring: How CNAME Cloaking Can Expose Your Session Cookies he also wrote an article explaining in detail the security risk and various mitigation strategies for Rails: Rails session cookie domain: :all - beware of CNAMEs!

๐Ÿ‘‰Joel Drapper shared a new feature for green_dots test framework:

Source: @joeldrapper@ruby.social

Joel shared in the thread how he builds the code to achieve:

Source: @joeldrapper@ruby.social

๐Ÿ‘‰Greg Navis shared a thread about ActionDispatch::Executor

Source: @gregnavis

Greg is doing a great job of following what codes do and navigating the Rails code base.

๐Ÿ‘‰Joel Drapper shared a code sample showing how to define conditional classes in Phlex:

Source: @joeldrapper@ruby.social

๐Ÿ‘‰Mike Dalessio shared their decision process about upgrading Nokogiri:

Source: @flavorjones@ruby.social

๐Ÿ‘‰Xavier Noria shared a one-liner to run Rubocop only on the files created or modified:

Source: @fxn

๐Ÿ‘‰ Vladimir Dementyev shared a diagram for choosing between MRSK and alternatives generated based on the article MRSK: hot deployment tool to watchโ€”or a total game changer?

Source: @palkan_tula

๐Ÿ‘‰Alexandre Ruban shared a new thread about how to work with Markdown in Rails. You can follow their project on Github at alexandreruban/ruban-on-rails

Source: @alexandre_ruban

๐Ÿ‘‰ Greg Navis shared a thread about Rails 7 error handling infrastructure. There are a lot of examples about how it works. Here is one about how to report and error and continue with normal program execution:

Source: @gregnavis

๐Ÿ‘‰ Matt Swanson shared a code sample showing how to use ViewComponent with mailers:

Source: @_swanson

๐Ÿ‘‰Ruby Cademy shared a thread about scopes in Ruby:

Source: @RubyCademy

๐Ÿ‘‰Stan Lo shared a reminder about installing IRB as a gem

Source: @_st0012

๐Ÿ‘‰Amir Rajan announced that DragonRuby is free until 6th April 05:00 UTC. Get the toolkit at KIFASS Game Jam

Source: @amirrajan

๐Ÿคž I imagine that if you have read this so far, you find value in this newsletter.

Short Ruby Newsletter is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.


๐Ÿงฐ Gems, Libraries, and Updates

๐Ÿงฐ View Component announced the release of v.3.0.0 of view_component gem Read the changelog

Source: @ViewComponent

๐Ÿงฐ Obie Fernandez published a Rails 7 app magma-chat

Source: https://github.com/magma-labs/magma-chat

๐ŸงฐAndrew Kane announced a new gem Mapkick Static - Create beautiful static maps with one line of Ruby

Source: @andrewkane

๐Ÿงฐ Avo announced a new release v 2.31.0. Release notes

Source: https://avohq.io/releases/2.31.0

๐Ÿงฐ Okura Masafumi announced a new release of alba (JSON serializer) Release notes, and you can check out the changes

๐Ÿงฐ Ryan Bigg announced the release of v.1.13.0 of i18n gem Read the release notes

Source: https://github.com/ruby-i18n/i18n/releases/tag/v1.13.0

๐Ÿงฐ Mark Perkins announced that Lookbook v2 is now out of beta:

Source: @allmarkedup@ruby.social

๐Ÿงฐ Justin Searls announced the release of standard-rails:

Source: @searls@ruby.social

๐Ÿงฐ Nejdet Kadir announced their new gem sidekiq-aws-sqs: Sidekiq extension that provides an easy way to poll and process messages from AWS SQS (Simple Queue Service) queues within a Sidekiq worker

Source: https://github.com/nejdetkadir/sidekiq-aws-sqs

๐Ÿงฐ Dima Fatko announced a new gem fast_count: Quickly get a count estimation for large tables (>99% of accuracy for PostgreSQL)

Source: @fatkodima

๐Ÿงฐ Xavier Noria announced a new release of Zeitwerk version 2.6.8, read the changelog

Source: @fxn

๐Ÿงฐ Truffle Ruby announced a new release of truffleruby Read the changelog for 23.0.0-preview1

Source: https://github.com/oracle/truffleruby/releases/tag/vm-23.0.0-preview1

๐Ÿงฐ Obie Fernandez published a Rails app instant18n: Uses the power of OpenAI's GPT large language AI models to generate translations for your application


Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody:

Support the newsletter for ~1.5$/week

If you consider upgrading and want more information, please read Why to subscribe to paid


๐Ÿค Related (but not Ruby-specific)

๐Ÿค Donn Felker shared about the importance of writing good tests:

Source: @donnfelker

๐Ÿค Jason Swettย shared about how to use ChatGPT more effectively:

Source:ย @JasonSwett

You can read The Content Edition if you want to discover the content created in Ruby World in week 17 of 2023:

Read the content edition


Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody:

Support the newsletter for ~1.5$/week

If you consider upgrading and want more information, please read Why to subscribe to paid

Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

ยฉ 2023 Lucian Ghinda
Privacy โˆ™ Terms โˆ™ Collection notice
Start WritingGet the app
Substackย is the home for great writing