Written by thoughtbot

This week in open source


Over the past week bourbon went up to version 1.3.5. A whole bunch of sweet new features are in it now:

Frank (frankzilla) added a modular-scale mixin, of which the golden-ratio mixin is but one implementation (126a83b and 96659a2). He also added a parameterized fallback color to linear-gradient (60e2c63).

Phil LaPier (plapier) worked with Gabe Berke-Williams (gabebw) on a bourbon command-line too for working with Sass outside of a Rails app, such as Jekyll, WordPress, or even a static site (ad1499b, b55a763, 0ebf906, c2077d8, 13e70d3, 2fc2c90, and bf34e70). You can run bourbon install to install it and bourbon update to update an existing installation.


A careful sleuth has updated the documentation for capybara-webkit this week. Marc Schwieterman (marcisme) discovered that a fully passing test suite depends on ImageMagick, and documented as much in the contributions guide (<a href="" title="add imagemagick dependency to contributing guide Several tests in driver_rendering_spec.rb require the identify command that is part of Imagemagick. Without it they fail with output similar to the following. MiniMagick::Error: Command ("identify -ping /var/folders/y3/vfvjgwm91f1fmt2syh21czx40000gn/T/mini_magick20120115-49056-pwh5nl-0.png") failed: {:output=>"sh: identify: command not found\n", :status_code=>127}">df39268).


Version 2.5.0 of factory_girl is out, and there's a badass new feature in it. But first:

Joshua Clayton (joshuaclayton) fixed a bug where the :parent's factory wasn't being passed along (4aecfff). Carlos Antonio da Silva (carlosantoniodasilva) fixed the URLs in the readme to point to correct locations (aa74edd and 42f5a10).

Oh, and you may remember from last week that Josh deprecated the attributes_for method admist much controversy. Well, he undid that (<a href="" title="Revert "Deprecate attributes_for and build_stubbed" This reverts commit a883315bc4775f5b9996a378d6c4ebe0ebf44a5e.">2d6adfd).

Josh then implemented a feature that Joe Ferris (jferris), FactoryGirl's originator, has wanted for years: you can specify how FactoryGirl should construct the class (<a href="" title="Implement initialize_with to allow overriding object instantiation Factory Girl now allows factories to override object instantiation. This means factories can use factory methods (e.g. methods other than new) as well as pass arguments explicitly. factory :user do ignore do things { ["thing 1", "thing 2"] } end initialize_with { User.construct_with_things(things) } end factory :report_generator do ignore do name { "Generic Report" } data { {:foo => "bar", :baz => "buzz"} } end initialize_with {, data) } end Whitespace Code recommendations">5780364). Joe excitedly documented this (ea89aad). This means that FactoryGirl can be used for non-ActiveRecord classes, including immutable classes.


In accordance to our new gem schedule, paperclip hit 2.5.1 this week. Mike Burns (mike-burns) cut the release, adding a ChangeLog and updating the NEWS file (b7f9b6f and ec4793e). In short: Fog storage is passed the content type, S3 can be encrypted, and ActiveRecord is optional.