Skip to content

Instantly share code, notes, and snippets.

@djacobs7
Created March 22, 2010 18:03
Show Gist options
  • Save djacobs7/340327 to your computer and use it in GitHub Desktop.
Save djacobs7/340327 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
#USAGE: mategem gemname
gem_name = ARGV[0]
full_name = %x[gem list #{ARGV[0]}].strip!
exit if (full_name == "")
version = /\((.*)\)/.match(full_name)[1]
%x[mate /Library/Ruby/Gems/1.8/gems/#{gem_name}-#{version}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment