I published a gem earlier this week which allows developers to add gems to their Gemfile from the command line. The utility of Gemrat lies in it’s ability to grab the latest version of a gem and lock it into your Gemfile.


Example

$ gemrat sinatra

#=> gem 'sinatra', '1.4.3' added to your Gemfile.
#=> Bundling...

$ gemrat rspec

#=> gem 'rspec', '2.13.0' added to your Gemfile.
#=> Bundling...

Github Page


Inspiration

Lately I’ve been taking a service oriented approach to developing software. This means that I build smaller apps which depend on each other rather than having a huge monolithic codebase.

This approach lends itself to reusability, polyglot programming, and it gives me more chances to implement lessons learned from previous applications.

The service oriented approach also carries some debt. I’m often wrangling dependencies as I rebuild infrastructures. Developers working on monolithic apps with lots of legacy code can go days or weeks without adding dependencies. This is usually not the case in service oriented architectures.

The manual process of adding gems usually involves searching for the latest version of a gem then adding the gem and it’s version to the Gemfile. This process calls for a browser and text editor.

The same result can now be accomplished by running $ gemrat gem_name from your command line.

I use this tool on a daily basis. Solving my own problems and sharing solutions with the world is extremely gratifying work.

Enjoy!

Comments