Depth Charge

February 27, 2008 – 6:31 am

Over the past couple of days, I’ve run into two separate problems caused by gems being installed on one machine and not on another. Fool me once, right?

So I spent a little time last night writing up a rough dependency-finder gem: Depth Charge. As of the 0.0.1 version, it gives you a rake task that parses your project code and displays all the gem and library dependencies it can find, along with the files they occur in. Here’s a sample of its output when run on one of my current projects:

mini_magick
vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb
 
mocha
vendor/plugins/foreign_key_migrations/test/test_helper.rb
vendor/plugins/viget_tasks/test_helper.rb
 
net/http
vendor/plugins/attachment_fu/test/backends/remote/s3_test.rb

It’s super rough at the moment, but I’m hoping to be able to clean it up as I go. As it currently stands, it works pretty well on a Rails project when frozen via the gemsonrails plugin - and one of my first priorities is making it even easier to run. I’m also probably going to use GitHub for SCM, as opposed to RubyForge’s SVN hosting, so it’ll be easy to contribute to. If you’d like to get in on the bleeding edge, though, you should be able to install it with the standard sudo gem install depth-charge.

Post a Comment