diff options
author | Carl Lerche <carllerche@mac.com> | 2010-02-26 13:58:00 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-02-26 13:58:00 -0800 |
commit | ad7cf098195d2a5a4bb0ccc029a0796af7eaa1a1 (patch) | |
tree | c8a92e26f3856dd36185d6c460d9552bee6e4805 /lib/bundler/installer.rb | |
parent | b331e3fec95ed79ddf0894960f1e24b689378c5f (diff) | |
download | bundler-ad7cf098195d2a5a4bb0ccc029a0796af7eaa1a1.tar.gz |
Respect --without when locked
Diffstat (limited to 'lib/bundler/installer.rb')
-rw-r--r-- | lib/bundler/installer.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 7fec9e76..f4755e66 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -7,7 +7,7 @@ module Bundler end def run(options) - if dependencies.empty? + if actual_dependencies.empty? Bundler.ui.warn "The Gemfile specifies no dependencies" return end @@ -36,6 +36,10 @@ module Bundler end def dependencies + @definition.dependencies + end + + def actual_dependencies @definition.actual_dependencies end @@ -51,19 +55,19 @@ module Bundler def resolve_locally # Return unless all the dependencies have = version requirements - return if dependencies.any? { |d| ambiguous?(d) } + return if actual_dependencies.any? { |d| ambiguous?(d) } source_requirements = {} - dependencies.each do |dep| + actual_dependencies.each do |dep| next unless dep.source && dep.source.respond_to?(:local_specs) source_requirements[dep.name] = dep.source.local_specs end # Run a resolve against the locally available gems - specs = Resolver.resolve(dependencies, local_index, source_requirements) + specs = Resolver.resolve(actual_dependencies, local_index, source_requirements) # Simple logic for now. Can improve later. - specs.length == dependencies.length && specs + specs.length == actual_dependencies.length && specs rescue Bundler::GemNotFound nil raise if ENV["OMG"] @@ -73,12 +77,12 @@ module Bundler index # trigger building the index Bundler.ui.info "Resolving dependencies" source_requirements = {} - dependencies.each do |dep| + actual_dependencies.each do |dep| next unless dep.source source_requirements[dep.name] = dep.source.specs end - specs = Resolver.resolve(dependencies, index, source_requirements) + specs = Resolver.resolve(actual_dependencies, index, source_requirements) specs end |