#518 — September 10, 2020

Read on the Web

Ruby Weekly

Writing a Ractor-Based TCP ServerRactor is an actor-like mechanism for getting true parallel execution support in Ruby without any thread safety concerns. An initial implementation has been merged into the main Ruby branch and people are starting to play such as with this attempt at creating an HTTP server. Richard Schneeman’s Twitter thread about ractors is also interesting. The future is coming!

Kir Shatrov

Sinatra v2.1.0 Released — Believe it or not, it’s over three years since Sinatra 2.0 dropped, so a 2.1 is a big deal 😁 The popular web application DSL has dropped Ruby 2.2 support, and moved from Thin to Rainbows for the dev-side HTTP server environment, plus a variety of smaller things.

Sinatra

Redis 6.0 on RedisGreen — SSL encryption, key size tracking, memory mapping, online upgrades, and more.

RedisGreen sponsor

symbol-fstring: Access Symbols' Internal Strings Without Duplicating Them — In Ruby 3.0, Symbol#name will return the name of a symbol as an immutable string rather than how Symbol#to_s creates a new string every time it’s involved. This backports the same idea to Ruby 2.7.

Shopify

These Rails Apps Are Overpacking Their JavaScript Bundles — Several examples of well-known sites that split their JavaScript into packs, only to make things much worse for the browser and the user. The road to slow page load is paved with good intentions.

Ross Kaffenberger

Rails 5.2.4.4 and 6.0.3.3 Released — To patch a potential XSS vulnerability in Action View (when a default string is used for a missing translation key, the string can be incorrectly marked as HTML safe).

Official Rails Blog

💻 Jobs

Ruby on Rails Developer, Brazil (Portuguese Speaker) - Remote — With a focus on remote working, we’re seeking a Rails dev to join our recognised team. Microservices and DDD are a plus.

Impulso

Senior Software Engineer (SF/Remote) — Join our team, and help us make mortgage closings fast, secure, transparent, and error-free.

Snapdocs

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

Vettery

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

📘 Articles & Tutorials

The Difference Between let, let! and Instance Variables in RSpec — RSpec’s let helpers provide ways to define values you use within your tests, but you could also use instance variables, right? Jason reflects on the differences.

Jason Swett

▶  Using GitHub Actions with a Rails App — GitHub Actions provides a way to automate software workflows in the cloud and this 13-minute screencast covers the basics of setting it up with a Rails app for automated testing, code coverage checking, etc.

Drifting Ruby

Tips and Tricks to Protect Your Apps From Link-Based Vulnerabilities — Learn how reverse tabnabbing, broken-link hijacking, and open redirect exploits work so your app isn’t a target.

Honeybadger sponsor

A Q&A with Sandi Metz — We talk to the author of Practical Object-Oriented Design in Ruby and 99 Bottles of OOP. You may have seen this in issue 516.

Glenn Goodrich

Integrating Chargebee Subscriptions and Recurring Billing with a Rails App — Chargebee is a commercial service that helps with subscription management and recurring billing.

Vito Botta

Querying Paginated API Endpoints The Rails Way — We like our Enumerators lazy and memoized.

Jesal Gadhia

Behavior-Driven Test Data — Most of us truncate the database after a test, but what if we saved that data as input to subsequent tests? Turns out, that could be useful.

Tom Rothe

Best-Practices on How to Speed Up Your Postgres Queries. Free eBook

pganalyze sponsor

Elixir Is Not Ruby. Elixir Is ErlangElixir is an interesting language that looks somewhat like Ruby but built on top of the Erlang VM. It looks enough like Ruby that we’re often asked to include Elixir tutorials in this newsletter, but it’s a whole different beast 😁

Preslav Rachev

🛠 Code and Tools

n_plus_one_control: RSpec and Minitest Matchers to Prevent N+1 Query Problems

Vladimir Dementyev

Active Admin 2.8: An Administration Framework for Rails — A Rails plugin for generating admin interfaces. v2.8.0 just came out and drops Ruby 2.4 support. GitHub repo.

Greg Bell and VersaPay Corporation

DNS::Zonefile: A Library for Working with DNS Zonefiles — Works with the format as defined in RFC 1035 §5 and RFC 1034 §3.6.1.

Craig R Webster

Groupdate 5.2: A Simple Way to Group Temporal Data — For example, to group data by day, week, hour, etc.

Andrew Kane

ngrok for VSCode: Public URLs for Local Dev Serversngrok is a popular service and project for opening up a secure tunnel to local dev servers for testing, etc. This lets you control it from VS Code.

Phil Nash