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

## kumade

The Heroku deployment gem, [kumade](https://github.com/thoughtbot/kumade), saw more love from Marcos Tapajós ([tapajos](http://github.com/tapajos)): fixes to make tests pass ([fcb02cc](http://github.com/thoughtbot/kumade/commit/fcb02cc5317a6b8f35b51e7a9f2ae796fc250b88 "Stubbing say.") and [53c238c](http://github.com/thoughtbot/kumade/commit/53c238cd692d82270c855a4fb39a2a6838eea063 "Fix to work with 1.8.7 again.")) along with a version bump ([c5681e4](http://github.com/thoughtbot/kumade/commit/c5681e4b0229ed1a14f068e767359ace965a330a "bump to 0.2.3.")). A new version is not yet released, though.

## shoulda-matchers

Our collection of matchers for shoulda, appropriately named [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers), saw one commit from Mike Burns ([mike-burns](http://github.com/mike-burns)) (that's me!), in an attempt to get the tests passing by explictly depending on Aruba ([5190a39](http://github.com/thoughtbot/shoulda-matchers/commit/5190a39bba699d4989c2500c98622b505e2de828 "Add an aruba dependency so the cucumber tests can run.")). However, here's my plea: I can't get these tests to pass locally, so I can't take any pull requests. If you see what's [causing my build to fail](https://gist.github.com/1174060) please let me know.

## pacecar

An ActiveRecord extension that generates scopes, named [pacecar](https://github.com/thoughtbot/pacecar), saw a documentation update from Matt Jankowski ([mjankowski](http://github.com/mjankowski)) where he mentions that PostgreSQL is in fact a supported database ([1737a7c](http://github.com/thoughtbot/pacecar/commit/1737a7cde88905b75cec2acc8e733093ad6464e2 "Add postgres to supported database list")).

## paperclip

The file uploading gem [paperclip](https://github.com/thoughtbot/paperclip) saw a whole slew of commits. The documentation saw a typo fix ([f71ebb4](http://github.com/thoughtbot/paperclip/commit/f71ebb444d7986795a55ed1cd32b703f571f130e "Typo")) from Gabe Berke-Williams ([gabebw](http://github.com/gabebw)), Chief Typo Fixer. Mike Mondragon ([monde](http://github.com/monde)) documented custom processors, the MD5 checksum and fingerprint, and dynamic configuration ([81562b0](http://github.com/thoughtbot/paperclip/commit/81562b0fb4ac06a2121fca114d8de32f60dff750 "Documentation for custom processors, dynamic styles, and dynamic processors. An implemenation of the watermark processor alluded to is in this gist https://gist.github.com/1171081"), [f815b8b](http://github.com/thoughtbot/paperclip/commit/f815b8b329da6025852450ba45f15284d1ba52ec "Documenting the MD5 checksum fingerprint feature."), and [237597e](http://github.com/thoughtbot/paperclip/commit/237597eb3a920ebef8ad7d2ab0fb5e4e0ccd4d24 "Merge remote branch ")). Prem Sichanugrist ([sikachu](http://github.com/sikachu)) fixed the README's build failure image to only show master's CI status instead of the failure status for every branch ([cbfaca4](http://github.com/thoughtbot/paperclip/commit/cbfaca481595fc7814b4a3c38aebe228fc9c0db2 "Update the travis build image to display the build result from master branch only. This will prevent someone to think that Paperclip test suite for master branch is currently failing, as the build was failed on a WIP branch, not the main branch. http://travis-ci.org/#!/thoughtbot/paperclip/builds.")).

Less documentationally, Prem also removed MongoDB support from this gem, suggesting instead that it should be handled in a separate plugin ([7e1a923](http://github.com/thoughtbot/paperclip/commit/7e1a923d9c6df61a322ee0ba2ebc77f3256b0f65 "Revert &quot;Revert &quot;Handle interpolation of string IDs (supports mongo) as well as integers&quot;&quot; I think it")). Mike Burns ([mike-burns](http://github.com/mike-burns)) (that's me again!) fixed some code formatting to strip extra whitespace and add parens around method definitions ([d00c04e](http://github.com/thoughtbot/paperclip/commit/d00c04e334d6a229cde3780bc2954dd4a5c1b09d "Fix the formatting") and [d591a64](http://github.com/thoughtbot/paperclip/commit/d591a64862444e4c83932019be1267c6ec8acfe1 "Fix the formatting.")). Jon Yurek ([jyurek](http://github.com/jyurek)), paperclip's maintainer, fixed an issue in master to make tests contintue to pass despite relative/absolute directory name differences between Ruby versions ([d336c4a](http://github.com/thoughtbot/paperclip/commit/d336c4a160c91542752a9833ce7964e02bf5a290 "Rakes green")), fixed an infinite loop in the Fog pathway ([6c912c4](http://github.com/thoughtbot/paperclip/commit/6c912c4d2da0fd3c2b31c98342e84406f2fc53fb "Fixes an infinite interpolation problem with fog")), removed `Gemfile.lock` from the repo ([3f56e70](http://github.com/thoughtbot/paperclip/commit/3f56e7038e8295e8a8793d605d7c377a7e95a4cf "We should not have gem lockfiles in the repo.")), and abstracted out the logger so plugins and clients can change it from the Rails default ([6b6ce9e](http://github.com/thoughtbot/paperclip/commit/6b6ce9edf7eef4c9bb722bf4f69eb0f63e959ae3 "Don")).

Speaking of abstractions, the aforementioned Mike Burns (that's me, one more time!) went through various third-party paperclip plugins to look for patterns and generally make life easier. While many ideas and refactorings are still under development (wait'll you see how easy image processors will be!), he did manage to decouple the `Interpolations` class from the `Attachment` class, which may help with the [paperclip-extended](https://github.com/prashantkg16/paperclip-extended) plugin ([7478455](http://github.com/thoughtbot/paperclip/commit/74784558f5a53d8ce46a4ac693e1e464c9dc4d73 "Decouple the Interpolations class from the Attachment classs, you can extend Paperclip with custom interpolations as paperclip-extended does.")) and abstract out the geometry string parser from the `Thumbnail` class, which may be helpful to the [papermill](https://github.com/bbenezech/papermill) plugin ([eebc7d9](http://github.com/thoughtbot/paperclip/commit/eebc7d98a7ecafc11ac3e221c159169d9aab7d10 "Also abstract out the string geometry parser from Thumbnail, to reduce coupling.") and [3f7aee3](http://github.com/thoughtbot/paperclip/commit/3f7aee300bcb1f2014904cf9df8224ece92ad2a9 "Abstract out the file geometry parser within Thumbnail. This makes it possible to have different cropping and scaling controls, as the papermill gem does.")). Bert Goethals ([Bertg](http://github.com/Bertg)) submitted a tiny but important patch to allow plugins to override whether to perform post-processing callbacks, useful for the [delayed_paperclip](https://github.com/jstorimer/delayed_paperclip) plugin ([e645aaf](http://github.com/thoughtbot/paperclip/commit/e645aafa05758b337a2ae04e1a8b94493a392630 "When testing if post_processing is set, the method should be used. This allows plugins to overwrite the post_processing decision. This is useful for plugins that want to do the post_processing in a background processor.")).

To round it off, H. Wade Minter ([minter](http://github.com/minter)) was able to split Fog credentials out into a YAML for easy viewing and storage ([77ce88a](http://github.com/thoughtbot/paperclip/commit/77ce88a72e01b164dcbe9e639a2928651f2a0c6b "Allow Fog credentials to be set from an external YAML file.") and [5ec9a73](http://github.com/thoughtbot/paperclip/commit/5ec9a737700eed5a268c0a9d8aaa2a1e65a28aae "Merge branch ")), and Mario Peixoto ([mariopeixoto](http://github.com/mariopeixoto)) handled the case where the model to which the attachment belongs is unsuccessfully deleted ([472a625](http://github.com/thoughtbot/paperclip/commit/472a625a1eca8b157cbc531f59dd27dd99b62194 "Fixing destroy callback to delete files just when model destroy method was completed successfully (i.e. no exception like ")).

## factory_bot[^1]

Our Rails (and general Ruby) fixture replacement [factory_bot](https://github.com/thoughtbot/factory_bot) saw a feature from Jim Kingdon ([jkingdon](http://github.com/jkingdon)) making `:method => :build` make sense for associations ([79a1d5e](http://github.com/thoughtbot/factory_bot/commit/79a1d5e135091fac0521fed59ea8f4e2f664cd19 "Merge branch ") and [:build in a factory's association. See issue #64.">9037481](http://github.com/thoughtbot/factory_bot/commit/90374818a77e20c768c6b8415bdfdeb59304aa2b "Now able to specify :method =")). Thomas Walpole ([twalpole](http://github.com/twalpole)) fixed a bug where attributes did not work as expected in child factory definitions ([a50c703](http://github.com/thoughtbot/factory_bot/commit/a50c703b7e73316311370baa66a678774418a4d0 "Ensure static and dynamic attributes can be ") and [854204d](http://github.com/thoughtbot/factory_bot/commit/854204dd12831a320f3226a875d9175ec68d1544 "Ensure factories prioritize static attributes in all cases")). Petteri Räty ([betelgeuse](http://github.com/betelgeuse)) fixed a typo in the docs ([25affc7](http://github.com/thoughtbot/factory_bot/commit/25affc7fec04a2d96b17f8592f2689eace5ba6a4 "Typo fix possbile to possible")) while Josh Clayton ([joshuaclayton](http://github.com/joshuaclayton)) fixed some doc formatting ([4960cb3](http://github.com/thoughtbot/factory_bot/commit/4960cb3844da65a57afb4eeddda282f7f05cf066 "Fix contribution guidelines formatting")) and test strings ([744177c](http://github.com/thoughtbot/factory_bot/commit/744177cb8451a90f6cc44c930ed46efaa45c942c "Suggestions")).

Josh continued on with bug fixes, refacotorings, and features. An incomplete cucumber test was fixed ([4d9eb20](http://github.com/thoughtbot/factory_bot/commit/4d9eb20cbeb998c982ee40cce819ae73f1668ec1 "Fix step")); strings are stripped from the cucumber step definitions, improving the ability to use cucumber transforms ([05ddd3d](http://github.com/thoughtbot/factory_bot/commit/05ddd3d6b53da057eb2b9faf5897d27562391622 "Only strip strings in step definitions. This allows for cucumber transforms to create different data structrues and still work with factory bot steps.  Closes #185")); overridden attributes are set only once ([0ddc78b](http://github.com/thoughtbot/factory_bot/commit/0ddc78bd4ee9d744027cb293e018fdf33623e0c3 "Don")); and attributes are sorted in priority only once ([4d4c01d](http://github.com/thoughtbot/factory_bot/commit/4d4c01d29ee25483b34f72ded707f0207ded9f69 "Change attributes to maintain a hash of priorities and attributes.  This means attributes won"), [2b4a6c7](http://github.com/thoughtbot/factory_bot/commit/2b4a6c72c84a272b03cb718d0353dc252e8db06a "Rework more tests to allow for attribute_list refactoring")). The `.bundle` directory was removed ([9f325aa](http://github.com/thoughtbot/factory_bot/commit/9f325aa2ac3d5dd864af898002dfd20e4bad38ea "Remove the .bundle directory")); adding an attribute or callback returns the attribute ([58ec702](http://github.com/thoughtbot/factory_bot/commit/58ec702fa3f328fbf02bb34b75ea80b97a567569 "Adding attributes and callbacks return the attribute added")); the tests were cleaned up with a `DefineConstantMacros` module ([0b2c4da](http://github.com/thoughtbot/factory_bot/commit/0b2c4da0a4082ac9b8f484ba93026e0ab7103254 "Move DefineConstant code into macro")); and the attribute and core specs were reformatted and refactored for cleanliness ([7c9254a](http://github.com/thoughtbot/factory_bot/commit/7c9254a452fb8beb7a197fa52848b49758077c2c "Clean up attribute and core factory specs") and [d296a22](http://github.com/thoughtbot/factory_bot/commit/d296a225864e50750b355741122f99177ed6a573 "Clean up proxy specs with shared examples")). He then added transient attributes&mdash;arbitrary properties on the factories themselves which are not part of the underlying ActiveModel object ([c87429b](http://github.com/thoughtbot/factory_bot/commit/c87429b8298ff98e0fe3437de2951a7f3aa6330c "Add transient variables.  Closes #142 Closes #103"))&mdash;and _released version 2.0.5 of factory_bot_ ([d22e0d8](http://github.com/thoughtbot/factory_bot/commit/d22e0d8ff8a22b397da330c1049fdc10561ef0e9 "Bump version to 2.0.5")).

## capybara-webkit

This week saw some resolution to issues with [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) from last week, improving the headless JavaScript test suite. Hongli Lai (Phusion) ([FooBarWidget](http://github.com/FooBarWidget)) sided with Trevor Smith ([trevorsmith](https://github.com/trevorsmith)) in using `IO.popen` for spawning the webkit server ([3b025e7](http://github.com/thoughtbot/capybara-webkit/commit/3b025e7115c8f9688e83df47937f53c5ed029e18 "Fix signal handling behavior on Ruby 1.8.") and [fe13b0b](http://github.com/thoughtbot/capybara-webkit/commit/fe13b0b985f1c656156bdaf888bced9a605eb305 "Use only IO.popen for spawning webkit_server, it already closes unnecessary file descriptors.  Fixes issue #137.")). Shogo Ohta ([os0x](http://github.com/os0x)) gave us the ability to capture the status code ([5ce6058](http://github.com/thoughtbot/capybara-webkit/commit/5ce60584ad667785bdb81c5a208202a43ed0c91d "reset status code"), [457957b](http://github.com/thoughtbot/capybara-webkit/commit/457957b61aa05b7b9416daead8c0747be3a85e3d "Merge branch "), [4827174](http://github.com/thoughtbot/capybara-webkit/commit/482717484e1a3e67773f68a7c4ffea19099b3fb6 "Response headers should be reset"), [9c195af](http://github.com/thoughtbot/capybara-webkit/commit/9c195af89c7e3103306913ed8c61a7af6a8c4ff6 "added spec for response header"), [c28e9a1](http://github.com/thoughtbot/capybara-webkit/commit/c28e9a177c45b04392354f72066bf2c6af9236bb "added spec for reset status code"), [41c842e](http://github.com/thoughtbot/capybara-webkit/commit/41c842edf7584cad66af342a2329199bc24778d1 "capturing status code restrict to page request"), and [88b70e3](http://github.com/thoughtbot/capybara-webkit/commit/88b70e37a3ec0bd08caea53aa8a51f2b48e679b5 "add spec for status code with image")). Josh Clayton ([joshuaclayton](http://github.com/joshuaclayton)) fixed a bug in the handling of `maxlength` attributes for `input` fields ([9c02a20](http://github.com/thoughtbot/capybara-webkit/commit/9c02a2046101045e1eb51634e2982b9d8c5b74db "Fix logic for maxlength attribute on input nodes and add tests.Closes #131")) before releasing _version 0.6.1 of capybara-webkit_ ([64357e7](http://github.com/thoughtbot/capybara-webkit/commit/64357e75f31381da03b999e4af6316eaeb4efdc3 "Bump version to 0.6.1")).

## dotfiles

Our collection of user configuration files, [dotfiles](https://github.com/thoughtbot/dotfiles), saw a collection of tmux configurations ([acbf0b3](http://github.com/thoughtbot/dotfiles/commit/acbf0b3f320b2d701ab8bd2c02f7bc30fb838f41 "Merge pull request #4 from croaky/master. Added basic tmux configuration")) from Dan Croak ([croaky](http://github.com/croaky)).

## bourbon

Two changes to the [bourbon](https://github.com/thoughtbot/bourbon) Sass mixins this week: Chad Mazzola ([ubuwaits](http://github.com/ubuwaits)) spruced up the `shiny` button style and switched to RGB from HSL ([d10e01a](http://github.com/thoughtbot/bourbon/commit/d10e01afb938a87314f42a90e09250edc98eb13d "Improved ")) while Phil LaPier ([plapier](http://github.com/plapier)) fixed the `$ease-in-quart` timing function's value ([f17b303](http://github.com/thoughtbot/bourbon/commit/f17b303b162f3aa8d91cc54cb89d63c558bdaf17 "Fix incorrect timing function value")).

## this-week-in-open-source

Mike Burns ([mike-burns](http://github.com/mike-burns)) (me) wrote [this-week-in-open-source](https://github.com/thoughtbot/this-week-in-open-source), a very, very, quick hack to output these blog posts. It started in Haskell, moved on to shell, and ended up in Ruby. Now you can play along at home!

[^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)
