#470 — October 3, 2019

Read on the Web

Ruby Weekly

What's New in IRB in Ruby 2.7? — IRB, the trusty Ruby REPL, isn’t something we often see getting updated with new Ruby releases, but Ruby 2.7 is introducing a few niceties like syntax highlighting. Pry may, however, remain the power user’s REPL of choice.

Prajakta Tambe

Ruby 2.6.5 Released (and 2.5.7, and 2.4.9) — Security update time. These fixed security issues are unlikely to affect many in a direct way but include a code injection vulnerability in Shell#[], two issues with WEBrick, and a NUL (ASCII 0) injection vulnerability in two File methods. Here’s 2.5.7 and 2.4.9 if you need them.

ruby-lang.org

The Ruby Security Handbook — Learn actionable best practices to help you protect your Ruby applications. Download the checklist for tips on monitoring, infrastructure, protection, and more.

Sqreen sponsor

Using Ruby for Primitive But Productive Automation — How to use Ruby to script a boring task. I love using Ruby for this sort of thing myself and it’s well worth learning how to do.

Keith R. Bennett

Sidekiq 6.0.1 Should Be '10-15% Faster'?Sidekiq 6.0 only came out a month ago, but there’s already been a big performance patch plus new dark mode support in the Web UI.

Mike Perham

💻 Jobs

Software Engineer, Contract Leading to Perm (Remote within UK) — Help build the future of venture capital through a Ruby-platform. Mostly remote team. Stack: Sinatra, Postgres, AWS, React.

Accelerated Digital Ventures

Scale the Runtime with Ruby Infrastructure at Scribd — Ruby serves billions of pages per year at Scribd. Optimize new versions of Ruby & Rails while contributing improvements upstream.

Scribd

Find A Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started.

Vettery

📘 Articles & Tutorials

Using Ruby 2.7 Experimental Features in Production: Pattern Matching and Numbered Block Args — New, edge versions of Ruby are certainly safer to use in production now than they used to be (anyone remember 1.9.0?) and while you should tread with caution, it opens up cool use cases like these.

Akshay Nathan

How I Wrote a Ruby Program to Manage EC2 Instances for Me — Yet more automation using Ruby :-) The end result is a tool (still in its embryonic stages) called Exosuit whose goal is to help provide a Heroku-esque deployment experience but on AWS.

Jason Swett

Explore the Code[ish] Podcast — A podcast from the team at Heroku, exploring code, technology, tools, tips, and the life of the developer.

Heroku sponsorpodcast

Sharing Query Logic Within ActiveRecord Models

Chris Toomey

Building a Rails CI Pipeline with GitHub ActionsActions is GitHub’s new automation platform that you run directly from inside a GitHub repository.

Matt Swanson

Mastering 'Packs' in Webpacker — Webpacker is Rails 6’s system for packaging JavaScript.

Prathamesh Sonpatki

Introducing RuboCop to Legacy Projects: Some TODOs and TODON’Ts

Scott Matthewman

Rails 6's Support for 'Actionable' Error Pages — Let’s say you have a pending migration, start up your app in development mode, and get an error page. In Rails 6, you can click a button to run those pending migrations!

Taha Husain

How to Use The Ruby Ternary Operator (?:) — If code like a ? x : y makes no sense to you, start here. It’s a handy piece of syntax.

Jesus Castello

▶  When You HTTParty, You Must Party Hard with John Nunemaker — If you’ve been in the Ruby world for some time, John Nunemaker’s name will be familiar to you, but even if not, you’ve probably used HTTParty (or his work on GitHub) somewhere down the line. In this 42 minute interview, he talks about why he loves Ruby and Rails and the story behind HTTParty’s (in)famous post-install hook.

Ruby on Rails Podcast podcast

▶  My Ruby Story: David A. Black — A 40 minute chat with David Black, a well known Rubyist and author of The Well-Grounded Rubyist.

My Ruby Story Podcast podcast

🛠 Code and Tools

Introducing dry-effects: The Newest dry-rb Library — The dry-rb family of libraries gets a new member: dry-effects, a way to easily use algebraic effects in your code.

Nikita Shilnikov

HexaPDF 0.10.0: PDF Generation and Manipulation in Ruby — If you not only want to generate PDFs but open them, modify them, extract content, merge them together, etc. then HexaPDF is for you. Note that HexaPDF is AGPL licensed with a commercial license option.

Thomas Leitner

Peek: Take a 'Peek' Into Your Rails Applications — A profiling tool originally built at GitHub for getting a quick look (by way of a information bar on the top of your app) into some metrics underlying a live Rails app.

GitHub

Automated Code Reviews for Ruby, Directly from Your Git Workflow

Codacy sponsor

TestRocker: The Simplest Inline Ruby Testing Library — First built for a contest 8 years ago, this library which leans upon a Ruby syntax quirk has just been updated to use Ruby 2.0’s refinements.

Peter Cooper

Wicked PDF: PDF Generation for Rails Apps — Uses wkhtmltopdf behind the scenes to serve a PDF version of a chosen HTML view.

Miles Z. Sterrett

InvoicePrinter 2.0: Generate PDF Invoices from Ruby — It is absolutely ‘PDF week’ here in Ruby Weekly! :-)

Josef Strzibny