Interesting Ruby Tidbits That Don’t Need Separate Posts #28

Welcome to the latest in the series of random Ruby related links I've picked up over the past few weeks. It's a crazy grab-bag of links this time around! Whatever your job, interest, or fetish, there's bound to be something in here that tickles your fancy if you're a Rubyist. Enjoy!

Note: Don't forget that if you like quick-fire links like this, check out our sister siteRubyFlow. There are usually anywhere between 3 and 15 Ruby and Rails related links each day coming from developers just like you :)

Sketches - Have Editor-Based Ruby Code Reloaded By IRB Automatically

Sketches is a Ruby tool (available as a gem - gem install sketches) that lets you create and edit Ruby code in your favorite text editor while having it safely reloaded in IRB whenever the code is saved/updated. If you're a bit braver, though, check out Hijack, which gets you a live IRB prompt for any existing Ruby process.

Sumo - One-Off Amazon EC2 Instance Launcher

Sumo (or GitHub repo) is a cute little Ruby-powered command line app to quickly launch and manage Amazon EC2 instances. As an aside, the code provides a small and well formed example of building a command line app around Thor. (If you need something more intense, check out PoolParty, which can manage whole clusters of EC2 instances for you.)

On Rake

On Rake is a perfectly formed blog post by John Barnette about rake (Ruby's "make"). In it he claims most people use Rake simply as a tool to launch tasks (which is true, in my experience) but then quickly demonstrates how Rake's dependency resolution features can radically improve the code you use to define those tasks.

FakeFS - Transparently Get A Fake Filesystem For Ruby

FakeFS is a Ruby library by GitHub extraordinaire Chris Wanstrath that transparently makes the File, Dir, and FileUtils class use an in-memory "virtual" file system. The main benefit of this is for speeding up (and simplifying) test environments.

Comments

methodmissing is Lourens Naudés handle, although the callback idea was inspired (as with a few other things) by ideas we've been discussing at work. Lourens being the legend that he is went and implemented it as a native MRI extension for me :-)