This week in open source


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]( “CommandLine#runorerror now returns the result of running the command.

This fixes the broken check for the Cedar stack.”), 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]( “Use Thin in all environments.

We”)), 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]( “Update rake task to fix issue with rake paperclip:clean

Closes #602”)). 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_girl. 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]( “Extract complicated runner code into private class

Factory#run was getting confusing - it added callbacks to the proxy, iterated over all attributes and operated on the proxy depending on if there were overridtes, mutated the overrides hash, and then operated on the mutated hash afterwards. This logic has been extracted into a private Factory::Runner class. The goal is to make it easier to understand everything that”)), 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]( “Attribute lists can be named

This allows us to move self-referencing logic into AttributeList and just delegate to defineattribute from Factory. This means that once defineattribute is private, Factory will only need to remove the delegation.”)). Registries of factories, traits, and sequences are now named, too, leading to better error messages ([7fdf1a8]( “Registries are named

This allows for easier debugging when code attempts to access traits, sequences, or factories and doesn”)). 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 FactoryGirl (6e9baa7 and [180eb8b]( “Refactor definitionproxy_spec

This introduces a couple of things: firstly, there”)).

Outside of Josh’s commits, Gabe Berke-Williams (gabebw) got rcov working ([895bc08]( “Working rcov Rake task.

Closes #218”)) and Paco Guzman (pacoguzman) totally called us out on using our Attribute::Dynamic class incorrectly ([e1ece10]( “Use correct parameters in specs for FactoryGirl::Attribute::Dynamic class

Closes #217”)).

And then Josh released FactoryGirl 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]( “Make ignoring SSL errors an option.

webkit_server takes an –ignore-ssl-errors argument.”), 053010a, and a08e5e8). Niklas added a HTTP proxy option (229a20e, 6a4143c, e442150, 25281b7, [d59e36b]( “remove call to Socket#shutdown

refs #176”), [a0d4a21]( “fixes wrongly used call to Socket#shutdown

refs #176”), 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.

author image
Mike Burns