summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-01-28 14:21:54 -0800
committerCarlhuda <carlhuda@engineyard.com>2010-01-28 14:21:54 -0800
commitacab5a322549a370c39e4f36149aba81f519c389 (patch)
tree89b2d7a5332db12cf873ad9dbe06d12ec8667995
parent5921d93a4ed7b2dd2958cbd2720ae1079362c50c (diff)
downloadbundler-acab5a322549a370c39e4f36149aba81f519c389.tar.gz
Fix a bug with ordering of sources
-rw-r--r--lib/bundler/installer.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index bdde4628ba..22db01b44e 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -70,14 +70,10 @@ module Bundler
@index ||= begin
index = local_index
- if File.directory?("#{root}/vendor/cache")
- index = index.merge Source::GemCache.new(:path => "#{root}/vendor/cache").specs
- end
-
- sources.reverse_each do |source|
+ sources.each do |source|
specs = source.specs
Bundler.ui.info "Source: Processing index... "
- index = index.merge(specs)
+ index = specs.merge(index)
Bundler.ui.info "Done."
end
@@ -90,12 +86,16 @@ module Bundler
index = Index.from_installed_gems
if File.directory?("#{root}/vendor/cache")
- index = index.merge Source::GemCache.new(:path => "#{root}/vendor/cache").specs
+ index = cache_source.specs.merge(index)
end
index
end
end
+ def cache_source
+ Source::GemCache.new(:path => "#{root}/vendor/cache")
+ end
+
end
end \ No newline at end of file