giant robots smashing into other giant robots

Written by thoughtbot

adarshp

This Week in Open Source

trail-map

Lots of activity on trail-map this week. Thanks to Mike Munroe (mikepmunroe) for catching a broken link 1025a32. Adarsh Pandit (adarshpandit) added a Code Review trail e46792c and Gareth Rees (garethrees) added links for different style guides 4cf0643 47b6002. We had help from Dan Croak (croaky), who fixed some bad links d82a944 889aee8, a grammatical error 13e1335, copy-editing 6d2402c, and removed the .gitignore f2f147a.

shoulda-matchers

shoulda-matchers got some refactoring from Gabe Berke-Williams (gabebw) 7f208e7 and Jason Draper (drapergeek) tightened up ensure_inclusion_of for array matching dc5daca.

cocaine

cocaine got some help from Jon Yurek (jyurek) including removing official support for REE 6073cd0 and switching the order of pipe-reading and waiting 69d6b6c.

paperclip

In paperclip, Jon Yurek (jyurek) removed some ternary operators in favor of ifs 65f4941, and added a test to prevent regression of the E2BIG problem 69bcf6e.

factory_girl

Phil Cohen (phlipper) added MiniTest syntax methods to the GETTING_STARTED.md page for factory_girl in 06ff258.

neat

neat got some help from Reda Lemeden (kaishin) including a fix for breakpoint values in the README 120ce1b and support for using both min- and max- in breakpoint() 9292467.

dotfiles

Our dotfiles are now more tmux compatible thanks to Joshua Clayton (joshuaclayton) who added tab-completion to ack using the tags file d16a4fe and Dan Croak (croaky) who enabled better pbcopy/pbpaste and RubyMotion compatibility by using reattach-to-user-namespace in 3ef63fe.

suspenders

Dan Croak (croaky) tightened up our suspenders by replacing the style guide (most of the README file, really) with links to guides c912961, ignoring the .env file 58c22ff, and alphabetizing the .gitignore file 884eb08.

high_voltage

In high_voltage, Mike Burns (mike-burns) extracted an overridable PageFinder class 8494e51 and removed the ActionMailer usage 6eee9b0. Odin Dutton (twe4ked) and Mike Burns added a config option to disable default routes 7570889.

fake_braintree

fake_braintree was bumped to version 0.2.1 by Dan Croak (croaky) 44f62b7.

bourbon

In bourbon Mike Burns (mike-burns) added command parsing using Thor ac3b318.

laptop

Our laptop script got the same reattach-to-user-namespace help from Dan Croak (croaky) as he added to the dotfiles 50a1a1e.

lolconomy

This week in open source

bourbon

So this bourbon gem…people seem to like it: there was a RailsCast about it and the principle author (Phil LaPier) will be speaking at Frontend United about it.

This week people cleaned up the obsolete CSS attributes: Thibaut (Thibaut) removed -moz-inline-block (d73ea46), Chad Mazzola removed both -ms-border-radius and -o-border-radius (10a5908), and Phil LaPier (plapier) removed -moz-box-orient (6331e26). Gabe Berke-Williams (gabebw) fixed support for Rails 2 (eacd5ee and e9347e7) and, lesson learned, removed Gemfile.lock (671ad33).

factory_girl

Version 2.6.3 of factory_girl is out, all y’all. In this action-packed version we got a cucumber step named e.g. Given the following post exists (note the lack of : at the end), via cj (cj) (d4b8cac and 48afe24). Barun Singh (barunio) fixed a bug where the factory’s traits weren’t compiled in the very first time the factory was used (68ca50f), plus a factory can use all the traits on any ancestor (f14a8cf). Joshua Clayton (joshuaclayton) is now listed as an author (07d2834), so congrats to him and his hard work. As part of that hard work he discovered that the vintage syntax broke in MRI 1.9.2-p318, and then fixed it (a7acc3e).

This just in! Version 3.0.0.rc1 is now public! It breaks everything, again! Please try it and open issues with what breaks:

gem 'factory_girl', '3.0.0.rc1'

bourne

Oh hey version 1.1.1 of bourne is out (650afb0)! Bourne is an extension to mocha that adds test spies so your tests can read like normal tests. Tristan Dunn (tristandunn) added support for mocha 0.10.5 (286d8f9) and fixed a long-standing error message that occurs when you forget to stub a method before spying on it (17dc7d2).

Gabe Berke-Williams (gabebw), who pushed the release, also did some maintainance: adding Travis CI notifications to the README (7d6eb37), removing Gemfile.lock (950a445), and some general code cleanups (4bbe610 and b0f1f99).

shoulda-matchers

The big deal in shoulda-matchers over the past week was when Fujimura Daisuke (fujimura) added the ability to specify the key for the flash message in the set_the_flash matcher (0e0339e, ef866e2, and fd4aa53):

it { should set_the_flash[:alert].to("Password doesn't match") }

Gabe Berke-Williams (gabebw) did his usual maintainance of converting the docs to use Markdown (85c37c4), cleaning up the ModelBuilder that’s used in the tests (31595b0), and showing off how often our build is broken in the README using Travis CI (eebb806), which he also did to shoulda proper (7d805d0).

cocaine

Also victim to the Travis CI treatment was cocaine, via Gabe Berke-Williams (gabebw) again (ac47b6f and 490c406).

paperclip

The paperclip project is gearing up for a groundbreaking (maybe app-breaking?) release, but in the meantime Mike Boone (boone) fixed an infinitely-growing PATH environment variable (06d69af) while Mike Burns (mike-burns)—also known as: me—totally broke backward compatibility by changing the default :path and :url configuration setting (26f4d40). These new settings avoid overwriting files on different models and also scales to more than 1024 instances of the same model.

capybara-webkit

In capybara-webkit news, Joe Ferris (jferris) controversially allowed the user to interact with invisible elements (02f2a8a), and caught the fact that Capybara.timeout is deprecated (4d954b7).

lolconomy

This week in open source

cocaine

The only user-visible change in cocaine this week was by Gabe Berke-Williams (gabebw), who modified the public API for CommandLine to change unix? from a class method to an instance method (4183c89). Otherwise it was more of Gabe refactoring things (ae8ae22 and 1b9742a) and Prem Sichanugrist (sikachu) playing with Travis CI (4eb18d2).

diesel

This week diesel, an abstraction and set of helpers for Rails engines, got a bug fix from Gabe Berke-Williams (gabebw); Gabe fixed an issue where setting the BUNDLE_GEMFILE environment variable could sometimes cause it to be duplicated (933d545). Along the way he and Prem Sichanugrist (sikachu) played with Travis CI, Rails 3.2, and other dependencies (1d19331, 7496d91, 39c84e2, 821e1cd, bb4e627).

paperclip

Version 2.6.0 of paperclip is out! It has a bug fix: files have rewind called on them after being called, thanks to Kelley Reynolds (3b2b9bc). Justin Ko (justinko) made sure a non-Rails test suite can use Paperclip (67d5c0b and b0cb54e).

Internally, has_attached_file options are turned into an AttachmentOptions hash-like object (7f948f8, 9eda1bb, and 1f989ae), via Luke Griffiths (Sporky023). The afore mentioned Kelley Reynolds found a way to simplify the Filesystem#flush_writes code using FileUtils.cp (f8c2444). Prem Sichanugrist (sikachu) played with Travis CI (772c8e9) and Mike Burns (mike-burns) released version 2.6.0 (71d3f46).

factory_girl

Hear ye, hear ye, factory_girl 2.5.1 is out (13c58d2). With it Simone Carletti (weppos) gave us all the ability to pass traits to built_list and create_list (13129b0 and 6482a64); Erik Ostrom (eostrom) fixed the Cucumber step to use inherited associations (34c1bf9, 6cddb37, and 852eea8); Joshua Clayton (joshuaclayton) fixed #279 and #285 with some black magic around re-defining and undefining methods (f50550c).

Elsewhere, Gabe Berke-Williams (gabebw) found a way to re-write the entire gemspec (6e7e4ee) and also found six extra characters in a file (b63e389). Joshua Clayton (joshuaclayton) moved some exception classes around (98626c9) and set a minimum on the activesupport package (c103ca1).

capybara-webkit

As promised last week, version 0.9.0 of capybara-webkit is released! Thanks go to Matthew Mongeau (halogenandtoast) for this (bea4cbe and a6fde0e).

fake_braintree

Gabe Berke-Williams (gabebw) found a way to re-write the README for fake_braintree this week (7d10953).

lolconomy

This week in open source

shoulda-context

Hey! shoulda-context has a maintainer! His name is Travis Jeffery (travisjeffery) and he’s got commit rights and everything! Thank you, Travis.

Yeah!

cocaine

One feature was added to cocaine over the past week: Daniel Mircea (viseztrance) made it such that you can now pass blank argument values (a2d01c4). For example, this now works:


command_line = Cocaine::CommandLine.new(
  "curl",
  "-X POST -d :data :url",
  :data => "",           # Hey note this!
  :url => "http://localhost:9000",
  :swallow_stderr => false)

puts command_line.command

…which will produce:

curl -X POST -d '' 'http://localhost:9000'

paperclip

The paperclip project saw a few neat commits this week. Jeremy McNevin (jmcnevin) and ralph (ralph) pass the file type to Fog now, always (839b98c and 201f02e). Luke Griffiths (Sporky023), one of our new apprentices, got his first open source contribution in: you can pass an :s3_encrypted option for controlling which encryption type S3 should use (65e0338 and af6d343). And Jon Yurek (jyurek) fixed mixing Paperclip with non-ActiveRecord codebases (bc6ed16).

factory_girl

The fixture replacement gem, factory_girl, is now at version 2.4.2 (845578c). It includes bug fixes, a deprecation, and more Rails support. All commits were by Joshua Clayton (joshuaclayton).

There was an issue where using an inline trait would cause it not to be reset (70a80fd), and an issue with the precedence of inline traits (065c6c1).

Josh also deprecated the attributes_for class method, which once upon a time produced all the attributes that a factory would set (a883315). He provided no reliable workaround.

Today, Rails 3.2 was released, so we made sure to test against that—and it works! (5555f14)

capybara-webkit

A new release for capybara-webkit, yeay! Joe Ferris (jferris) cut the release (59ba861), first removing a long-standing debugging print statement (0bac05e).

Sweet features, bro: Yuri Gadow (ylg) added support for the fancy text inputs in HTML5 like email, number, search, and so on (7e5e99b).

John Barker (excepttheweasel) updated the README to point out that capybara-webkit does not, in fact, listen on port 8200 (2285621).

lolconomy

This week in open source

kumade

It was a refactoring week on kumade, the Heroku deployer. Gabe Berke-Williams and Josh Clayton refactored the Packager class, splitting it out into handlers for Jammit, Less, and no-op packagers (d854184). Then Gabe Berke-Williams (gabebw) went off on his own to introduce a CommandLine class, wrapping Cocaine with some Thor (0c3840d and 72424c0). Meanwhile Joshua Clayton (joshuaclayton) changed should_not have_received to should have_received.never (6652197).

suspenders

Our app making gem, suspenders, saw some updates from Matt Jankowski (mjankowski): Rails 3.1 (10ac09a, 97881fc, 354321d, c8f8c85, and db08366), bourbon (d490b36), flutie (e0bab83), the Hoptoad → Airbrake name change (6def3d7), and tying together the asset pipeline (a4ce3e7 and c760a33).

paul_revere

We have a one-off announcement plugin for Rails, named paul_revere. Nick Quaranto (qrush) released version 0.2.1 (3574b40 and dfbf940).

shoulda-matchers

Our collection of RSpec matchers, shoulda-matchers, is not passing on my laptop. Prem Sichanugrist (sikachu) built out the continuous integration tests more to attempt to clarify the issue (3d94390, 4450c86, 1a3aeec, 6785f59, f1f5e6d).

bourbon

The SCSS gem, bourbon, saw actual words being used by Matt Jankowski (mjankowski) in the documentation (b8afdea), plus Phil LaPier (plapier) updated the docs with resources for investigating browser compatibility (35539c9). He also added this sweet variable, $all-text-inputs, representing all HTML5 textual inputs like color, date, phone, password, URL, and so on (d1def76 and fb299e6). To wrap it all up he released version 0.1.8 (f3046bd).

paperclip

Lots of bug fixes in paperclip, the Rails image uploader plugin gem, this week. Cody Caughlan (ruckus) added S3 support for an HTTP proxy (4661cef). Denis Yagofarov (denyago) preserved the path set for the Cocaine gem (3a35ba9). Aditya Sanghi (asanghi) gave us a warning when two models save files to the same place on the filesystem (8d43e19). Daniel Evans (danielevans) removes the temporary file after it has been uploaded and processed (748332e). Edison (edison) added a feature where you can set the file system path based on a method in the model (996ca87 and 1738f3c).

Prem Sichanugrist (sikachu) then attacked some outstanding bugs: escape the URL (23cb822), handle a space leak where an array was growing by one for each request (d18d814), make the Interpolations.hash class method confirm to the expected signature for hash methods (e526c86), and preserve the filename for S3 attachments when we know the filename (522a53e).

Prem then did some refactoring, splitting the storage tests into individual unit tests (0ca98d1, d204c7d, 31d74d6), stubbing Cocaine (0a77f64), removing some noisy debugging (fd891e0), and cleaning up whitespace (825e1f1 and b2cac53). After all of this he released version 2.4.2 (9edeb01).

factory_girl

Features and refactorings were the name of the game for factory_girl, the fixture replacement for Rails. Joe Ferris and Josh Clayton fixed traits so now you can override attributes of them. They did this by refactoring attributes, introducing an intermediate Declaration object that knows how to compile down to a full factory (a154e64 and f8638b). Joe Ferris (jferris) made callbacks into first-class objects with validations (0f87ca3, ede051f, and 4d30663). Thomas Walpole (twalpole) fixed an inconsistency, ensuring that parent callbacks are called before child callbacks (27c4b21).

Oh man check this: Joel Meador (janxious) updated the ChangeLog (306e51b and 88cf88)! Joshua Clayton (joshuaclayton) went along with this, too (9c95a2) before releasing version 2.1.2 (58e75bc and c1360e).

capybara-webkit

The capybara-webkit test driver, which Joe presented about at Boston Ruby, continues to improve. Gabe Berke-Williams (gabebw) gave us a documentation edit (f493b22), while Matthew Mongeau (halogenandtoast) striped and normalized spaces for consistency with Selenium (6d92f35) and also added support for unknown content types (ff0a6e7, 9257fe3, and 353fe86)