giant robots smashing into other giant robots

Written by thoughtbot

lolconomy

This week in open source

bourbon

As a programmer I love the change that made it into version 1.3.6 (10f978d) of bourbon: Phil LaPier (plapier) added to work done by Frank (frankzilla) to add a monospaced font family, $monospace—with support for Bitstream Vera Sans Mono, my favorite monospace typeface (3467fe3 and c86e5687). Nice.

paperclip

Friday saw a new release of paperclip (1cb40e3), in accordance with the prophecy. It contains Windows support, a bug fix, and two new features.

Prem Sichanugrist (sikachu) has been working on handling characters that are not URL-safe; to this end he added a :restricted_characters option to has_attached_file, with a default value of &$+,\/:;=?@<>\[\]\{\}\|\\\^~%# , which specifies characters to replace with an underscore, _ (8353518 and 604304e). Benjamin Hüttinger (maxigs) added the ability to pass a block, evaluated at runtime, for :fog_host, :bucket_name, and :fog_credential options (e049ec5, 2b562a9, 8742615, and 1c88a72).

The gem itself had problems installing on Windows because a bundled test made sure that filenames with question marks were handled fine; turns out this simply breaks on Windows. Even though no actual programmers use Windows, we removed the offending file (ed5cd9f). Jon Yurek (jyurek) fixed a long-standing bug where the RSpec matchers (validate_attachment_content_type, validate_attachment_presence, and validate_attachment_size) didn’t handle the :if argument they were supposed to handle (5d4ba62).

capybara-webkit

A new release of capybara-webkit is in the works, and this is what you’ll see in it: Matthew Mongeau (halogenandtoast) added the ability to trigger mousedown and mouseup events (51c4dfe and 16c1637) while Joe Ferris (jferris) has commands block until the page finishes loading (18607d0).

clearance

Oh sweet, a new version of clearance is out (6c0c070)! In it you’ll find support for Rails 3.2 from Gabe Berke-Williams (gabebw), mostly in following deprecation warnings (6e57d10). Some prodding from Matthew Daubert (MDaubs) prompted us to upgrade cucumber-rails to 1.1.1 (691e867 and 91f4675). Dan Hodge (danhodge) dropped a totally awesome change on us, abstracting out the User class into Clearance.configuration.user_model, which can be changed at runtime (085a9b6, a582eec, and fc6af70). Dude, that’s awesome.

fake_braintree

Holy cow it’s version 0.2.0 of fake_braintree (0be2aea). In this Gabe Berke-Williams (gabebw) gave us the ability to specify a constant amount for a transaction (783719c), and mimics the behavior around customers with failing credit cards (a2ceb58).

factory_girl

No big news in factory_girl this week. Carlos Antonio da Silva (carlosantoniodasilva) updated the docs to mention that .stub is now .build_stubbed (08018f6). Michael Klishin (michaelklishin) fixed the build on Travis CI for Rails 3.2 by updating rubygems first (850116d). Joshua Clayton (joshuaclayton) found a spec that was not appropriately named, and fixed it (0d67a42).

kumade

While kumade did not see a deploy this week, it did see some feature improvements, some of which come with an API change.

The hook for running code just before deployment was originally run_predeploy_task but is now run_pre_deploy_task (764aebe). Chad Boyd (hoverlover) made this change so he could introduce the run_post_deploy_task, which is further exposed as kumade:post_deploy to Rake (da74087, f68a487, and 9679018).

Kumade now works with more stuff: Jammit 0.6.5 (ec63310) thanks to Vesa Vänskä (vesan), and Ruby 1.9.3 (8e73b90) thanks to Gabe Berke-Williams (gabebw).

Gabe also fiddled with some source code (7e0e11e, bb695b9 and 92aa8f4).

copycopter_client

A small documentation update occured in copycopter_client by Joe Ferris (jferris), reminding us that you can leave the name of the controller or model off of the translation key only when using t from a view (6416897).

lolconomy

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.

theinterstellarmedium2

Designer Tools

In addition to the basic development environment everyone at thoughtbot works with, there are a number of other apps most of the designers here use to keep our work flows efficient and our skills top notch. When I came to thoughtbot as an apprentice a little over three months ago, I was exposed to a variety of new apps that greatly improved my work-flow, so I thought I would share with you some of the apps I open up every morning and a bit on how I use them.

The basics

These apps are not necessarily design-specific apps but they are so essential in our day to day work-flows that I couldn’t leave them out.

  • Propane: Chat client for 37Signals’ Campfire. This is an indispensable communication tool.
  • Growl: Notifications for anything and everything. Used primarily for Campfire notifications.
  • iTerm: Terminal emulation for OSX. Mostly beneficial for it’s ability to open multiple windows in tabs.
  • MacVim: Text editing. If you’re not already using Vim, take the time to start learning. It will greatly speed up your development time and if you’re working with developers who use Vim it will make pairing easier.
  • Divvy: Helps you keep your screens and windows spaced, aligned and organized efficiently without clicking and dragging all day.

Adobe

If you work on the web I am sure you are already familiar with the typical Adobe software that web designers use, so Im not going to get into the details of our Adobe setups here. Most of us prefer to do hand sketches/whiteboarding and move into wire framing with HTML and CSS as soon as possible any way. Static mock-ups tend to have a host of draw backs when working in an agile development process. That said, photoshop, illustrator and fireworks are still our workhorses when it comes to specific graphic design needs.

Skitch

A handy screen capturing tool that allows you to very easily draw and add notes on top of your screen shots, without having to open up photoshop or some other image editing tool.

Cloud App

Collaboration and iteration are key ingredients in doing great work and I have found this app to be an effective way of sharing screen shots with team members, clients and other designers so I can get that valuable feedback on the development of my work. When you take screen shot Cloud app automatically uploads your image to web servers and in a drop-down from the Cloud app icon in the OSX menu bar, provides you with a sharable link to that image.

Notational Velocity

Good for general note taking and the keeping of VIM and Git cheat-sheets. Especially if you are new to VIM or Git keeping track of commands and remembering how to get certain things done right can be quite challenging, so we all suggest building up robust cheat-sheets with this little app.

FontCase or FontExplorer X

Great typography is a fundamental element of great design. Managing your fonts effectively will help you find that perfect type-face faster and reduce the time it takes to get started with a solid visual design direction. Taking the time to organise your typefaces in a way that is meaningful to you can also be a good way of curating your collection and more intimately familiarizing your self with the fonts in it.

Little Snapper or Gimme Bar

Both are awesome tools for building a personally curated library of design inspiration. Saving images and examples of the things that inspire you is a great way to refine and hone your own personal style and also a great way to help kick off the visual direction for a new project. If you are not using tools like these already, start. It will be hugely beneficial to the quality of work you do.

Hues

A great little app for grabbing colors from anywhere on your screen. It provides rgb, hsl, and hex values for any color you select which makes pulling color pallets from photos and images you have stashed in your Gimme Bar or Little Snapper quite nice.

Bourbon

Bourbon is not an app, it’s a library of SASS mixins and functions that greatly speed up front-end development time. It is just as awesome for new comers to .css/.scss as it is for the most seasoned pros. It’s also one of the main reasons the sketch-to-html&css-wire frames process has proven to be so effective and efficient for us. We have extensively written about bourbon before.

So that’s it for a light-weight overview of the apps I find my self opening on a daily basis. Hopefully I have introduced you to some new and useful tools. I’d also love to hear about some of the tools your using, so feel free to add your comments below!

lolconomy

This week in open source

Deprecations

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!

kumade

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

paul_revere

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

bourbon

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!

pacecar

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

paperclip

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

factory_girl

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

capybara-webkit

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

clearance

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

fake_braintree

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

lolconomy

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