Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created April 30, 2010 02:09
Show Gist options
  • Save defunkt/384613 to your computer and use it in GitHub Desktop.
Save defunkt/384613 to your computer and use it in GitHub Desktop.

Revisions

  1. defunkt created this gist Apr 30, 2010.
    25 changes: 25 additions & 0 deletions rip-gemfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/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)