class Bundler::Source::Rubygems

def remote_specs

def remote_specs
  @remote_specs ||= begin
    idx     = Index.new
    old     = Gem.sources
    remotes.each do |uri|
      Bundler.ui.info "Fetching source index for #{uri}"
      Gem.sources = ["#{uri}"]
      fetch_all_remote_specs do |n,v|
        v.each do |name, version, platform|
          next if name == 'bundler'
          spec = RemoteSpecification.new(name, version, platform, uri)
          spec.source = self
          @spec_fetch_map[spec.full_name] = [spec, uri]
          idx << spec
        end
      end
    end
    idx
  ensure
    Gem.sources = old
  end
end