👋 Short Ruby News - Edition #26

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

Excited about the future

👉 I activated subscriptions for the newsletter. I want to keep the newsletter free for everybody; thus, I don’t have a unique offering for people who decide to pay a subscription.

Do you like this newsletter and can afford to become a paid subscriber for 5$/month?

  • In that case, you get nothing different except the pleasure of knowing that you’re supporting the Short Ruby News to keep publishing the free edition weekly and pay for some of the tools I use to create this newsletter. And, of course, my gratitude for your big gesture!

  • I can help you write an email for your manager/leader to expense your subscription from your learning budget, so please reach out to me at hello@shortruby.com

If you are already a free subscriber and want to update, you can click on Upgrade your subscription. If you are not a subscriber, you can subscribe as free or paid or just read the newsletter on the web.

You can jump directly to one of the following sections if you like:

👐 Our Community

👉 All about Code and Ruby

🧰 Gems, Libraries, and Updates

🤝 Related (but not Ruby-specific)

More content: 🎥 🎧 🗞 (articles, podcasts, videos, and newsletters)

👐 Our Community

👐 John Hawthorn announced the release of Rails 7.0.4.1, 6.1.7.1 and 6.0.6.1 to address security vulnerabilities:

👐 Zach Holman shared a slide from a pitch describing the value of Rails:

👐 Jeremy Smith announced he is organising a regional Ruby conference:

Visit blueridgeruby.com to find out more and if you have a proposal visit Call for Proposals. You can also follow @blueridgeruby@ruby.social to be up to date with the conference news.

👐 ConfFreaks released all the videos from RailsConf 2022 on their channel. Of course you could already watch them on Ruby Central channel: Rails Conf 2022

👐 Collin Donnell announced the first episode of a new Ruby podcast Rooftop Ruby

👐 Korny Sietsma asked where someone can refresh their Ruby on Rails skills in 2023:

Here are some suggested resources:

👐 Andrea Fomera shared that there are over 1500 people that signed up for Learn Hotwire by Building a Forum

👉 All about Code and Ruby

👉 Joel Drapper shared a thread about how phlex-rails is patching form_with to work with Phlex and there is also a nice discussion about how to output raw HTML:

👉 Marco Roth shared an update of phlexing.fun announcing a series of improvements:

The source code is available at: marcoroth/phlexing

👉 Brandon Weaver shared a proposal he wrote in 2021 about pattern matching in Ruby:

Read the document here.

👉 Olle shared the Ruby Google Summer of Code Ideas List for projects in 2023:

👉 Brooke Kuhlmann shared an update for their Hanami demo application:

👉 Joel Drapper shared a thread about how to work with Basic Object in Ruby:

You should read the entire thread. I just want to underline the announcement Joel made in that thread:

👉 Nate Berkopec shared how they speed up Rails system tests at GustoHQ:

He describes the problem:

And then the solution:

👉 Joel Drapper shared a technique to configure something on the current class and its children:

🤝 Jamie McCarthy replied with a possible alternative:

👉Moses Gathuku shared a code sample showing how to set default value for attributes in Rails >= 6.1

👉 Steve Polito shared a code sample about the anything keyword in RSpec:

👉 Steve Polito shared a code sample showing how to use signed_id to confirm user emails in Rails:

You can explore the full example on this Github repository

👉 Greg Navis shared a thread with code samples showing transform_keys and transform_values in Ruby:

👉 Kevin Newton shared a code sample about how Ruby parsed identifiers:

👉 Greg Navis shared a code sample showing how compare_by_identity works for hashes in Ruby:

Read the thread as it has a lot of code samples showing why this happens and how it works.

You should also read this code sample from Josh Cheek reply along with the link to the Ruby docs:

👉Benjamín Silva H. shared a code sample showing a trick in Rails to initialize a new record:

If you have read so far and you like the content, maybe you take into consideration sharing this and subscribing:

🧰 Gems, Libraries, and Updates

🧰 Avo published a new update for their content management system and admin for Rails: Read the changelog for v.2.24.0 

🧰 Andrew Kane shared a code sample from their gem polars-ruby

🧰 Sam Ruby published a new gem called dockerfile-rails with the purpose to:

Provides Rails generators to produce Dockerfiles and related files. This is being proposed as the generator to be included in Rails 7.1, and a substantial number of pull requests along those lines have already been merged. This repository contains fixes and features beyond those pull requests.

🧰 Joel Drapper shared a PR for Phlex - Don't capture blocks when yielding showing a 4% performance improvement by not capturing the yiel block.

🧰 John Hawthorn shared a PR he submitted to Rack making it use Ruby 3.2 caching Regexp: Make RFC2183 work with Ruby 3.2's caching Regexp

🧰 Jim Gay published a new gem called polyfill-data that brings the new Ruby 3.2 Data class to earlier Rubies.

🧰 Andi published a new gem called file_exists that brings back the File.exists? and Dir.exists? that were removed in Ruby 3.2

🧰 Stanisław Pitucha published a new project that helps with finding the source of Ruby memory leaks: HeapLeak

🧰 Stanislav Katkov shared an update for pbbuilder gem where he added fragment caching.

🧰 Jean Boussier published gvltools 0.1.0 a set of GVL instrumentation tools

🧰 Mike Perham announced the release of Sidekiq Pro 7.0.6. Read the changelog

🧰 Julian Rubisch published a new gem julianrubisch/solder: Simplistic UI State Management for Rails Apps using Hotwire and Caching

Persist and restore ephemeral attributes of HTML elements using the Rails cache store and StimulusJS. In short, this plugin will persist UI state changes a user makes on a per-element basis.

🧰 Andrew Kane published a new gem Mapkick - Create beautiful JavaScript maps with one line of Ruby

🧰 Simon Chiu announced they updated their Rails template Code-With-Rails/rails-template, a Rails application template to set up Rails apps with Docker already set up.

🧰 Greg Navis published a new gem called transient_record:

transient-record is a gem to define temporary tables and Active Record models for testing purposes. It's a great tool for testing generic Active Record code and libraries.

🧰 Nate Hopkins shared a gem that helps identify a model by an URI: rails/globalid

🧰 Lázaro Nixon shared a PR for Active Record that will help with generating tokens: Add `ActiveRecord::Base::generates_token_for` by jonathanhefner

🧰 Andrew Kane announced the release of Chartkick 5: Create beautiful JavaScript charts with one line of Ruby with support for Chart.js 4 

🧰 Dhairya Gabhawala shared a gist showing how to extend Trix editor functionality: Rails & Trix: Add Underline, Superscript, and Subscript

🤝 Related (but not Ruby-specific)

🤝 Brandon Weaver asked about how to test E2E React flows:

Here are some replies:

🤝 Postmodern asked about donation tiers for Open Source projects:

Here are some replies worth reading:

There were also two resources shared:

🤝 Noel Rappin shared an update about Programming Ruby 3.2 book:

🤝 Tobias Petry shared a code sample showing how to use the new feature from PostgreSQL to create custom column types:

🤝Piotr Kafel shared about the number of tests at Shopify:

🤝 Lewis Youl shared a code sample showing how outlets API works in Stimulus JS:

🤝 Rob Zolkos shared that it is an easy win to build teams concept from the beginning:

More content: 🎥 🎧 🗞

Newsletters

🗞 Greg Molnar published a new edition of This Week in Rails: Active Record regroup, CurrentAttributes name restrictions and more!

🗞David shared a new edition of their newsletter Weekly bookmarks - Issue #34

🗞️ Ruby Weekly published a new edition: Ruby for game development is not joke

🗞️ Ruby LibHunt published a new edition of the Awesome Ruby Newsletter

🗞 Ruby Radar published a new edition Ruby Radar #86 - All Bangers

Podcasts

🎧 Jason Swett published a new episode 171 - Smart Testing Practices with Rich Steinmetz - The Code with Jason Podcast

🎧 Content For :Devs published a new episode #003 - Screencasting tips! - content_for :devs

🎧 Ruby For All published a new episode about The Database Wizard with Andrew Atkinson | Ruby for All | Episode 26

🎧 Ruby Rogues published a new episode with Gavin Morrice about Boosting Your App's Performance

🎧 Remote Ruby published a new episode about Finding Ruby, Scaling a Business on Rails, and Public Speaking with Nadia Odunayo

Videos

Talks

📽️ The Rubber Duck Dev Show published a new episode Teaching Young Developers, with Melissa Amaya

📽️ Ruby Weekly shared a video from Brett Chalupa showing resources to use for Game development in Ruby: Ruby for game development? Is this a joke? 

📽️ Andrew Culver shared the video of Joe Masilotti's talk about Why Are We Afraid to Hire Junior Rails Developers?

Screencasts

🎥 Yaroslav Shmarov published a new video about Ruby on Rails #103 Simple Omniauth without Devise

🎥 Dave Kimura published a new video about Rails Docked

🎥 Brandon Weaver published two new class sessions from the Ruby Learning Center:

🎥 Deanin published a new video about Wiki On Rails | Ruby On Rails 7.1 Tutorial

Articles

What’s new

How-Tos

Deep Dives

More general

All issues