This week in open source

Mike Burns

bourbon

One change to bourbon this week as Thibaut (Thibaut) removed the obsolete -moz-inline-block display type from the inline-block mixin (de69a76).

capybara-webkit

Version 0.10.1 of capybara-webkit is out (8f2cdef). Matthew Mongeau (halogenandtoast) made it such that Swedes can install it on Måndag (1a28da8), Marc Schwieterman (marcisme) improved the generate_command rake task to also handle the CommandFactory.cpp (c15cd3a), and Joe Ferris (jferris) updated the link to our QT docs (a4fcb8e).

cocaine

On cocaine, which is a hell of a gem, Alban Peignier (albanpeignier) exposed the command’s exit status (bfe0ba6).

factory_bot1

Added to factory_bot this week, though written two weeks ago, Joshua Clayton (joshuaclayton) replaced the AssociationRunner with what he calls the FactoryRunner, which can run any strategy (4145a6e).

On the factorybotrails side, Joshua Flanagan (joshuaflanagan) added support for namespaced models, e.g. Article::Comment ([7df9c9b](http://github.com/thoughtbot/factorybotrails/commit/7df9c9b13a41f3410d979032aaff6831397f2c6f “Respect model namespaces when generating factories.

The factory name for the model Namespaced::User wil be :namespaced_user. The :class option is specified as a string to prevent class reloading issues.

Addresses GH-44”))

kumade

In kumade this week Gabe Berke-Williams (gabebw) fixed a completely broken rake task (43ea8b8), discovered that && reads more nicely than and (50b8102), and removed the Gemfile.lock because everyone hated it (278c8bf). SengMing Tan (tansengming) changed the command-line program to produce false when the deployment fails, which means you can use it in more scripts (7e37d61). Klaus Hartl (carhartl) fixed a bug with cedar, where restarting the app didn’t work (07e30d4).

paperclip

As usual, a bunch of bugfixes and functionality made it into paperclip this week. Keep those pull requests coming!

Prem Sichanugrist (sikachu) removed deprecated methods, which means you should watch for a major version bump soon. How exciting! ([defd425](http://github.com/thoughtbot/paperclip/commit/defd4259f293d3694f65494a0a78999a6ce263ba “Remove all the deprecated method

We") and [9e38958](http://github.com/thoughtbot/paperclip/commit/9e389588740c04bd682704cfc835f428f624b7cf "Remove obsolete `aws/s3` stuff

AWS::S3::Base.establish_connection! is not on the aws/sdk, and this code doesn”)). He and Gabe Berke-Williams (gabebw) updated the README with stylistic and some content improvements (4e4fa9d and [5dba614](http://github.com/thoughtbot/paperclip/commit/5dba614c0bac6fa1a45690000a7c23b14ccdbf62 “Update README

Fixes #723”)). Prem also fixed a bug where an RSpec matcher would run the post processing; that’s wild ([0efa384](http://github.com/thoughtbot/paperclip/commit/0efa3843164158df669497e6f12ce5a80ea368f1 “Skip post processing on the size matcher

Fixes #646”)).

Robert Pankowecki (paneq) improved the docs to show how to conditionally skip post processing (49ddd12). Jesse Cantara rewinds files after Paperclip is done with them, before handing them back to the user (7cb7384). Beachbc (beachbc) passed S3 creds as a lambda ([b89044f](http://github.com/thoughtbot/paperclip/commit/b89044fe49ca66d538b143b6f998cbc31bb36c34 “Added tests for passing S3 credentials as a proc.

Fixes #738")), and Joshua Clayton ([joshuaclayton](http://github.com/joshuaclayton)) added a `:s3_url_options` option, which can be either a hash or a lambda that produces a hash, that allows the user to augment the image URL with params, but only if the image is stored in S3 ([ { :response_content_disposition => 'inline' }

Additionally, you can pass a lambda and it’ll be evaluated when the URL is generated. If, for example, the content type is incorrect in Amazon (either empty or application/octet-stream), you can effectively cast the response from Amazon as a particular content type.

has_attached_file :avatar,
:s3_url_options => lambda {|model| { :response_content_type => model.avatar_content_type } }">f7284b9](http://github.com/thoughtbot/paperclip/commit/f7284b9e497a326a5f8e5c02716a560958644e5b "Pass aditional parameters to S3 expiring urls

This adds functionality to add additional params to the querystring for S3 expiring URLs. The reason for this is if you want to override responsecontenttype or responsecontentdisposition with expiring URLs, you have to change Amazon”)). Josh, while making the aforementioned change, noticed that we were using shoulda oddly (!), so he moved the method definitions out from the contexts (e64021e).

shoulda

Speaking of shoulda, version 3.0.1 is out, without any packaging issues (62f5b82); this was discovered and fixed by Prem Sichanugrist (sikachu). Prem also dropped Rubinius 2.0 support for shoulda-matchers 94dbf74). Blake Thomson (thomsbg) added a validates_confirmation_of matcher (1b5fc27c); Raphaël emourgeon (osaris) expanded the have_sent_email matcher to understand reply_to (cabe44c7); and Sylvestre Mergulhao (mergulhao) fixed the allow_mass_assignment_of_matcher documentation to be copy-pasteable (3a75c687).

Project name history can be found here.


  1. Looking for FactoryGirl? The library was renamed in 2017.