Dev Blog

Viewing entries by
Parker Wightman

HTTP Replay Gem

I was just checking out the latest Railscast this week (, and he shows a really cool gem I hadn’t seen before:

It records all of your HTTP events which you can “play back” and then make assertions about. So if you were developing an iOS app that used a web-service, you could start the gem recording, do a sequence of events on the iOS device as your test case, then play back those events whenever you like and make assertions that it actually did update the DB on a POST, or whatever. Cool stuff.

Letter opener

Sweet gem for opening emails sent with ActionMailer in your web browser in development so you don’t have to configure an email account:

Global Find

Since I use Vim when working in rails, I don’t have any nice global find-and-replace across files, but this always helps me out:

grep -R “some text” .

If you run it from the root directory, it does a recursive grep on the contents of every file in the directory and all subdirectories. A big help if I need a quick and dirty way to find all occurrences of certain methods/variables in a project, e.g. when renaming a Rails project.