This week in open source

Mike Burns


This week our Heroku deployer, kumade, saw some refactoring and some features. Gabe Berke-Williams (gabebw) marked slow cucumber tests as @slow (40c6803), fixed the check for the Heroku Cedar stack (4b7358e, 3180ad2, and 61d3ee8), and cleaned up the README (c0d12cb). He removed the intrusive Thor from the app (dc25839, e419061, and 0c8414d). He ensured the the no-op packager is never installed (0e4cdc3) and added a COVERAGE environment flag to produce code coverage output (bda3067 and e260283).

Gabe and hoverlover (hoverlover) updated Kumade to restart the Heroku app after migrating (99a14b7, e9aa04a, and 781dd0d) and then Gabe released version 0.7.0 of kumade (60fb782 and f1ac4c3).


We have a gem that makes Rails apps, named suspenders. There’s even a nice mascot to go along with it. Anyway, this week Dan Croak (croaky) cleaned it up a bit: he upgraded clearance to 0.13.0 (6c2d39f), defaulted to ruby-debug for MRI 1.9.x (56fd39e), upgraded cucumber-rails to the controversial 1.1.0 (e2a8f47), added thin for Heroku (9be97e7 and 4c78926), removed RedCloth (91ec5a8), updated the README to explain the system dependencies (9900d15), and changed the template to output explanations with less emotion (4bab3f0). It’s in better shape now!


New features this week in our collection of RSpec matchers, shoulda-matchers! Vasiliy Ermolovich (nashby) brings us it { should ensure_exclusion_of(:age).in_range(30..60) } (d8308ec). He also brought in the :partial option for the render_template matcher (16eb4aa). Speaking of options, Markus Schwed (SweeD) sent a class_name option for the association matcher, like it { should have_many(:friends).class_name('Buddy') } (17ac7d5).

Dan Croak (croaky) removed the deprecated rake/gempackagetask in favor of rubygems/package_task (ead1e1d) and ironically removed the word “should” from the tests for the render_template matcher (030da4a).


Short week for bourbon, the collection of Sass mixins: Phil LaPier (plapier) added a border-image mixin and released version 1.1.0 of bourbon (80027f2).


Also a short, but important, week for the pacecar collection of named scopes, when Thomas Dippel (dipth) fixed the spelling of the word “maximum” in the README (91f56cb).


Lots of love to our paperclip file uploader. Alexander Presber (momolog) exposed the S3 permissions data (f409693), useful for testing and fixing a bug in them (3a6ca7d and 1571290). Joern Barthel (yawn) exposed the uploaded file as uploaded_file> (24b0c5a), and then Overbryd (Overbryd) decided to only write the uploaded file if the uploaded file is present (7cc0921). Ken Collins (metaskills) fixed the fog_public attribute reader to produce the false value as needed (de9a94a). ramn (ramn) made single-table inheritence, cached classes, and paperclip work together again (2c6b7cb).

In features, Tim Assmann (aka47) made it such that the S3 permissions could be a Proc object in addition to a normal hash, for run-time configurability (2191934). Kelley Reynolds delayed the S3 connection until the user directly accessed the S3 object or bucket (774cee1).

Prem Sichanugrist (sikachu) and Jon Yurek (jyurek) have been cleaning and fixing paperclip: Prem cleaned the whitespace (64549cb), copied the rake tasks into place on Rails 2.3 (948ddfa), and fixed the paperclip:clean rake task to run again without errors (cd856aa). Jon attempted to fix the URL autoescaping (131a8b1 and 4917ab2), fixed validates_attachment_presence (cd53485 and 61a0536), and added backward compatibility for Attachment#url (93faccf).

Then Jon released paperclip 2.4.5 (94d35f9 and 75ba69d).


Let’s start with the refactorings this week for our test fixture gem, factory_bot. Joshua Clayton (joshuaclayton) moved the proxy strategy checks to the proxy class itself (a09ec68). He removed some private methods by leaning on Hash#except from ActiveSupport (eb73dc1). He removed the parse_method abstract factory method, removing more lines than he added (50a66d0). In an effort to reduce conditionals he now always passes callbacks to proxies (8f4e052). Some method names were changed (369b4b9), a private Factory::Runner class was made to abstract out the actual factory creation (105d972), some whitespace was removed (65fc7d7), and ActiveSupport’s delegate method was used to remove some method definitions (9e88eb1).

Featurely, attribute lists are now named, which lead to them checking for infinite loops (e3bf491). Registries of factories, traits, and sequences are now named, too, leading to better error messages (7fdf1a8). The spec for a proxy definition was cleaned up with a MockFactory class and some exposed matchers; you may find these useful if you are building a gem atop FactoryBot (6e9baa7 and 180eb8b).

Outside of Josh’s commits, Gabe Berke-Williams (gabebw) got rcov working (895bc08) and Paco Guzman (pacoguzman) totally called us out on using our Attribute::Dynamic class incorrectly (e1ece10).

And then Josh released FactoryBot 1.3.0 (1267f5a and bf6acea).


A whole boatload of commits to our sweet JavaScript test runner named capybara-webkit. On the refactoring front, Gabe Berke-Williams (gabebw) removed unused global variables from the self-signed cert spec (b4faa3a). OK, check.

In terms of fixing bugs, Matthew Mongeau (halogenandtoast) set the viewport size so overflow: hidden registered visibility properly (8d2251d). He also made sure that only processes that started the webkit server could stop it (3eb366e). Andrew Wason (rectalogic) fixed the C++/Qt to have the proper signature for connect (9cfc6b1). Niklas Baumstark (niklasb) noted that IO.popen takes a string in Ruby 1.8.7 (3b872c6).

Then onto features, Andrew set it up to ignore SSL errors, as desired (f57b3a3, 053010a, and a08e5e8). Niklas added a HTTP proxy option (229a20e, 6a4143c, e442150, 25281b7, d59e36b, a0d4a21, bb80506, and d348e20) and made cookeis easier to access (3bce3d7 and ce198ab).


Progressing forward on our ready-to-use config files: dotfiles. Mark Wolfe (wolfeidau) removed the need for bash (b89501e), which is awesome because I don’t like bash. Thanks, Mark!


Minor infrastuctural change to clearance: Dan Croak (croaky) used the Bundler rake tasks to make new releases (4b4c251). He did not yet make a new release in celebration.

Project name history can be found here.

  1. Looking for FactoryGirl? The library was renamed in 2017.