#​694 — March 14, 2024

Read on the Web

Together with  Scout APM

Ruby Weekly

37signals Open Sources Thruster — First seen in Campfire, Thruster is a minimal HTTP/2 proxy for production Rails deployments – it runs alongside Puma and offers HTTP/2, Caching, SSL via LetsEncrypt, and static file serving with compression, filling a similar role to Traefik or Caddy (like them, it’s written in Go).

37signals

IRB 1.12.0 Released — One advantage to various parts of Ruby being turned into separate gems is you can upgrade them without upgrading Ruby itself, and IRB is certainly worth upgrading frequently. v1.12 introduces enhancements to the help command and IRB can now load .irbrc from multiple locations, such as from ~/.irbrc as well as project specific .irbrcs.

Stan Lo

Self-Service APM When You Want It. Superior Support When You Need It — Avoid the runaround of large support teams and the hassle of talking to a sales rep - choose Scout APM and get the APM insights you need in less than 4 minutes.

Scout APM sponsor

Let's Build a Hanami AppHanami is a popular option among Ruby web frameworks lately, and it takes a very different approach, offering less convention and more modularity.

Aestimo Kirina (Honeybadger)

📕 Articles & Tutorials

What Does the Frozen String Literal Comment Do? — That is: # frozen_string_literal: true, as introduced in Ruby 2.3. Frozen strings not only prevent unintended modifications, but reduce garbage collection overhead by eliminating unnecessary memory allocations.

Akshay Khot

Weird Ruby: Double Aliased Enumerable Methods — Ruby is big on aliasing methods as a way to make code easier to read and Enumerable methods are commonly aliased. Can you think of the method that has three aliases?

Bozhidar Batsov

🌳 Need to Upgrade Ruby on a Tight Budget? Try Bonsai by FastRuby — Bonsai is the cost-effective way to gradually upgrade your Ruby 2.7 application and patch security holes 🚀

Maintenance by FastRuby.io sponsor

🤖 Notes from Migrating from Minitest to RSpec (with Help from GitHub Copilot) — AI tools like Copilot might not excel at brewing up an entire feature or app, but could they be useful for more boring, predictable tasks like converting from one testing framework to another?

Aaron Sumner

Using dry-validation with Grape — Grape is an API-only web framework for Ruby and validating incoming requests can turn your Grape into a nice, dry-validation vintage that goes well with just about everything.

Dmitry Gutov

How to Approach a Problem with reduce — Code written with reduce can seem intimidating. This two-step approach could help.

Joël Quenneville

Turbo Streaming Modals in Rails
Ayush Newatia

How HEAD Works in Git
Julia Evans

🛠 Code & Tools

Amazing Print 1.6: Pretty Print Your Ruby Objects with Style — A fork of AwesomePrint that continues to get updates. v1.6 introduces Ruby 3.3 support, has been confirmed to work with Rails 1.7, and offers hash key colorization and pager support when used in Pry.

AmazingPrint

Free Auth for 1 Million MAUs — WorkOS provides easy-to-use APIs for authentication, user identity, and complex enterprise features like SSO and SCIM.

WorkOS sponsor

AnnotateRb 4.6: Add Annotations to Your Rails Models and Route Files — A way to add helpful comments summarizing the model schema or routes in your ActiveRecord models, fixture files, test, specs, and other places.

Andrew W. Lee

rrule 0.6: iCalendar RRULE Expansion for Ruby — RRULE is a spec for date ‘recurrence rules’ defined as part of the iCalendar spec. For example, you can have FREQ=DAILY;COUNT=3 resolve to dates over the next three days.

Square

Rails Multisite 6.0: Multi Tenancy for Rails Apps — Want each (customer/user) hostname used with an app to have its own database? Extracted from Discourse.

Sam Saffron