This week in open source


The Heroku deployment gem, kumade, saw more love from Marcos Tapajós (tapajos): fixes to make tests pass (fcb02cc and 53c238c) along with a version bump (c5681e4). A new version is not yet released, though.


Our collection of matchers for shoulda, appropriately named shoulda-matchers, saw one commit from Mike Burns (mike-burns) (that’s me!), in an attempt to get the tests passing by explictly depending on Aruba (5190a39). However, here’s my plea: I can’t get these tests to pass locally, so I can’t take any pull requests. If you see what’s causing my build to fail please let me know.


An ActiveRecord extension that generates scopes, named pacecar, saw a documentation update from Matt Jankowski (mjankowski) where he mentions that PostgreSQL is in fact a supported database (1737a7c).


The file uploading gem paperclip saw a whole slew of commits. The documentation saw a typo fix (f71ebb4) from Gabe Berke-Williams (gabebw), Chief Typo Fixer. Mike Mondragon (monde) documented custom processors, the MD5 checksum and fingerprint, and dynamic configuration (81562b0, f815b8b, and 237597e). Prem Sichanugrist (sikachu) fixed the README’s build failure image to only show master’s CI status instead of the failure status for every branch (cbfaca4).

Less documentationally, Prem also removed MongoDB support from this gem, suggesting instead that it should be handled in a separate plugin (7e1a923). Mike Burns (mike-burns) (that’s me again!) fixed some code formatting to strip extra whitespace and add parens around method definitions (d00c04e and d591a64). Jon Yurek (jyurek), paperclip’s maintainer, fixed an issue in master to make tests contintue to pass despite relative/absolute directory name differences between Ruby versions (d336c4a), fixed an infinite loop in the Fog pathway (6c912c4), removed Gemfile.lock from the repo (3f56e70), and abstracted out the logger so plugins and clients can change it from the Rails default (6b6ce9e).

Speaking of abstractions, the aforementioned Mike Burns (that’s me, one more time!) went through various third-party paperclip plugins to look for patterns and generally make life easier. While many ideas and refactorings are still under development (wait’ll you see how easy image processors will be!), he did manage to decouple the Interpolations class from the Attachment class, which may help with the paperclip-extended plugin (7478455) and abstract out the geometry string parser from the Thumbnail class, which may be helpful to the papermill plugin (eebc7d9 and 3f7aee3). Bert Goethals (Bertg) submitted a tiny but important patch to allow plugins to override whether to perform post-processing callbacks, useful for the delayed_paperclip plugin (e645aaf).

To round it off, H. Wade Minter (minter) was able to split Fog credentials out into a YAML for easy viewing and storage (77ce88a and 5ec9a73), and Mario Peixoto (mariopeixoto) handled the case where the model to which the attachment belongs is unsuccessfully deleted (472a625).


Our Rails (and general Ruby) fixture replacement factory_girl saw a feature from Jim Kingdon (jkingdon) making :method => :build make sense for associations (79a1d5e and twalpole) fixed a bug where attributes did not work as expected in child factory definitions (a50c703 and 854204d). Petteri Räty (betelgeuse) fixed a typo in the docs (25affc7) while Josh Clayton (joshuaclayton) fixed some doc formatting (4960cb3) and test strings (744177c).

Josh continued on with bug fixes, refacotorings, and features. An incomplete cucumber test was fixed (4d9eb20); strings are stripped from the cucumber step definitions, improving the ability to use cucumber transforms (05ddd3d); overridden attributes are set only once (0ddc78b); and attributes are sorted in priority only once (4d4c01d, 2b4a6c7). The .bundle directory was removed (9f325aa); adding an attribute or callback returns the attribute (58ec702); the tests were cleaned up with a DefineConstantMacros module (0b2c4da); and the attribute and core specs were reformatted and refactored for cleanliness (7c9254a and d296a22). He then added transient attributes—arbitrary properties on the factories themselves which are not part of the underlying ActiveModel object (c87429b)—and released version 2.0.5 of factory_girl (d22e0d8).


This week saw some resolution to issues with capybara-webkit from last week, improving the headless JavaScript test suite. Hongli Lai (Phusion) (FooBarWidget) sided with Trevor Smith (trevorsmith) in using IO.popen for spawning the webkit server (3b025e7 and fe13b0b). Shogo Ohta (os0x) gave us the ability to capture the status code (5ce6058, 457957b, 4827174, 9c195af, c28e9a1, 41c842e, and 88b70e3). Josh Clayton (joshuaclayton) fixed a bug in the handling of maxlength attributes for input fields (9c02a20) before releasing version 0.6.1 of capybara-webkit (64357e7).


Our collection of user configuration files, dotfiles, saw a collection of tmux configurations (acbf0b3) from Dan Croak (croaky).


Two changes to the bourbon Sass mixins this week: Chad Mazzola (ubuwaits) spruced up the shiny button style and switched to RGB from HSL (d10e01a) while Phil LaPier (plapier) fixed the $ease-in-quart timing function’s value (f17b303).


Mike Burns (mike-burns) (me) wrote this-week-in-open-source, a very, very, quick hack to output these blog posts. It started in Haskell, moved on to shell, and ended up in Ruby. Now you can play along at home!

Mike Burns

Hound automatically reviews Ruby, JavaScript, and CoffeeScript code in your GitHub pull requests and comments on style violations. It is free for open source repos and $12/month per private repo.