giant robots smashing into other giant robots

We are thoughtbot, a web design and development agency in Boston, MA.

Tagged:

Comments (View)

This week in open source

copycopter_client

Our little copycopter_client library, which talks to the amazing Copycopter app (which, in my opinion, is the best thing since sliced bread), got some infrastructure cleanup from Gabe Berke-Williams (gabebw) around themes like Travis CI (91ac190) and bundler (612fc4e), plus sorting the blurbs (500dac7). Chris Hunt (huntca) swooped in with the ability to export to YAML (7d44323, 77b28bb, cf951f1, 2955575), booyah!

factory_girl

Version 2.6.0 of factory_girl is out (2d19c46), with work by Joshua Clayton (joshuaclayton). The docs got an update, including an example of how to create a has_many association factory easily (9c6c252). The new :method option has been renamed to :strategy, following thoughtbot’s recent obsession with design patterns (791591b).

capybara-webkit

Marching right along, capybara-webkit version 0.10.0 is out (6d37e48). Marc Schwieterman (marcisme) added a current_url method (caa86b7 and 5eacd08) and reset! method (eaec979). Igor Zubkov (biow0lf) fixed some specs (9eb8e55)! Matthew Mongeau (halogenandtoast) abstracted out the make, qmake, and spec paths into environment variables (4a6b766). Jason Petersen (jasonmp85) fixed a bug where select_option and unselect_option methods were mutating the underlying HTML in ways the W3C were very unhappy with (2fef844 and acd6e47).

appraisal

Our wonderful little appraisal gem got a documentation patch from Kate Gengler (kategengler) explaining that the Appraisals file must be named Appraisals (adec57d). Ryan Bigg (radar) added the option of loading the Gemfile from an environment variable, BUNDLE_GEMFILE (e41fdfc). Prem Sichanugrist (sikachu) released version 0.4.1 (4da9c66).

clearance

Despite the lack of a release this week, Dan Croak (croaky) put clearance on Travis CI (3430e88 and 91674c6).

bourbon

Neat improvements for bourbon, as always. Gabe Berke-Williams (gabebw) fixed Ruby 1.8 support (45f6806). Frank (frankzilla) added clearfix (df3b82c, ac172bc, 980035c, and a1825ee). Patrick Bougie (pbougie) fixed border-radius for older Mozilla (f734db4). Kyle Fiedler (kylefiedler) added a flexible grid (0db24f5, 2bb0f63). Thibaut (Thibaut) fixed a bug in the box shadows (60292da).

diesel

Infrastructural changes to diesel this week, as Prem Sichanugrist (sikachu) made it work with the latest version of Rails, trimmed its dependencies down, and fixed it on Travis CI (6481f8f, 2dc7427, caadb84, 183762d, af52bbb, 5f57595, 4f115e9, bb4e627).

paperclip

It was bug fix week in paperclip land, as we wage on in the constant battle to keep the Issues count at 0. Prem Sichanugrist (sikachu) made sure we check for class_attribute before calling it, fixing a problem in one specific verion of Rails (4b79530); handled the case where the S3 object does not exist (56012bf); found and fixed a case where the style name was not a symbol (9ad074a); and cleared off an annoying warning from a redefined constant in the test suite (7045e29). Chris Apolzon (apolzon) meanwhile fixed a bug where stderr was leaking out in undesired ways (58671eb).

Tagged:

Comments (View)

This week in open source

bourbon

Over the past week bourbon went up to version 1.3.5. A whole bunch of sweet new features are in it now:

Frank (frankzilla) added a modular-scale mixin, of which the golden-ratio mixin is but one implementation (126a83b and 96659a2). He also added a parameterized fallback color to linear-gradient (60e2c63).

Phil LaPier (plapier) worked with Gabe Berke-Williams (gabebw) on a bourbon command-line too for working with Sass outside of a Rails app, such as Jekyll, WordPress, or even a static site (ad1499b, b55a763, 0ebf906, c2077d8, 13e70d3, 2fc2c90, and bf34e70). You can run bourbon install to install it and bourbon update to update an existing installation.

capybara-webkit

A careful sleuth has updated the documentation for capybara-webkit this week. Marc Schwieterman (marcisme) discovered that a fully passing test suite depends on ImageMagick, and documented as much in the contributions guide (df39268).

factory_girl

Version 2.5.0 of factory_girl is out, and there’s a badass new feature in it. But first:

Joshua Clayton (joshuaclayton) fixed a bug where the :parent’s factory wasn’t being passed along (4aecfff). Carlos Antonio da Silva (carlosantoniodasilva) fixed the URLs in the readme to point to correct locations (aa74edd and 42f5a10).

Oh, and you may remember from last week that Josh deprecated the attributes_for method admist much controversy. Well, he undid that (2d6adfd).

Josh then implemented a feature that Joe Ferris (jferris), FactoryGirl’s originator, has wanted for years: you can specify how FactoryGirl should construct the class (5780364). Joe excitedly documented this (ea89aad). This means that FactoryGirl can be used for non-ActiveRecord classes, including immutable classes.

paperclip

In accordance to our new gem schedule, paperclip hit 2.5.1 this week. Mike Burns (mike-burns) cut the release, adding a ChangeLog and updating the NEWS file (b7f9b6f and ec4793e). In short: Fog storage is passed the content type, S3 can be encrypted, and ActiveRecord is optional.

Tagged:

Comments (View)

This week in open source

shoulda-context

Hey! shoulda-context has a maintainer! His name is Travis Jeffery (travisjeffery) and he’s got commit rights and everything! Thank you, Travis.

Yeah!

cocaine

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'

paperclip

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).

factory_girl

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)

capybara-webkit

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).

Tagged:

Comments (View)

This week in open source

paperclip

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 :keep_old_files to 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 nil.

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).

fake_braintree

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).

suspenders

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).

shoulda-matchers

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.

bourbon

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).

Tagged:

Comments (View)

This week in open source

Few commits over the past week. We’ve been hard at work on refactorings and larger features (plus client work), so keep your eyes peeled for the amazing commits we pull from you (yes, you!) in coming weeks.

suspenders

Commits on suspenders this week bring us instructions on how to use the app with Heroku (257ea39 and 5a4c257), revised documentation “that is awesome, not terrible” (c5ba370), and a bug fix on Heroku: specifying the environment can sometimes raise an error (b45e57f)—all thanks to our Dan Croak (croaky). Brooke McKim (brookemckim) updated the docs to reflect that Hoptoad is now named Airbrake (8b5216e).

paperclip

A tiny but important change to paperclip this week from Abel Martin (abelmartin): he documented how to use the Paperclip test helpers from Test::Unit (9d7b0dc, e8d5331, and 5f3b88d).

factory_girl

For the first week ever factory_girl saw one tiny refactoring and no new features. Joshua “The Refactorer” Clayton (joshuaclayton) cleaned up the stub proxy—the build stategy that is invoked when you use FactoryGirl.build_stubbed—by completely removing the constructor and delaying the actual construction of the stub object (8ce897f). This is part of a larger refactoring he is doing.

capybara-webkit

Some peace and quiet on capybara-webkit this week, when Joe Ferris (jferris) removed some stray print-debugging and general Ruby whining (5adab74).

dotfiles

Dan Croak (croaky) dedicated some time to our dotfiles over the week, improving documentation on how to use and upgrade it (87685f1 and 326ceb4), organizing and adding shell aliases for working with Heroku (352dcad, 6458ae7, and cbea59b), and deciding that the Github color scheme is better than the vividchalk color scheme in vim (de071e9).