Monday, August 24, 2009

Pit:: Manages your user config settings easily.

Pit is a real 'gem' of a gem.

I have a script that installs a bunch of gems to set up a development environment on rails. The problem is each user of the script needs to set up the proxy for their own specific user settings. I don't want to store that information in the script as everyone would be logged in as me. I don't want to have to remember to manually set up some config file for each user of the system either.

Pit acts like a repository for configuration data. In your code, just ask Pit for specific data and it will either return the known information OR prompt the user with an editor so they can fill in the missing information (which is then remembered). So simple!..

Install: gem install pit

Usage:

require "pit"
config = Pit.get("proxy.settings", :require => {
"username" => "default value",
"password" => "default value"
})


Install the gem and run gem server for more information.

The files are hosted at http://rubyforge.org/frs/?group_id=4607

Thanks LowReal whoever you are!

GitHub Projects