diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-01-28 14:21:54 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-01-28 14:21:54 -0800 |
commit | acab5a322549a370c39e4f36149aba81f519c389 (patch) | |
tree | 89b2d7a5332db12cf873ad9dbe06d12ec8667995 /lib | |
parent | 5921d93a4ed7b2dd2958cbd2720ae1079362c50c (diff) | |
download | bundler-acab5a322549a370c39e4f36149aba81f519c389.tar.gz |
Fix a bug with ordering of sources
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/installer.rb | 14 |
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 |