A very simple RubyGem for returning the root of any git repository.
require 'git-root' puts GitRoot.path