This week in open source


There’s a new version of factory_girl this week, as usual: 3.1.1 (aa81d2f).

Mark Rushakoff (mark-rushakoff) fixed a typo (4682ab0). Have I mentioned how much I love documentation fixes? Because I do.

Joshua Clayton (joshuaclayton) ensured that FactoryGirl.attributes_for works with has_many associations (50be545). He also refactored Strategies to be modules instead of classes, and added an Evaluation façade to make building strategies easier ([89d5e94]( “Refactor Strategies

This changes Strategy from a class to a module and removes inheritance. It introduces an Evaluation facade to make building strategies easier”)).


flutie got some love this week from Edwin Morris (ehmorris), who changed values from pixels to ems ([fd26ed0]( “Merge pull request #35 from ehmorris/master

Changed flutie pixel values to ems”)) and these new-fangled CSS3 “rems”. REMs are relative to the base element’s size, not to the parent’s size (more here). I wish I’d had that back in the day.


paperclip got a bunch of bug fixes from Prem Sichanugrist (sikachu).

He fixed the contenttype validator to allow blanks and nils ([5eed1dc]( “Fix contenttype validator to support blank/nil

ContentTypeValidator now honors the :allow_nil and :allow_blank option.”)), ensured that code dealt with the content type, not the MimeType ([3f1d30f]( “Call #content_type on MimeType object

This will ensure that the content type is a String.

Fixes #805”)), closed ALL the files ([4f6d482]( “Close ALL the files

Make sure that we close opened files after we”)), and removed unused code (yay!) ([02eb725]( “Remove unused code

AttachmentAdapter now handles this for us.”)).

Sebastien Guignot (sguignot) fixed attachment.reprocess! when using Fog or S3 (9d1355b).

Kir Maximov (kir) fixed a problem with an incorrect content_type (3e98fc2).


shoulda-matchers continues to improve. Gabe Berke-Williams (gabebw - that’s me!) added tests for Rails 3.2 (aff2824) and bumped rspec-rails (5baa056). As ever, the NEWS file is the place to watch for updates to functionality.

Aaron Gibralter (agibralter) fixed the ensure_length_of matcher to check for all possible I18n error messages (0a8e652), meaning our internationalized users aren’t left with false negatives in their tests.

Victor Pereira (vpereira) added the in_array method (e40e2cb) to the ensure_inclusion_of matcher, meaning you can do it { should ensure_inclusion_of(:attribute).in_array(%w[cat dog]) now.