---
title: This week in open source
teaser:
tags: news,open source
author: Mike Burns
published_on: 2011-09-23
---

## kumade

It was a refactoring week on [kumade](https://github.com/thoughtbot/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](http://github.com/thoughtbot/kumade/commit/d854184744a70d1786e65a3a4bbd6429988b7f00 "Refactor Kumade::Packager

This moves the logic of each of the packagers into their own classes,
introduces a PackagerList class that maintains all the various
packagers, and improves tests around the packager.")). Then Gabe Berke-Williams ([gabebw](http://github.com/gabebw)) went off on his own to introduce a `CommandLine` class, wrapping [Cocaine](https://github.com/thoughtbot/cocaine) with some [Thor](https://github.com/wycats/thor) ([0c3840d](http://github.com/thoughtbot/kumade/commit/0c3840dc42a99abdd011cb0a99355f51402da673 "Fixup.") and [72424c0](http://github.com/thoughtbot/kumade/commit/72424c09238657c3018fcb9ac348e0dc41ed9252 "Use Kumade::CommandLine to run commands.

This commit also gives full test coverage to the Git class.")). Meanwhile Joshua Clayton ([joshuaclayton](http://github.com/joshuaclayton)) changed `should_not have_received` to `should have_received.never` ([6652197](http://github.com/thoughtbot/kumade/commit/6652197e761004f78e15a8122dbe1804e7a13c2d "Use spies + expectations correctly")).

## suspenders

Our app making gem, [suspenders](https://github.com/thoughtbot/suspenders), saw some updates from Matt Jankowski ([mjankowski](http://github.com/mjankowski)): Rails 3.1 ([10ac09a](http://github.com/thoughtbot/suspenders/commit/10ac09a78309a82864eda4c7b26b1584e810a595 "move announcement about bundler to correct location"), [97881fc](http://github.com/thoughtbot/suspenders/commit/97881fc594082d2a301819758d346716cebc9421 "modify stylesheet setup to use rails 3.1 assets and scss and install flutie import to start with"), [354321d](http://github.com/thoughtbot/suspenders/commit/354321d8820b447c4f638c2e36939cdf33299fff "add bourbon mention and rails 3.1 details to readme"), [c8f8c85](http://github.com/thoughtbot/suspenders/commit/c8f8c85e5e6f8290c92e6744aa6d977bb0aa5be2 "update Gemfile to reflect rails 3.1 requirements"), and [db08366](http://github.com/thoughtbot/suspenders/commit/db08366e5ea815e2b40aee6c56e50a12f4d5e997 "rails 3.1 change to csrf_meta_tags method name")), bourbon ([d490b36](http://github.com/thoughtbot/suspenders/commit/d490b368575589c2355096378b417f19b23f58f0 "include bourbon as well")), flutie ([e0bab83](http://github.com/thoughtbot/suspenders/commit/e0bab837ab7fbaab4af764791b86659793b73349 "use helper methods provided by flutie")), the Hoptoad → Airbrake name change ([6def3d7](http://github.com/thoughtbot/suspenders/commit/6def3d70a9ea13288508f4722740a7c4e17e69cc "note about hoptoad/airbrake")), and tying together the asset pipeline ([a4ce3e7](http://github.com/thoughtbot/suspenders/commit/a4ce3e7c9f561f3f9ef157b5d9784f9b7d63c957 "update gemspec to include new scss styles file") and [c760a33](http://github.com/thoughtbot/suspenders/commit/c760a33e47bf4728776988677e44be01fd6ad031 "rely on application.js to compile all js into one file, and add jquery ui")).

## paul_revere

We have a one-off announcement plugin for Rails, named [paul_revere](https://github.com/thoughtbot/paul_revere). Nick Quaranto ([qrush](http://github.com/qrush)) _released version 0.2.1_ ([3574b40](http://github.com/thoughtbot/paul_revere/commit/3574b40ffde2fbf2cb3b554bc64a7fdca081a7eb "ignore .gem") and [dfbf940](http://github.com/thoughtbot/paul_revere/commit/dfbf9406b8ca1bba5fd8bc5fd34d3f964aba47b1 "bump to 0.2.1, ignore appraisal gemfile locks since they have user specific paths in them")).

## shoulda-matchers

Our collection of RSpec matchers, [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers), is not passing on my laptop. Prem Sichanugrist ([sikachu](http://github.com/sikachu)) built out the continuous integration tests more to attempt to clarify the issue ([3d94390](http://github.com/thoughtbot/shoulda-matchers/commit/3d9439030b09208517311c1583beb0fe0a6c903b "Update set_the_flash_matcher to also duplicate the used set to fix a bug in Rubinius

Tests now also passed on Rubinius 2.0"), [4450c86](http://github.com/thoughtbot/shoulda-matchers/commit/4450c865db3f72b720fb1d3b643d7e64c26767cd "[Travis] Re-enable notification"), [1a3aeec](http://github.com/thoughtbot/shoulda-matchers/commit/1a3aeec47cfb6c340f084a096829264d5bfbd80a "Fix have_db_index_matcher bug on JRuby

So matched_index.unique actually returns an integer instead of true and returns nil instead of false in JRuby. This `!!` operator should fix it."), [6785f59](http://github.com/thoughtbot/shoulda-matchers/commit/6785f596b468dfcfe15155f3d439abd04cb676dc "Update Gem configuration for Ruby 1.9.3 and JRuby"), [f1f5e6d](http://github.com/thoughtbot/shoulda-matchers/commit/f1f5e6d75964d3864d450aad5a4f8769f50aeff4 "Remove gem lockfiles")).

## bourbon

The SCSS gem, [bourbon](https://github.com/thoughtbot/bourbon), saw actual words being used by Matt Jankowski ([mjankowski](http://github.com/mjankowski)) in the documentation ([b8afdea](http://github.com/thoughtbot/bourbon/commit/b8afdea9be70a2eecdad330413396880af7a45ac "use actual words in the readme")), plus Phil LaPier ([plapier](http://github.com/plapier)) updated the docs with resources for investigating browser compatibility ([35539c9](http://github.com/thoughtbot/bourbon/commit/35539c9eefac80e22c4f9ae18e918345e420f913 "Added resources to readme for investigating browser support")). He also added this sweet variable, `$all-text-inputs`, representing all HTML5 textual inputs like color, date, phone, password, URL, and so on ([d1def76](http://github.com/thoughtbot/bourbon/commit/d1def7628d07b01fb6eb633e6453ffa5e85529ed "Add note about interpolation requirement") and [fb299e6](http://github.com/thoughtbot/bourbon/commit/fb299e6b8492424ea6fe765479cb7c434efd3ef4 "New addon to target only html5 input-types that are text-based (mimick input[type=text])")). To wrap it all up he _released version 0.1.8_ ([f3046bd](http://github.com/thoughtbot/bourbon/commit/f3046bd27de28ce6ce34de22a4d9214afc9dbed7 "Version Bump to 0.1.8")).

## paperclip

Lots of bug fixes in [paperclip](https://github.com/thoughtbot/paperclip), the Rails image uploader plugin gem, this week. Cody Caughlan ([ruckus](http://github.com/ruckus)) added S3 support for an HTTP proxy ([4661cef](http://github.com/thoughtbot/paperclip/commit/4661cefabca674e54de5d1ca6782000038eb7623 "Added support for specifying an HTTP Proxy")). Denis Yagofarov ([denyago](http://github.com/denyago)) preserved the path set for the Cocaine gem ([3a35ba9](http://github.com/thoughtbot/paperclip/commit/3a35ba9f57ed89c168079331bf6fa497b2ff7b06 "Save Cocaine::CommandLine.path that already set")). Aditya Sanghi ([asanghi](http://github.com/asanghi)) gave us a warning when two models save files to the same place on the filesystem ([8d43e19](http://github.com/thoughtbot/paperclip/commit/8d43e19e5577420a042912efb01a8cffae5f5d1c "fixes #588 . Attempt to log warning message when 2 models use same attachment name with default url interpolation")). Daniel Evans ([danielevans](http://github.com/danielevans)) removes the temporary file after it has been uploaded and processed ([748332e](http://github.com/thoughtbot/paperclip/commit/748332eb5d8d3003477de7b1089e7248e0f46040 "Cleaning up the downloaded original file if it is a tempfile, such as it is with s3 storage.")). Edison ([edison](http://github.com/edison)) added a feature where you can set the file system path based on a method in the model ([996ca87](http://github.com/thoughtbot/paperclip/commit/996ca871a9677fed8cc0d62562e8f0c6ebd1054d "Enable conditional `pattern` assignment to Interpolations") and [1738f3c](http://github.com/thoughtbot/paperclip/commit/1738f3c815bb5ce24d8c55c0be5535415663e310 "Add some more documentation for passing symbol to :url, :default_url, :path")).

Prem Sichanugrist ([sikachu](http://github.com/sikachu)) then attacked some outstanding bugs: escape the URL ([23cb822](http://github.com/thoughtbot/paperclip/commit/23cb822de3807404589706ead964f2ef0d759ec9 "Return a URI.escape")), handle a space leak where an array was growing by one for each request ([d18d814](http://github.com/thoughtbot/paperclip/commit/d18d814dd7e55e134bb3b06c43178e98b6db1760 "Do not add current model to the class_with_attachment list if it")), make the `Interpolations.hash` class method confirm to the expected signature for `hash` methods ([e526c86](http://github.com/thoughtbot/paperclip/commit/e526c86adb428f322b094bbc89ce283bb5d12c32 "Fix the method signature of Interpolations.hash to accept no argument

This will make sure Interpolations is comply with Ruby")), and preserve the filename for S3 attachments when we know the filename ([522a53e](http://github.com/thoughtbot/paperclip/commit/522a53e3b5dcac0213b8189bcc474d168690da58 "Ensure that we cache attachment")).

Prem then did some refactoring, splitting the storage tests into individual unit tests ([0ca98d1](http://github.com/thoughtbot/paperclip/commit/0ca98d199953ad749a72d24e6254f89c6872a8d1 "Let"), [d204c7d](http://github.com/thoughtbot/paperclip/commit/d204c7d8e583520933ad7cba3a8e43651ea66cc8 "Update require in test files"), [31d74d6](http://github.com/thoughtbot/paperclip/commit/31d74d66d52295e1f23cf88b5c57afb8bc133946 "Split test cases for multiple storages")), stubbing Cocaine ([0a77f64](http://github.com/thoughtbot/paperclip/commit/0a77f64558c1f1bec91f139bfe3b371fa4a88865 "Also stubbing the new call on `Cocaine::CommandLine`")), removing some noisy debugging ([fd891e0](http://github.com/thoughtbot/paperclip/commit/fd891e04fb938e05f9d624cd8d58a07b8661e111 "Remove debug puts statement")), and cleaning up whitespace ([825e1f1](http://github.com/thoughtbot/paperclip/commit/825e1f1590a49fb7557720bf53c4c5ad1503b2e6 "Remove whitespaces") and [b2cac53](http://github.com/thoughtbot/paperclip/commit/b2cac53d8b4912eb9f2e485300899b5293c45782 "Remove whitespaces")). After all of this he _released version 2.4.2_ ([9edeb01](http://github.com/thoughtbot/paperclip/commit/9edeb01435cba49f54e0b0fc484126ec81647526 "Bump to 2.4.2")).

## factory_bot[^1]

Features and refactorings were the name of the game for [factory_bot](https://github.com/thoughtbot/factory_bot), 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](http://github.com/thoughtbot/factory_bot/commit/a154e64da18fc282d9437c136c17972faf7c1d58 "Introduce declarations

Declarations are another layer of abstraction between defining the
factories via the DSL and compiling the factories and their attributes.

Declarations know how to return their attribute(s), and running a
factory compiles the declarations before building all attributes on the
factory. This moves all the attribute compilation logic into one
centralized location on the Factory instance, which means traits (and
potentially other features down the road) can have individual attributes
overridden within child factories or through FactoryBot.modify

Closes #205") and [f8638b](https://github.com/thoughtbot/factory_bot/commit/f8638b3085a51e438e5618554fff04e61692ac10)). Joe Ferris ([jferris](http://github.com/jferris)) made callbacks into first-class objects with validations ([0f87ca3](http://github.com/thoughtbot/factory_bot/commit/0f87ca3aa98ff358b5f706a7cfce5ca38b6d23a0 "Use objects, not structs"), [ede051f](http://github.com/thoughtbot/factory_bot/commit/ede051f81f2e32ffdd8adc33f0daea071d4e5097 "Move callback validation into Callback"), and [4d30663](http://github.com/thoughtbot/factory_bot/commit/4d30663a5b8bd5d3102bf3c1876041cbf5f80401 "Callbacks aren")). Thomas Walpole ([twalpole](http://github.com/twalpole)) fixed an inconsistency, ensuring that parent callbacks are called before child callbacks ([27c4b21](http://github.com/thoughtbot/factory_bot/commit/27c4b21e6b6d2767bf30077ded8159338d39b75d "make sure parent callbacks are run before child")).

Oh man check this: Joel Meador ([janxious](http://github.com/janxious)) updated the ChangeLog ([306e51b](http://github.com/thoughtbot/factory_bot/commit/306e51b91d4addb9825cc0fc9e307dc4016a26e6 "Update changelog with v2.1.0 changes (from 2.0.5)") and [88cf88](https://github.com/thoughtbot/factory_bot/commit/88cf88e98d16b4d28a22016cfe0ece04695309e7))! Joshua Clayton ([joshuaclayton](http://github.com/joshuaclayton)) went along with this, too ([9c95a2](https://github.com/thoughtbot/factory_bot/commit/9c95a2239365808d361b7b277e7093392ef4893d)) before _releasing version 2.1.2_ ([58e75bc](http://github.com/thoughtbot/factory_bot/commit/58e75bcb3fcf27ab4b96d32fc21702103efc44ad "Bump version to 2.1.1") and [c1360e](https://github.com/thoughtbot/factory_bot/commit/c1360e1fc5b934860a0418f55c7f83ccdb2ad723)).

## capybara-webkit

The [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) test driver, which [Joe presented about at Boston Ruby](https://thoughtbot.com/blog/post/10314620132/modern-applications-use-javascript-you-can-make), continues to improve. Gabe Berke-Williams ([gabebw](http://github.com/gabebw)) gave us a documentation edit ([f493b22](http://github.com/thoughtbot/capybara-webkit/commit/f493b22f6bb5b468a17d6f768ad4fe76af751901 "make it read better")), while Matthew Mongeau ([halogenandtoast](http://github.com/halogenandtoast)) striped and normalized spaces for consistency with Selenium ([6d92f35](http://github.com/thoughtbot/capybara-webkit/commit/6d92f35d98cdcfdea58d10776db2afe45f5272ef "Strip and normalize spaces. Fixes #112 #145")) and also added support for unknown content types ([ff0a6e7](http://github.com/thoughtbot/capybara-webkit/commit/ff0a6e769baf8b342b9bef9e27b2912cc67d199e "Reversed if clause"), [9257fe3](http://github.com/thoughtbot/capybara-webkit/commit/9257fe3c93bb1f842246b64de8b0a78efaaa2a41 "Cleanup"), and [353fe86](http://github.com/thoughtbot/capybara-webkit/commit/353fe860b2faf7f29a89ccdb2ee3813c2052e6a6 "Handle unsupported content types gracefully"))

[^1]: Looking for FactoryGirl? The library was renamed in 2017.
[Project name history can be found here.](https://github.com/thoughtbot/factory_bot/blob/master/NAME.md)
