class Bundler::Installer
def index
def index @index ||= begin index = Index.new rg_sources = sources.select { |s| s.is_a?(Source::Rubygems) } other_sources = sources.select { |s| !s.is_a?(Source::Rubygems) } other_sources.each do |source| i = source.specs Bundler.ui.debug "Source: Processing index" index = i.merge(index) end index = Index.from_installed_gems.merge(index) index = Index.from_cached_specs("#{Bundler.bundle_path}/cache").merge(index) if File.directory?("#{root}/vendor/cache") index = cache_source.specs.merge(index) end rg_sources.each do |source| i = source.specs Bundler.ui.debug "Source: Processing index" index = i.merge(index) end index end end