#535 — January 14, 2021

Read on the Web

Ruby Weekly

Buttons above are from React Social Login Buttons by Michal Szorád

OmniAuth 2.0 Released — OmniAuth is an extremely popular Rack-based authentication system that hasn’t seen a major update in years but continues to be used in thousands of Ruby and Rails apps. No huge new features, but sensible tweaks and security improvements abound. Here’s a guide to upgrading to 2.0 as it does have a few breaking changes.

OmniAuth Community

Google Cloud Functions Adds Ruby SupportCloud Functions is Google’s function as a service (FaaS) platform and they’ve now added first class support for Ruby which provides a new alternative to using AWS Lambda, say. The free limits are quite generous too.

Daniel Azuma (Google Cloud)

Quickly Troubleshoot Your Ruby Application with Datadog APM — Datadog’s Continuous Profiler allows you to find the most resource-consuming parts in your production code all the time, at any scale, with minimal overhead. Improve MTTR, enhance user experience and reduce cloud provider costs with Datadog APM.

Datadog sponsor

Ruby 3 Pattern Matching Applied to Basic Games — If you’ve been waiting for a tutorial that clearly shows a solid pattern matching use case, you can put all of your chips here. There’s also a Tic-Tac-Toe follow-up if you’re keen to cross that game off your list.

Brandon Weaver

Migrating a Ruby Library from TravisCI to CircleCI — We’ve seen people moving away from TravisCI in recent years and if you’re in the process of doing so or considering it, Richard’s story may resonate. He also goes into the practicalities of actually making the move too, of course :-)

Richard Schneeman

How Well Rails Developers Actually Test Their Apps — The results of a State of Testing in Rails survey done by Arkency, a Rails consultancy. Only 142 respondents, but the results feel reasonable and there are some interesting charts on this Twitter thread.

Tomasz Wróbel

📘 Articles & Tutorials

Testing Child Processes in Ruby — Testing cross-process can leave you saying “What the fork?” Luckily, Ruby has core classes and methods to deal with this and it only adds a forkful of complexity.

Andy Stabler

How to Upgrade Rails Without a Test Suite — If all of your Rails apps have full test suites, well done, but sadly there are many that don’t. Upgrading Rails is still important, though, so here’s some thoughts on retrofitting some smoke tests.

Ernesto Tagwerker

Heroku Slowdowns? Try Autoscaling

Rails Autoscale sponsor

How to Install Ruby 3.0 on macOS: A Complete Guide — Daniel uses the flexible asdf version manager, walking through all the steps needed to install prerequisites, etc. and finishing with deployment and troubleshooting tips.

Daniel Kehoe

Building, Testing and Deploying AWS Lambda Functions in Ruby — While Ruby was relatively late to the serverless party, AWS Lambda does, at least, have first class support for it now. This is a beginner level introductory piece on the main concepts to consider.

Milap Neupane

Magic Responsive Tables with Stimulus and IntersectionObserver — Creating responsive HTML data tables can be tricky and result in a poor experience, particularly on smaller screens. Stimulus and the IntersectionObserver API can make the user experience more pleasing.

Matt Swanson

How to Set up Rails 6 and Postgres on Windows using WSL — Not everyone is or wants to be on team MacBook, nor run Linux on the desktop, and while Windows has been the poor relation when it comes to working with Ruby, there are now ways to make it work pretty well.

Alex Morton

The Most Common Types of Technical Debt in Rails — I kinda like the term ‘rehabilitating’ when it comes to taking over older Rails projects and bringing them up to speed.

Colin Soleim

▶  Discussing Hanami 2.0 with Tim Riley — Tim Riley is a long-time Rubyist and is a core team member of the Hanami, dry-rb, and rom-rb open source projects. Hanami is an opinionated, MVC-leaning webapp framework – think a lighter weight, more modular alternative to Rails.

Ruby on Rails Podcast podcast

Nested Factories in Factory Bot: What They Are and How to Use Them

Jason Swett

🛠 Code and Tools

Ruby on Jets 3.0: A Ruby Serverless Framework — We’ve linked to the Jets framework before, but now they have a fancy new version and website with docs and other learning resources. GitHub repo.

Tung Nguyen

ActiveRecord Analyze: Add EXPLAIN ANALYZE to Active Record Query Objects — Why? To help you track down and fix slow SQL queries.

Paweł Urbanek

Spend Less Time Debugging and More Time Building — Scout uses tracing logic that ties bottlenecks to source code to give you performance insights in less than 4 minutes.

Scout APM sponsor

Rouge: A Pure-Ruby, Pygments-Compatible Code Highlighter — Supports over 100 different languages, including Ruby, naturally. It’s a mature project now, but continues to get updates (OCL and ReScript support has just been added). GitHub repo.

Jeanine Adkisson

Loaf: Manage and Display Breadcrumb Trails in Rails Apps

Piotr Murach

OmniAuth Rails CSRF Protection 1.0 — Provides CSRF protection on OmniAuth request endpoints on Rails apps. The just released v1.0 requires OmniAuth 2.0 and up (featured above).

Cookpad

💻 Jobs

Interested in Using Ruby/Rails in the Security Industry? — Red Canary is looking for Ruby/Rails engineers that are interested in making a difference by protecting the world from cyber attacks.

Red Canary

Lead Rails Developer (Remote) — A mission-driven nonprofit working to reimagine journalism seeks a full-time Rails and PostgresSQL developer to join our team.

Solutions Journalism Network

Find Your Next Job Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.

Hired

ℹ️ Interested in running a job listing in Ruby Weekly? There's more info here.