Skip to content

Instantly share code, notes, and snippets.

@mpage
Created January 28, 2012 03:27
Show Gist options
  • Save mpage/1692408 to your computer and use it in GitHub Desktop.
Save mpage/1692408 to your computer and use it in GitHub Desktop.
Simple script to resolve dependencies in a Gemfile without installing them
require 'bundler'
unless ARGV.size == 1
puts "Usage: bundle_resolver.rb [/path/to/gemfile]"
exit 1
end
defn = Bundler::Definition.build(ARGV[0], nil, nil)
defn.resolve_remotely!
defn.specs.each do |spec|
puts "#{spec.name} #{spec.version}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment