Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created April 30, 2010 02:09
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 defunkt/384613 to your computer and use it in GitHub Desktop.
Save defunkt/384613 to your computer and use it in GitHub Desktop.
Gemfile => deps.rip
#!/usr/bin/env ruby
# Usage: rip-gemfile Gemfile
#
# Given a Gemfile, prints content that can be used as a deps.rip
# to standard out.
#
# If you want to work with Gemfile.lock check out josh's rip-bundle:
# http://github.com/josh/rip-bundle
module Gemfile
extend self
def gem(name, version = nil)
if version
puts "#{name} #{version.split(' ').last}"
else
puts name
end
end
def method_missing(*args)
end
end
Gemfile.instance_eval(ARGF.read)
@josh
Copy link

josh commented Apr 30, 2010

I'm stealing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment