diff options
author | Carl Lerche <carllerche@mac.com> | 2010-01-30 18:53:07 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-01-30 18:53:07 -0800 |
commit | aa736ea9de25771111df89c01f6ee99647a30805 (patch) | |
tree | 0bb4f0dc60b98c365d9018b0c2099000537f1e0c | |
parent | c131309ca737676346119476295a705c44306862 (diff) | |
download | bundler-aa736ea9de25771111df89c01f6ee99647a30805.tar.gz |
Fix some bugs
-rw-r--r-- | bundler.gemspec | 2 | ||||
-rw-r--r-- | lib/bundler/definition.rb | 6 | ||||
-rw-r--r-- | lib/bundler/environment.rb | 10 | ||||
-rw-r--r-- | lib/bundler/installer.rb | 3 |
4 files changed, 16 insertions, 5 deletions
diff --git a/bundler.gemspec b/bundler.gemspec index 9562dcef15..fc0d2da306 100644 --- a/bundler.gemspec +++ b/bundler.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.default_executable = %q{bundle} s.email = ["carlhuda@engineyard.com"] s.executables = ["bundle"] - s.files = ["bin/bundle", "lib/bundler", "lib/bundler/cli.rb", "lib/bundler/definition.rb", "lib/bundler/dependency.rb", "lib/bundler/dsl.rb", "lib/bundler/environment.rb", "lib/bundler/index.rb", "lib/bundler/installer.rb", "lib/bundler/remote_specification.rb", "lib/bundler/resolver.rb", "lib/bundler/rubygems.rb", "lib/bundler/source.rb", "lib/bundler/specification.rb", "lib/bundler/templates", "lib/bundler/templates/environment.erb", "lib/bundler/templates/Gemfile", "lib/bundler/ui.rb", "lib/bundler/vendor", "lib/bundler/vendor/thor", "lib/bundler/vendor/thor/actions", "lib/bundler/vendor/thor/actions/create_file.rb", "lib/bundler/vendor/thor/actions/directory.rb", "lib/bundler/vendor/thor/actions/empty_directory.rb", "lib/bundler/vendor/thor/actions/file_manipulation.rb", "lib/bundler/vendor/thor/actions/inject_into_file.rb", "lib/bundler/vendor/thor/actions.rb", "lib/bundler/vendor/thor/base.rb", "lib/bundler/vendor/thor/core_ext", "lib/bundler/vendor/thor/core_ext/file_binary_read.rb", "lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb", "lib/bundler/vendor/thor/core_ext/ordered_hash.rb", "lib/bundler/vendor/thor/error.rb", "lib/bundler/vendor/thor/group.rb", "lib/bundler/vendor/thor/invocation.rb", "lib/bundler/vendor/thor/parser", "lib/bundler/vendor/thor/parser/argument.rb", "lib/bundler/vendor/thor/parser/arguments.rb", "lib/bundler/vendor/thor/parser/option.rb", "lib/bundler/vendor/thor/parser/options.rb", "lib/bundler/vendor/thor/parser.rb", "lib/bundler/vendor/thor/rake_compat.rb", "lib/bundler/vendor/thor/runner.rb", "lib/bundler/vendor/thor/shell", "lib/bundler/vendor/thor/shell/basic.rb", "lib/bundler/vendor/thor/shell/color.rb", "lib/bundler/vendor/thor/shell.rb", "lib/bundler/vendor/thor/task.rb", "lib/bundler/vendor/thor/util.rb", "lib/bundler/vendor/thor/version.rb", "lib/bundler/vendor/thor.rb", "lib/bundler.rb", "LICENSE", "README"] + s.files = ["bin/bundle", "lib/bundler/cli.rb", "lib/bundler/definition.rb", "lib/bundler/dependency.rb", "lib/bundler/dsl.rb", "lib/bundler/environment.rb", "lib/bundler/index.rb", "lib/bundler/installer.rb", "lib/bundler/remote_specification.rb", "lib/bundler/resolver.rb", "lib/bundler/rubygems.rb", "lib/bundler/source.rb", "lib/bundler/specification.rb", "lib/bundler/templates/environment.erb", "lib/bundler/templates/Gemfile", "lib/bundler/ui.rb", "lib/bundler/vendor/thor/actions/create_file.rb", "lib/bundler/vendor/thor/actions/directory.rb", "lib/bundler/vendor/thor/actions/empty_directory.rb", "lib/bundler/vendor/thor/actions/file_manipulation.rb", "lib/bundler/vendor/thor/actions/inject_into_file.rb", "lib/bundler/vendor/thor/actions.rb", "lib/bundler/vendor/thor/base.rb", "lib/bundler/vendor/thor/core_ext/file_binary_read.rb", "lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb", "lib/bundler/vendor/thor/core_ext/ordered_hash.rb", "lib/bundler/vendor/thor/error.rb", "lib/bundler/vendor/thor/group.rb", "lib/bundler/vendor/thor/invocation.rb", "lib/bundler/vendor/thor/parser/argument.rb", "lib/bundler/vendor/thor/parser/arguments.rb", "lib/bundler/vendor/thor/parser/option.rb", "lib/bundler/vendor/thor/parser/options.rb", "lib/bundler/vendor/thor/parser.rb", "lib/bundler/vendor/thor/rake_compat.rb", "lib/bundler/vendor/thor/runner.rb", "lib/bundler/vendor/thor/shell/basic.rb", "lib/bundler/vendor/thor/shell/color.rb", "lib/bundler/vendor/thor/shell.rb", "lib/bundler/vendor/thor/task.rb", "lib/bundler/vendor/thor/util.rb", "lib/bundler/vendor/thor/version.rb", "lib/bundler/vendor/thor.rb", "lib/bundler.rb", "LICENSE", "README"] s.homepage = %q{http://github.com/carlhuda/bundler} s.require_paths = ["lib"] s.rubygems_version = %q{1.3.5} diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 4a96cd5c45..b8865528fa 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -30,9 +30,11 @@ module Bundler @local_index ||= begin index = Index.from_installed_gems - sources.reverse_each do |source| - index.merge! source.local_specs if source.respond_to?(:local_specs) + sources.each do |source| + next unless source.respond_to?(:local_specs) + index = source.local_specs.merge(index) end + index end end diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb index 08cc2f3ff0..57fddbf52d 100644 --- a/lib/bundler/environment.rb +++ b/lib/bundler/environment.rb @@ -37,7 +37,15 @@ module Bundler end def specs - @specs ||= Resolver.resolve(@definition.actual_dependencies, index) + @specs ||= begin + source_requirements = {} + dependencies.each do |dep| + next unless dep.source && dep.source.respond_to?(:local_specs) + source_requirements[dep.name] = dep.source.local_specs + end + + Resolver.resolve(@definition.actual_dependencies, index, source_requirements) + end end def index diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 1861e0fbb0..f9379e4359 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -107,8 +107,9 @@ module Bundler index = local_index sources.each do |source| + i = source.specs Bundler.ui.info "Source: Processing index... " - index = source.specs.merge(index).freeze + index = i.merge(index).freeze Bundler.ui.info "Done." end |