A better mategem
I've just built a nicer "mategem" command, which will open up a rubygem's root directory in textmate. It allows you to simply open the latest gem version using the same reference you use in your project to activate the gem.
You know how you can activate a gem by running the gem command (e.g. "gem 'rails'"), or also by simply requiring a library file that is provided by that gem in the root of its library (like "require 'action_controller'" will activate the 'actionpack' gem)? Well, you can use the same two ways to reference a gem when you run mategem:
- "mategem rails" will open rails
- "mategem initializer" will also open rails
- "mategem action_controller" will open the actionpack gem
- "mategem sinatra" will of course open the sinatra gem
To install, create this file, make it executable, and put it somewhere in your PATH. I would highly advise creating a ~/.bin folder and putting that in your PATH.
0 comments:
Post a Comment