GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS

Written by thoughtbot

This week in open source

A somewhat lighter week of pull requests. Perhaps we were super busy; I know we were obsessesed with refactoring.

kumade

Our Heroku deployer, kumade, is being used as a series of refactoring lessons toward cleaner code. Unobtrusive Ruby uses more classes, and they are doing that like whoa here. Gabe Berke-Williams (gabebw) is leading the charge, switching to Mocha and Bourne (57a4c7f and 530c137), making a Heroku class (82c75d2), and making a Configuration class for internal use (469761b and 681bc8f). The tests saw major improvements from this, with shared contexts and better stubbing (bd93c9d, 15a65df, ea5331d, 7c20edc, 40882df, 30e0b3e, 5b66e24, 7c147ae, be5de51, and ee40dbb). He updated the README to explain that Kumade is no longer a set of Rake tasks (abb3609) then removed the rookie mistake of using !! to turn a truthy value into a proper Boolean (4279a2f).

Ever committer Marcos Tapajos (tapajos) fixed the README to say staging instead of bamboo (ee04efc) and also removed references to running the tests (56fd720), added a -v verbose flag (16e8482 and 5a4af13), got in on the making-things-into-classes fun with a Packager class (56b11b3), and fixed an infinite recursion bug on Heroku Cedar (645014c). He also bumped the version; I don't know how Gabe feels about this (153316a).

Our Josh Clayton (joshuaclayton), who loves adding classes, cleaned up the Configuration class (fe4be8b) before adding a CLI class (2879fbc).

paul_revere

The one-off announcement system for Rails, paul_revere, saw README updates from Matt Jankowski (mjankowski) where he showed the pass/fail status in public (3881938) and a tiny formatting change (6b3d2cf).

shoulda-matchers

Our shoulda-matchers gem, which is a collection of RSpec and Test::Unit matchers/assertions, saw some continuous integration fixes and some test fixes to make it all work. Prem Sichanugrist (sikachu) stayed atop Travis CI, making it more resilient to edge cases (8007a1a, 45242cf, a1eb080, and 272699f). The tests themselves were made more resilient, fixing the dependencies (78b5e5f), only modifying the Gemfile as needed (94aacd8), and adding a missing table (3e6463b). Also, watch your whitespace (a6fa83e)!

copycopter_client

The client for our Copycopter product, copycopter_client, was updated for Rails 3.1. Joe Ferris (jferris) adding support for the DEBUG environment variable during the test run (556bb30), which I'm sure helped him track down the fact that it needs to send the application/json MIME type (eb8b45c), throw exceptions instead of raising them, and skip bundler for 3.1.0 (70fd5ca). He also handled more SSL errors (e72f2a6). This all ended with the release of version 1.1.1 of copycopter_client (d2b2f28 and b74ad61).

pacecar

Our automatic ARel methods, pacecar, was updated by Matt Jankowski (mjankowski) to run CI using 1.9.2 (b430f50).

flutie

Our base stylesheet gem, flutie, also saw improvements from Matt Jankowski (mjankowski). The README was updated to use a code block for the examples (cf35a18) and show Travis CI results (e99ab3d and 457a7aa). The specs were updated to use an in-memory database instead of writing to disc (356f05d). Then a bug was discovered: the Rake task was not copying files into your app properly. Fixed (bc70e1b) and released as 1.3.2 (4b37b89).

paperclip

Finally, a light week for paperclip, our Rails image uploader gem, and all to the README. goutham (gouthamvel) documented how to use Paperclip outside of Rails but with ActiveRecord (487ab74 and e4339af) while Gabe Berke-Williams (gabebw) fixed typos (f12e2e8).

factory_girl

Likewise, another light week for factory_girl, our test fixture gem. Gabe Berke-Williams (gabebw) fixed the formatting of the getting started document (67fc3bc). Omar Vargas (ovargas27) pointed out the cucumber env.rb file (c09ec8e, 6c30ae3, and 677341b). Joe Ferris (jferris) bucked the trend of modifying the getting started document to instead make Travis CI only build the master branch (861e70e).

capybara-webkit

Our headless JavaScript test driver, capybara-webkit, saw a bug fix from Matthew Mongeau (halogenandtoast) and Joe Ferris (jferris). They discovered that a HTTP POST that is then followed by a redirect re-sends the Content-Type header, leading to subtle bugs. This is now fixed (25fe9be). Joe also added more info on QT to the documentation wiki (c5e6396).