---
title: "tenderlove's pure Ruby x86 assembler"
publication: "Ruby Weekly"
issue: 560
published_at: "2021-07-08"
canonical_url: "https://rubyweekly.com/issues/560"
---

Plus a new Faraday release, new Ruby security releases, and it's time to get your RubyConf 2021 talks submitted. |        

#​560 — July 8, 2021 

[Read on the Web](https://rubyweekly.com/issues/560)    

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/y4y4jwwctuwm3vuob07q.jpg)](https://www.ruby-lang.org/en/news/2021/07/07/ruby-3-0-2-released/)  

[Ruby 3.0.2 Released (plus 2.7.4 and 2.6.8)](https://www.ruby-lang.org/en/news/2021/07/07/ruby-3-0-2-released/) — It’s security release time. `Net::FTP` and `Net::IMAP` have some vulnerabilities that have been fixed. The [2.6.8 release](https://www.ruby-lang.org/en/news/2021/07/07/ruby-2-6-8-released/) also includes some other bug fixes and [2.7.4 is here](https://www.ruby-lang.org/en/news/2021/07/07/ruby-2-7-4-released/). 

Ruby Core Team   

[Introducing MemoWise, A New Way to Memoize Methods](https://medium.com/building-panorama-education/introducing-memowise-51a5f0523489) — MemoWise is “the best way to memoize methods” as it takes care of nil and false values, methods with arguments, and instance variable/method confusion, applying the wisdom of the memoization ages. 

Jemma Issroff and Jacob Evelyn   [![\](https://copm.s3.amazonaws.com/3cc8b0bd.png)](https://www.datadoghq.com/dg/apm/benefits-os/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-RubyWeeklyAppAnalyticsP) 

[Analyze Your Ruby Apps’ Performance in Real Time with Datadog APM](https://www.datadoghq.com/dg/apm/benefits-os/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-RubyWeeklyAppAnalyticsP) — Drill into error traces with Datadog’s App Analytics to debug and optimize Ruby code by tracing requests across web servers, databases, and services in your environment. Track your apps’ performance with Datadog APM free. 

Datadog sponsor   

[Understanding Factory Bot Syntax by Coding Your Own Factory Bot](https://www.codewithjason.com/understanding-factory-bot-syntax-coding-factory-bot/) — Recreating something is always a great way to learn (in programming, at least!) and Jason goes through the whole thing here using the delightful idea of ‘error driven development’ - ha! 

Jason Swett   

📅 [Submit a Talk to the RubyConf 2021 CFP](https://cfp.rubycentral.org/events/rubyconf2021) — Taking place in a hybrid online/offline form over November 8-10, RubyConf is keen to receive your talk proposals and they’ve provided quite a lot of detail here. The CFP closes on July 16 (so you’ve got just over a week). 

RubyConf   

**IN BRIEF:** 

- Did you know Ruby Together supports the Ruby API ([rubyapi.org](https://rubyapi.org/)) project? [Here's an update](https://rubytogether.org/news/2021/7/a-new-approach-to-documentation-ruby-api) on how it's going and how it's been integrating Ruby 3 type signatures into the docs.    

Jobs  

[Senior Backend Engineer (Remote)](https://jobs.lever.co/elevatelabs/05055127-a7e3-4468-8417-0bea94c63f29?lever-origin=applied&lever-source%5B%5D=CooperPress) — Hiring for backend engineers to build the service infrastructure for our meditation app, Balance, and brain train app, Elevate. 
Elevate Labs   

[Hint is Hiring](https://hint.io/careers) — We are on a mission to help all software teams reach their full potential. You can help. 
Hint   

[Find a Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired    

📕 Articles & Tutorials  

[The Shortest Path to Get Set Up with Automated Accessibility Testing in Rails](https://github.com/KevinBongart/automated_accessibility_testing_with_ruby_on_rails#readme) — If you’ve ever tried to automate accessibility testing, you know how clumsy it can be. This code repo/tutorial shows how easy it can be to get the basics automated quickly. 

Kevin Bongart   

[Understanding How rbenv, RubyGems, and Bundler Work Together](https://www.honeybadger.io/blog/rbenv-rubygems-bundler-path/) — The chain of tools we use every day to do our job mostly “just works”, but how? Subomi dives into each layer, from version manager to bundler, and explains the chain. 

Subomi Oluwalana   

▶[Tracking Events with Ahoy](https://www.driftingruby.com/episodes/tracking-events-with-ahoy) — The [Ahoy gem](https://github.com/ankane/ahoy) provides the capability to capture analytics, such as page visits, without sharing the data with any third parties. 

Drifting Ruby   

[Crunchy Bridge: Fully Managed Cloud Postgres](https://www.crunchydata.com/case-study/rival-iq/?utm_source=RubyWeekly&utm_medium=newsletter&utm_campaign=RivalIQ&utm_content=7-8-21) — Crunchy Bridge users experience performance improvements, better developer workflow and seamless migration. 

Crunchy Bridge sponsor   

[Asynchronous Background Processing using AWS Lambda Extensions](https://dev.to/aws-heroes/asynchronous-background-processing-for-ruby-or-rails-using-aws-lambda-extensions-59bh) — AWS Lambda Extensions were created so Lambda authors could integrate with various monitoring tools, but [LambdaPunch](https://github.com/customink/lambda_punch) lets you use it in a more general way. 

Ken Collins   

[The Hanami Architecture Explained](https://hanamimastery.com/articles/hanami-architecture-explained) — Hanami uses concepts like slices and Separation of Concerns to create a flexible application framework that extends beyond web apps. 

Sebastian Wilgosz   

[Under The Hood of the `includes` Method in Rails](https://longliveruby.com/articles/includes-method-in-rails) 

Paweł Dąbrowski   

[Neovim's Built-in LSP with Ruby and Rails](https://blog.backtick.consulting/neovims-built-in-lsp-with-ruby-and-rails/) — It’s not quite VSCode, but if you want to use LSP functionality in neovim, here you (mostly) go. 

Sheldon Johnson   

▶[Spearheading Static Site Generators with Ruby and Bridgetown](https://www.therubyonrailspodcast.com/374) — Jared White, the creator of the [Bridgetown](https://www.bridgetownrb.com/) static site generator, discusses the origins and goals of the project. 

The Ruby on Rails Podcast podcast  

🛠 Code & Tools  

[Faraday 1.5: A Flexible HTTP Client Library](https://github.com/lostisland/faraday) — Where Faraday differs from many other HTTP client options is how it supports multiple backends and has a middleware concept for processing the request/response cycle. [Basic usage](https://lostisland.github.io/faraday/usage/) in case you’ve not tried it before. 

Olson, Hobson, et al.   

[Fisk: A Pure Ruby x86-64 Assembler](https://github.com/tenderlove/fisk) — An interesting project from tenderlove and a clever bit of work representing x86 assembly language via a mostly implicit Ruby DSL. 

Aaron 'tenderlove' Patterson   

[Everything a Dev Needs to Build Video for Ruby: Powerful API and Analytics](https://get.mux.com/3dGqXFA) 

Mux sponsor   

[Heroku Database Connection Calculator](https://railsautoscale.com/heroku-postgresql-connection-calculator/) — Optimizing your database pool configuration relies on quite a few variables (number of dynos, workers, processes, threads) so this guide does the math for you while also explaining each calculation. 

Rails Autoscale   

[The Git Gem 1.9.0: A `git` Wrapper for Use from Ruby](https://github.com/ruby-git/ruby-git) — Takes the simple approach for wrapping calls to the usual `git` binary. 

Scott Chacon   

[WorkingHours 1.4: A Gem to Do Time Calculations with Working Hours](https://github.com/Intrepidd/working_hours) — For example, `1.working.day.from_now` or `Date.new(2014, 12, 28).working_day?` 

Adrien S   

[A Minimal Forward Proxy in 150 Lines of Code using Standard Libraries Only](https://github.com/jamesmoriarty/forward-proxy) 

James Moriarty      

💡**Tip of the Week** 

**Running specific specs with RSpec**   

Sometimes when writing Ruby tests with RSpec we want to run the whole test suite. Other times, we want to run only specific tests. Here are a few different ways to only run part of a test suite: 

### `--fail-fast` flag 

Running a spec file or full test suite with the `--fail-fast` flag will stop the tests at the first failure. For example: `rspec spec --fail-fast` will complete fully only if there are no failures in the suite. This can be helpful for large suites. 

### `--example` (`-e`) flag 

The `--example` (or `-e`) flag takes a string argument and runs only examples whose names include the argument. 

For example, if we had this spec file `spec/example_spec.rb`: 

```
RSpec.describe Example do
  it "runs this specific test" do
    ...
  end

  it "does not run this" do
    ...
  end
end
``` 

We can run `rspec spec/example_spec.rb -e "specific test"` and only the first test will run. This is an additional reason it can be helpful to have well described tests. 

### `:<line_number>` flag 

We can run an example on a specific line by including that line number right after the specific file when running the test. We can add line numbers to our previous example to clarify: 

```
1 RSpec.describe Example do
2   it "runs this specific test" do
3     ...
4   end
5 
6   it "does not run this" do
7     ...
8   end
9 end
``` 

We can run `rspec spec/example_spec.rb:2` to only run the first spec. 

### `:focus` 

If we only want to run a specific context or example, we can add the following to our `spec/spec_helper.rb` to configure the ability to focus on a specific set of tests: 

```
RSpec.configure do |config|
  config.filter_run focus: true
end
``` 

and then pass the symbol `:focus` as an optional argument to our example or group before running our tests: 

```
describe "only testing this", :focus do
  ...
end
``` 

Hopefully some of these methods of running specific tests are useful in avoiding running the full suite unnecessarily!    

This week’s tip was written by [Jemma Issroff](https://twitter.com/jemmaissroff).          

Curated by [Peter Cooper](https://twitter.com/peterc), [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
