---
title: Nearby In Open Source
teaser: Thank you to those who build atop our open source.
tags: web,open source
author: Mike Burns
published_on: 2011-11-11
---

We have a weekly blog post on the state of our gems, which we affectionately
call "This Week in Open Source". My favorite part about it (the reason I
started it!) is that we get to thank the contributors publicly and officially.

Today I'd like to expand the thanks just a tiny bit: I'd like to thank people
who are building on top of our open source work, extending it beyond our
dreams. While I'm at it, I'd also like to highlight some of the non-thoughtbot
open source work we build. I call this &hellip; **Nearby in Open
Source**.

## capybara-screenshot

Matthew O'Riordan ([mattheworiordan](https://github.com/mattheworiordan/)) built
on top of [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) to
give the world
[capybara-screenshot](https://github.com/mattheworiordan/capybara-screenshot).
It's pretty slick: any time you have a capybara test failure, it saves a
screenshot of the headless browser.

Installation is simple; toss this in your app's `Gemfile`:

    group :test do
      gem 'capybara-screenshot'
    end

... and that's it. It saves screenshots away in `tmp/capybara`. The
simplicity is beautiful.

So give it a try and maybe send him a pull request or a follow.

## `delayed_paperclip`

Jesse Storimer ([jstorimer](https://github.com/jstorimer)), from all the way up
in Ottawa, figured out how to process Paperclip attachments in the background
using DelayedJob or Resque. He packaged it all together as
[delayed_paperclip](https://github.com/jstorimer/delayed_paperclip), and it's
the way to go for delaying Paperclip processing. It even works with S3.

It's a little trickier than capybara-screenshot to get running, due to the
nature of the beast. But it's also well-documented in [the
README](https://github.com/jstorimer/delayed_paperclip/blob/master/README.textile).

In your `Gemfile` add `delayed_paperclip`:

    gem 'paperclip'
    gem 'delayed_paperclip'
    gem 'resque'

You must also have [Resque](https://github.com/defunkt/resque) (or
[DJ](https://github.com/tobi/delayed_job)) configured and running
properly.

To have things function more smoothly you should add an `attachment_processing`
boolean to your database table. Like this:

    ./script/rails g migration add_avatar_processing_to_users avatar_processing:boolean

In your model you need to explicitly state that the attachment is to be
processed in the background:

```ruby
class User < ActiveRecord::Base
  has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }

  process_in_background :avatar
end
```

And there you go; background processing for your Paperclip uploads. Thanks,
Jesse!

## mongoid-paperclip

Speaking of Paperclip, Michael van Rooijen
([meskyanichi](https://github.com/meskyanichi)) of The Netherlands figured out
how to use MongoDB to store file upload data. He's named this solution
[mongoid-paperclip](https://github.com/meskyanichi/mongoid-paperclip).

The set up is straight-forward. In your `Gemfile`:

    gem 'mongoid-paperclip', :require => 'mongoid_paperclip'

And in your model, where normally you would use `has_attached_file`, instead
use `has_mongoid_attached_file`:

    class User
      include Mongoid::Document
      include Mongoid::Paperclip

      has_mongoid_attached_file :avatar
    end

## We hack code too

Speaking of having things to share, we coders at thoughtbot are also coders
outside of thoughtbot. Here's a quicker summary of some sweet hacks we've
rocked:

## Nick Quaranto

Nick is [qrush](https://github.com/qrush) on GitHub. Follow him if
you like these things:

<dl>
  <dt><a href="https://github.com/gitready/gitready">gitready</a></dt>
  <dd>A bunch of tips for using git.</dd>
  <dt><a href="https://github.com/rubygems/contribute">rubygems.org</a></dt>
  <dd>
    Some central storage Web site for gems. [You
    might have heard of it](https://rubygems.org/).
  </dd>
  <dt><a href="https://github.com/qrush/danger_danger">danger_danger</a></dt>
  <dd>
    A sample Web site, mixing Rails with high_voltage. He
    wrote <a href="https://thoughtbot.com/blog/post/11744619917/danger-danger-high-voltage-use-rails-3-1-for-static">a
    blog post</a>
    about this.
  </dd>
  <dt><a href="https://github.com/qrush/counter">counter</a></dt>
  <dd>A tool to help score a game of Carcassonne.</dd>
</dl>

## Jason Morrison

Jason is [jasonm](https://github.com/jasonm) on GitHub. Maybe these
tickle your fancy:

Sample apps:

<dl>
  <dt><a href="https://github.com/jasonm/backbone_sync-rails">backbone_sync-rails</a></dt>
  <dd>A spike of a WebSockets-based, instant feedback, Rails and Backbone app.</dd>
  <dt><a href="https://github.com/jasonm/chat_app">chat_app</a></dt>
  <dd>A chat app showing how to mix Backbone, Cucumber, and Jasmine.</dd>
</dl>

Presentations:

<dl>
  <dt><a href="https://github.com/jasonm/backbone-js-on-rails-talk/tree/gh-pages">backbone-js-on-rails-talk</a></dt>
  <dd>A talk on mixing Backbone and Rails, delivered at <a href="http://nhruby.org/2011/09/18/september-2011-meetup-backbonejs.html">NH.rb</a>
  and Boston.rb last month.</dd>
  <dt><a href="https://github.com/jasonm/backbone-front-end-presentation/tree/gh-pages">backbone-front-end-presentation</a></dt>
  <dd>A talk on using Backbone, delivered at the [Boston Frontend Developers](http://www.meetup.com/Boston-Frontend-Developers/events/37125612/)
  meetup.</dd>
</dl>

## Ben Orenstein

Ben is the amusingly-named [r00k](https://github.com/r00k) on GitHub.
Two things in the past month, both related to his mouth:

<dl>
  <dt><a href="https://github.com/r00k/talk_notes">talk_notes</a></dt>
  <dd>Notes from his talk on Vim for Rails, which he gave both at
  <a href="http://en.oreilly.com/rails2010/public/schedule/speaker/61001">RailsConf
  2010</a> and at <a href="https://thoughtbot.com/blog/post/10695356836/boston-vim-meetup">the
  first Boston Vim meetup</a>.</dd>
  <dt><a href="https://github.com/r00k/dtx_site">dtx_site</a></dt>
  <dd>The Web site for <a href="http://www.downtowncrossingquartet.com/">the
  quartet in which he sings</a>.</dd>
</dl>

## Chad Pytel

Chad, or [cpytel](https://github.com/cpytel) as we like to call him,
had one talk-related repo last month:

<dl>
  <dt><a href="https://github.com/cpytel/fowa-backbone">fowa-backbone</a></dt>
  <dd>A talk on Backbone delivered at the Future of Web Apps in London.</dd>
</dl>

## Gabe Berke-Williams

Gabe, with his long name and all, can be followed as
[gabebw](https://github.com/gabebw) on GitHub. Here's some chat-related stuff
he's done in the past month:

<dl>
  <dt><a href="https://github.com/gabebw/chat_stew">chat_stew</a></dt>
  <dd>An Adium log parser.</dd>
  <dt><a href="https://github.com/gabebw/pidgin2adium">pidgin2adium</a></dt>
  <dd>A tool for importing pidgin logs into Adium.</dd>
  <dt><a href="https://github.com/gabebw/memetron">memetron</a></dt>
  <dd>Natural language processing simulator for things that Reddit finds funny.</dd>
  <dt><a href="https://github.com/gabebw/fuckyeahfuckyeahproxy">fuckyeahfuckyeahproxy</a></dt>
  <dd>A proxy server to make Campfire understand images that don't end in
  `.jpg`, specifically targetting <a href="https://fuckyeah.heroku.com">fuckyeah.heroku.com</a>.</dd>
</dl>

## Harold Giménez

Harold, [hgimenez](https://github.com/hgmnz) on GitHub:

<dl>
  <dt><a href="https://github.com/hgmnz/presentations">presentations</a></dt>
  <dd>A talk on using Redis, amusingly titled "Redis: Nimble Data Bacon",
  <a href="https://www.postgresqlconference.org/content/redis-nimble-data-bacon">presented
  at PG West 2011</a>.</dd>
  <dt><a href="https://github.com/hgmnz/truncate_html">truncate_html</a></dt>
  <dd>A classic Rails gem for truncating a piece of HTML. (I also
    <a href="http://mikeburnscoder.wordpress.com/2006/11/11/truncating-html-in-ruby/">wrote
    this</a> a bunch of years back!)</dd>
  <dt><a href="https://github.com/hgmnz/stack">stack</a></dt>
  <dd>A sample app, serving as a gentle introduction to test-driven development.</dd>
</dl>

## Mike Burns

I can be found on GitHub as [mike-burns](https://github.com/mike-burns). Some
things I'm excited about:

<dl>
  <dt><a href="https://github.com/mike-burns/liaison">liaison</a></dt>
  <dd>An abstraction of the Rails presenter pattern, in a non-intrusive,
  object-oriented manner.</dd>
  <dt><a href="https://github.com/mike-burns/method_missing">method_missing</a></dt>
  <dd>Those methods that should have existed on Ruby's `Method` object.</dd>
</dl>

## ... And More

Those are the gems that metaphorically came across my metaphorical desk over
the past literal month. Do you have any to share? Any you've written?
