Skip to content

Instantly share code, notes, and snippets.

@paveltyk
Created November 18, 2010 18:27
Show Gist options
  • Save paveltyk/705382 to your computer and use it in GitHub Desktop.
Save paveltyk/705382 to your computer and use it in GitHub Desktop.
output_file = File.open 'gem_remote_output.txt', 'w'
File.open 'gem_remote_input.txt' do |input_file|
input_file.each_line do |line|
match = line.match /^([^_\-][\-\w\.]*) \(([\d\.]*).*\)$/
output_file.puts "gem install #{match[1]} -v #{match[2]}" if match
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment