lib/bundler/definition.rb in bundler-1.1.pre.4 vs lib/bundler/definition.rb in bundler-1.1.pre.5
- old
+ new
@@ -158,19 +158,21 @@
end
def index
@index ||= Index.build do |idx|
@sources.each do |s|
- idx.use s.specs(@dependencies)
+ s.dependencies = @dependencies if s.is_a?(Bundler::Source::Rubygems)
+ idx.add_source s.specs
end
end
end
+ # used when frozen is enabled so we can find the bundler
+ # spec, even if (say) a git gem is not checked out.
def rubygems_index
@rubygems_index ||= Index.build do |idx|
- @sources.find_all{|s| s.is_a?(Source::Rubygems) }.each do |s|
- idx.use s.specs
- end
+ rubygems = @sources.find{|s| s.is_a?(Source::Rubygems) }
+ idx.add_source rubygems.specs
end
end
def no_sources?
@sources.length == 1 && @sources.first.remotes.empty?