Pancake’s Console

One of the really great things that Rails has done is provided us with script/console. This is such a handy utility and it works really well.

It’s no secret what I think of rack, but still, I’ll say it again. I think Rack is awesome, and although the spec is simple, when we conform to the spec we get new things from out of left field 😀 Enter (from field left) racksh This is pure gold IMHO. Install in the usual way:

$ gem install racksh

If we go back to the app we built up in my last post lets see how we can get a console for it.

∴ racksh
~ Loading Development Environment
Rack::Shell v0.9.4 started in development environment.
>>

See the awesomeness of rack there? Racksh does a very nice job at providing a console to all rack applications who follow the spec and also provide a config.ru file. Also, since it’s an awesome tool, it makes your fully stacked up application available at $rackincluding goodness from Rack::Test so you get a whole bunch of methods for free 🙂 Lets try a few out.

I’d suggest everyone checkout the docs and readme for both Racksh and Rack::Test to see what you can do with these great tools, and try them out. Use them with such frameworks as Sinatra, Rango, Pancake and many others 🙂

Advertisements

Like this:

This entry was posted on November 19, 2009 at 6:56 am and is filed under Pancake. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.