Hey! shoulda-context has a maintainer! His name is Travis Jeffery (travisjeffery) and he’s got commit rights and everything! Thank you, Travis.
One feature was added to cocaine over the past week: Daniel Mircea (viseztrance) made it such that you can now pass blank argument values (a2d01c4). For example, this now works:
command_line = Cocaine::CommandLine.new( "curl", "-X POST -d :data :url", :data => "", # Hey note this! :url => "http://localhost:9000", :swallow_stderr => false) puts command_line.command
…which will produce:
curl -X POST -d '' 'http://localhost:9000'
The paperclip project saw a few neat commits this week. Jeremy McNevin (jmcnevin) and ralph (ralph) pass the file type to Fog now, always (839b98c and 201f02e). Luke Griffiths (Sporky023), one of our new apprentices, got his first open source contribution in: you can pass an
:s3_encrypted option for controlling which encryption type S3 should use (65e0338 and af6d343). And Jon Yurek (jyurek) fixed mixing Paperclip with non-ActiveRecord codebases (bc6ed16).
The fixture replacement gem, factory_girl, is now at version 2.4.2 (845578c). It includes bug fixes, a deprecation, and more Rails support. All commits were by Joshua Clayton (joshuaclayton).
There was an issue where using an inline trait would cause it not to be reset (70a80fd), and an issue with the precedence of inline traits (065c6c1).
Josh also deprecated the
attributes_for class method, which once upon a time produced all the attributes that a factory would set (a883315). He provided no reliable workaround.
Today, Rails 3.2 was released, so we made sure to test against that—and it works! (5555f14)
A new release for capybara-webkit, yeay! Joe Ferris (jferris) cut the release (59ba861), first removing a long-standing debugging print statement (0bac05e).
Sweet features, bro: Yuri Gadow (ylg) added support for the fancy text inputs in HTML5 like email, number, search, and so on (7e5e99b).
John Barker (excepttheweasel) updated the README to point out that capybara-webkit does not, in fact, listen on port 8200 (2285621).
We have officially stopped maintaining the following open source products: limerick_rake, trout, shoulda-context, and jester. Do you want to take over any of them? Let us know!
The kumade Heroku deployer now has a rake task hook for running code before the deployment (8bd2824). This was done by Joshua Clayton (joshuaclayton) in the new version: 0.8.2 (52a9348).
The paul_revere notification gem has this sweet button to hide a notification. Ben Orenstein (r00k) changed the duration of this hiding from one day to one year (5a773d4).
Phil LaPier (plapier) has released version 1.3.1 of bourbon, the much-loved collection of sass mixins (e90113c). In this version we have a new syntax for animation shorthands, which means the old shorthands are deprecated (e6dcbf5, a6d3a32, 89cc340). Get it while it’s hot!
We have a gem that generates scopes for ActiveRecord objects, named pacecar, which you would love if you also love methods that magically appear. Matt Jankowski (mjankowski) released version 1.5.3 (06b5e8e) with support for Rails 3.1.3 and 3.0.11 (dcc30d4) and which treats decimals as numeric column types, giving you all the methods that you need for those, too (ff7bc67).
The oft-used paperclip file uploader gem hit version 2.5.0 (071c938) with a NEWS file describing the changes, written by Mike Burns (mike-burns). That’s me. I like writing about changes.
Jim Ryan (jimryan) changed paperclip to process any
:original style before all others, which can be useful in case order matters (f56e863 and d3db7a1).
Nathan Hyde gave us a performance gain by only generating the file’s fingerprint if it can be persisted (9fb9255 and 4e07681).
Alexander Greim (iltempo) landed a feature on us: S3 headers can be set at runtime by passing a block as the value of the headers instead of a static hash (a83de65 and 7a8d1e6).
Steve Madsen (sjmadsen) found an edge case where if you set an attachment, save it, set a new atachment, save it, then refresh the missing styles using the rake task, it will crash. And he fixed it (dc53432).
And Jon Yurek (jyurek) finally fixed
Paperclip::Attachment such that it no longer overrides the Ruby
hash method with an unrelated one (3fd4c96).
As usual, factory_girl got way more commits than I want to read over in one sitting. For example: Simone Carletti (weppos) added a ruby version dependency to the Gemspec (e6e4d8b). He also fixed the link to our blog (11a79a0 and 30e13dd).
Things like that.
So on the feature front, Evan Larkin (elarkin) made it such that factories still work if you define a class that overrides the
to_s class method (8b3ee85). Dmytrii Nagirniak (dnagir) added support for neo4j (5246fda and 591ec7a). Joshua Clayton (joshuaclayton) made it such that you can call methods that are on the object from within a factory definition (d918c1d).
More wishy-washily, Josh made a bunch of refactorings, the most important of which speeds up the whole product (f2e4138). You can read the rest of the refactorings as code with good commit messages: 2e2d490, 40242e9, 32ff41f, ac1df1d, a022dda, 1c7eab1, d9e0372, and b734b58.
The README was improved with the status of all the dependent gems (768dfaa), by Steve Richert (laserlemon). Daniel Schierbeck (dasch) fixed the formatting of sample code (1e82889).
In the end, Josh released version 2.4.0 (69957ea).
Matthew Mongeau (halogenandtoast) had fun taking in pull requests on capybara-webkit. Joe Fiorini (joefiorini) added the
requested_url method that produces the URL after a
pushState (7f907a0). Niklas Baumstark (niklasb) added
path methods (352823d, d07cf3d, 21f4b84, 83905bb, 4ceb874).
John Hume (duelinmarkers) added support for JRuby (0979db4). Pete Gieser (pgieser) fixed a double-escaping bug in URLs (fccb444).
Matthew Mongeau (halogenandtoast) fixed the link to the Capybara README (e2c103c) and linked to the mailing list (d8c640d), and Jo Liss (joliss) recommended
bundle exec in more places (7fe06e9).
Our authentication system aptly named clearance got some love from Chad Pytel (cpytel) and Joe Ferris (jferris), resulting in the release of clearance 0.14.0 (5471159, 214d1dd, and 0dc43a6). The big deal is that the
deny_access RSpec match and the flash messages were totally borked. They fixed it (2085f03, 23df300, and 160366e).
Version 0.1.1 of fake_braintree was released, in which Gabe Berke-Williams (gabebw) fixed a bug in the failure message for the
have_accessor_for matcher (9d97aa6) and also refactored everything (0a45900, 59a7b60, 3daf2aa, 0f955c6, 3e8745f, bb1f339, 6d7d90c, ac0d550, d2f470e, 3c66129, 8cf7d9c, 157b2a7, 8f21376, 29429ef, e4cef67, 9928436, 94cca24, 7bd4e20, 2dde9ed, e775167, a72e31b, 57f3623, d580024, ad82f0e, 3385e12, cacb537, ae86ebe, c6cead6, a352f33, f7a6cf5, 9f1fb3b, 124706d, ef8b13a, and b20e318).
Much of the work over the past week was done in paperclip, so now you can upload files to your Rails apps with more flare and style!
It now supports an option for keeping old files, so you can pass
has_attached_file and, when you destroy an attachment (
@user.avatar.destroy) it won’t actually delete the underlying files (345ec74). Many people find this useful for S3 storage, which hints that there may be a deeper problem elsewhere. This is thanks to Eike Bernhardt (teefax) but was originally written by Philippe Creux (pcreux).
Christoph Lupprich (kitto) saw a quick way to speed up the
#public_url method for Fog storage using AWS as the provider, so he did (989ec0e).
I’ve long wanted a migration helper, and Daniel Schierbeck (dasch) wrote it with some git cleanup from Alexey Mahotkin (693b528, b922111, f82c0d9, f3eacd2, e0a6732, ffbfc24, 500f1bb, b70ffbc, 65a6ae8). It looks like this:
class AddAvatarColumnsToUser < ActiveRecord::Migration def self.up change_table :users do |t| t.has_attached_file :avatar end end def self.down drop_attached_file :users, :avatar end end
There were also some important internal changes. For example, Prem Sichanugrist (sikachu) replaced the AWS::S3 gem with AWS::SDK (1df1b03, 81129ad, 88a8af9, 75f413d, 2cf7378). He called out AWS (amazonwebservices) and Trevor Rowe (trevorrowe) for helping, and John Joseph Bachir (jjb) updated the docs appropriately (308f1a0).
Prem also got Paperclip passing on Rubinius (001fd99).
In bug fixes, base URLs with a
? but no
= will produce Paperclip URLs using
? (128d664 and bb22be3). Prem thinks that’s the right behavior now, but it’s tricky to nail down.
Nick Padgett (npadgett) found an edgecase where we were calling
strip on a non-string object, sometimes, and fixed that (34913f1).
Dimitrij Denissenko (dim) handled the case where using the
:id_partition pattern in a URL or path pattern raises a
NoMethodError on an unsaved resource (ac82244). He and I are now enemies for life for his use of
Prem fixed another bug: if you have a path or URL pattern with
:class in it it will show a warning. He removed this warning (b4ff2c5).
Prem worked with Steve Richert (laserlemon) to show the Gemnasium results in the README (3e20907 and 777ac90), and Prem also updated the README to be more readable (adcd03c).
The fake credit card processor, fake_braintree, hit 0.0.6 (eed875e and 0934f1e) this week as Ben Orenstein (r00k) added support for discounted subscriptions (757c0aa) and Gabe Berke-Williams (gabebw) exposed the transactions that have run (8dde09c and ab93137).
Taking a stance on whether we play along with the little Open Directory Project game, suspenders now defaults to
NOODP on every page which, as Matt Jankowski (mjankowski) points out, tells Web crawlers to never bother looking for ODP details (6275d0f).
The sweet shoulda-matchers collection of RSpec matchers now has more accurate error messages for the
allow_value matcher (25c2623), thanks to Clemens Helm (clemenshelm). It uses the underlying internationalization information to generate this.
Another documentation update on bourbon as Phil LaPier (plapier) explained that multiple background images with shorthand notation are unsupported (798aa1c), after clarifying that multiple background images themselves have fancy comma-separated syntax (aa66831).
It was a refactoring week on 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). Then Gabe Berke-Williams (gabebw) went off on his own to introduce a
CommandLine class, wrapping Cocaine with some Thor (0c3840d and 72424c0). Meanwhile Joshua Clayton (joshuaclayton) changed
should_not have_received to
should have_received.never (6652197).
Our app making gem, suspenders, saw some updates from Matt Jankowski (mjankowski): Rails 3.1 (10ac09a, 97881fc, 354321d, c8f8c85, and db08366), bourbon (d490b36), flutie (e0bab83), the Hoptoad → Airbrake name change (6def3d7), and tying together the asset pipeline (a4ce3e7 and c760a33).
We have a one-off announcement plugin for Rails, named paul_revere. Nick Quaranto (qrush) released version 0.2.1 (3574b40 and dfbf940).
Our collection of RSpec matchers, shoulda-matchers, is not passing on my laptop. Prem Sichanugrist (sikachu) built out the continuous integration tests more to attempt to clarify the issue (3d94390, 4450c86, 1a3aeec, 6785f59, f1f5e6d).
The SCSS gem, bourbon, saw actual words being used by Matt Jankowski (mjankowski) in the documentation (b8afdea), plus Phil LaPier (plapier) updated the docs with resources for investigating browser compatibility (35539c9). He also added this sweet variable,
$all-text-inputs, representing all HTML5 textual inputs like color, date, phone, password, URL, and so on (d1def76 and fb299e6). To wrap it all up he released version 0.1.8 (f3046bd).
Lots of bug fixes in paperclip, the Rails image uploader plugin gem, this week. Cody Caughlan (ruckus) added S3 support for an HTTP proxy (4661cef). Denis Yagofarov (denyago) preserved the path set for the Cocaine gem (3a35ba9). Aditya Sanghi (asanghi) gave us a warning when two models save files to the same place on the filesystem (8d43e19). Daniel Evans (danielevans) removes the temporary file after it has been uploaded and processed (748332e). Edison (edison) added a feature where you can set the file system path based on a method in the model (996ca87 and 1738f3c).
Prem Sichanugrist (sikachu) then attacked some outstanding bugs: escape the URL (23cb822), handle a space leak where an array was growing by one for each request (d18d814), make the
Interpolations.hash class method confirm to the expected signature for
hash methods (e526c86), and preserve the filename for S3 attachments when we know the filename (522a53e).
Prem then did some refactoring, splitting the storage tests into individual unit tests (0ca98d1, d204c7d, 31d74d6), stubbing Cocaine (0a77f64), removing some noisy debugging (fd891e0), and cleaning up whitespace (825e1f1 and b2cac53). After all of this he released version 2.4.2 (9edeb01).
Features and refactorings were the name of the game for factory_girl, 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 and f8638b). Joe Ferris (jferris) made callbacks into first-class objects with validations (0f87ca3, ede051f, and 4d30663). Thomas Walpole (twalpole) fixed an inconsistency, ensuring that parent callbacks are called before child callbacks (27c4b21).
Oh man check this: Joel Meador (janxious) updated the ChangeLog (306e51b and 88cf88)! Joshua Clayton (joshuaclayton) went along with this, too (9c95a2) before releasing version 2.1.2 (58e75bc and c1360e).
The capybara-webkit test driver, which Joe presented about at Boston Ruby, continues to improve. Gabe Berke-Williams (gabebw) gave us a documentation edit (f493b22), while Matthew Mongeau (halogenandtoast) striped and normalized spaces for consistency with Selenium (6d92f35) and also added support for unknown content types (ff0a6e7, 9257fe3, and 353fe86)
Lots and lots of changes to kumade this week!
Gabe Berke-Williams (gabebw - that’s me!) cleaned up the code a bit (afb29cf, fda26ee, 39c0a32, 7e255bf, and 75403a7).
I switched the order of arguments to
Git#initialize to match the rest of the gem
I made a couple of minor changes to the specs
And, of course, some README fixes (1d40e91 and
I merged Marcos Tapajós’ (tapajos) pull request removing sample output, since it’s rapidly outdated (4d2b13e).
Marcos also fixed an issue where the deploy branch wasn’t deleted if the deploy failed (ba8a264). He also added Cocaine, thoughtbot’s CLI wrapper, to fix the problem of printing output to the terminal (866f946).
Harold Giménez (hgimenez) ensured good code quality and removed some mocks (bdbb486 and 28f79b2). I learned that begin/ensure will re-raise an error after the ensure block runs, while begin/rescue/end will swallow the error. Harold always brings the knowledge.
Jon Yurek (jyurek) added an awesome feature: automatic detection of an application’s stack (6bd53af and b65ca45). As of version 0.3.0, Marcos Tapajós (tapajos) removed the -c option (fbdb609) since kumade now autodetects the current stack. Jon also noticed that Travis CI doesn’t have 1.8.7-p249 and removed it (8e94343).
Joshua Clayton (joshuaclayton) sprang into action and renamed
He also made kumade use autoload (c01085e). You can read more about autoload here.
Kumade development is happening fast, but that doesn’t mean you shouldn’t contribute! The fast pace means that most pull requests will get a response within a day, so whether it’s documentation or a new module, send in your changes!
Mike Burns (mike-burns) updated suspenders for Rails 3.1.0 this week.
jQuery is part of Rails 3.1.0, so he removed it (be26211).
Suspenders now uses the
--database option to generate a Postgres database.yml (94010c2).
You can read more about the
--database option at the Rails command line guide.
And finally, with Rails 3.1.0 in the Gemfile (3f06a65), we’re all set for Rails 3.1.0!
Matt Jankowski (mjankowski) worked on paul_revere, our “one off” announcement plugin. It’s now tested against Rails 3.0.10 and 3.1.0 (31bdfdd). He also converted the tests from Test::Unit to RSpec in commit 447808d, certainly a welcome change.
Mike Burns (mike-burns) told shoulda-matchers bug reporters where to stick it (0a70502).
bourbon, our set of vanilla Sass mixins, got some love this week.
Chris Lloyd (chrislloyd) removed some Bourbon mixins that wrote Sass into files, which also fixed some @import problems with Rails 3.1 (3c3ffcd).
Jeremy Raines (jraines) added documentation on using Bourbon outside of rails (5e005b9).
Our very own Phil LaPier (plapier) released version 0.1.6 (da56992) and then version 0.1.7 the next day (7afb43c). He also updated the readme.md (a lowercase filename, in a bold departure from the thoughtbot standard) (ea553ba).
And Matt Jankowski (mjankowski) has zero tolerance for made-up words (74b4450).
Matt Jankowski (mjankowski) converted high_voltage’s test to RSpec (4925fd5). (cdfa644) He updated the gem authors as well (7a110f5). The tests now run using an in-memory SQLite database (a689718). And the Rails 3.1 love continues with 3.1 tests using appraisal 4dd575d) and a version bump to 1.0.
Matt Jankowski (mjankowski) updated pacecar for Rails 3.1 (commit list) and updated the factories to use Factory Girl 2.0’s hot new syntax (f9ce3e5).
Matt Jankowski (mjankowski) did a bunch of work on flutie. He added appraisal (90aad4a) and body_class and page_title helpers (commit list). He also added a fix for Rails 3.1 stylesheet expansions (92718a0), and followed that up with a version bump to 1.2.5 (f70068e).
Matt also fixed flutie to run on Rails 3.1.0 this week. It now correctly uses the Rails 3.1 asset pipeline (commit list). Get version 1.3.1 while it’s hot!
paperclip had a good amount of activity this week.
Gabe Berke-Williams (gabebw - me again!) fixed a typo (ae781ac).
Prem Sichanugrist (sikachu) bumped the version to 2.4.1. This version brings a basic integration test (3131601), interoperability with Factory Girl 2.0 (d639d5e), removal of a duplicate test (cb6efaa), and set the logger to a Railsy logger if in Rails (37385dd).
Chris Oliver and Prem Sichanugrist fixed an incorrect option that was being passed to
Gabe Berke-Williams (gabebw - me again!) made some documentation fixes to factory_girl (4d4b5d9 and db82ccc).
Stephan Eckardt and Josh Clayton added
FactoryGirl.modify, which allows you to re-open defined Factories
(14b8245). This can be helpful when dealing with vendor-supplied factories, like from a gem.
Joshua Clayton (joshuaclayton) bumped FactoryGirl to 2.1.0 (386848d).
He also committed code to assign created_at for stubbed models (00503ee).
One very nice addition is
FactoryGirl.reload, which clears all
defined factories and then reloads definitions (3798144).
Finally, Josh fixed up the documentation (661e8ff, 370d8a6, 7fd7d95, 1f0e2eb, 9bacd0c, and 0529a87)
Dan Croak (croaky) fixed up the thoughtbot dotfiles and made tmux announce itself as a 256-color terminal so that Vim color schemes look breathtakingly vibrant (dc4c65e).
Our own Dan Croak (croaky) changed clearance to put more dependencies in the gemspec (90ca670).
Mike Burns (mike-burns) added
group support to appraisal (1df64a1).
Joshua Clayton (joshuaclayton) worked on factory_girl_rails, bumping the version to 1.2.0 (c7d54d2) and updating its dependency to factory_girl 2.1.0 (5518b91).