Skip to content

Instantly share code, notes, and snippets.

@pokutuna
Created May 23, 2011 21:06
Show Gist options
  • Save pokutuna/987608 to your computer and use it in GitHub Desktop.
Save pokutuna/987608 to your computer and use it in GitHub Desktop.
#usage $ ruby generate_gemset.rb gemdir
path = ARGV[0]
gems = Dir.glob(path + '/*').map{ |i| File.basename(i)}
File.open('generated.gems','w'){ |f|
gems.each do |g|
gem = g.split(/(.*)-(.+)$/)
f.puts gem[1] + ' -v' + gem[2]
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment