Skip to content

Instantly share code, notes, and snippets.

@FUT
Created June 2, 2013 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FUT/5693540 to your computer and use it in GitHub Desktop.
Save FUT/5693540 to your computer and use it in GitHub Desktop.
Sinatra app gemfile. Extracts gemlist from application file and makes an attempt to fetch gems from rubygems.
source 'https://rubygems.org'
gemlist = File.read('app.rb').scan(%r{^.*require.*'(?<gem>[^'"]*)'$}).flatten
gemlist.each { |gemname| gem gemname }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment