16 Jun 2009

gem to quickly test your javascript javascript_lab

Personally I am liking jQuery over Prototype but there are many projects which use Prototype and I keep juggling between the two javascript libraries. I needed a tool to quickly test my javascript code without worrying about including the right version.

I ended up creating this gem calld javascript_lab.

gem sources -a http://gems.github.com
sudo gem install neerajdotname-javascript_lab

Once the gem is installed then on the command line type javascript_lab and a browser should come up.

This tiny gem also demostrates the enormous power of Sinatra. Sinatra is a perfect tool for such cases when you want to embed a server inside your gem.

A big thanks to the author of gembox which inspired this gem.

Give it a try. Send me feedback if you have any.