Created
November 2, 2009 22:49
-
-
Save seamusabshere/224569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Gem::Dependency | |
def to_bundler | |
args = [] | |
args << name | |
args << specification.version.to_s if specification.version.to_s.present? | |
options = {} | |
options[:require_as] = lib if lib.present? | |
str = "gem '#{args.join "', '"}'" | |
str << ", #{options.inspect.gsub(/[\{\}]/, '')}" if options.present? | |
str | |
end | |
end | |
Rails.configuration.gems.each { |g| puts g.to_bundler } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment