class Bundler::Installer
def local_index
def local_index @local_index ||= begin index = Index.new sources.each do |source| next unless source.respond_to?(:local_specs) index = source.local_specs.merge(index) end index = Index.from_installed_gems.merge(index) if File.directory?("#{root}/vendor/cache") index = cache_source.specs.merge(index).freeze end Index.from_cached_specs("#{Bundler.bundle_path}/cache").merge(index) end end