class Bundler::GemSource
def fetch_specs
def fetch_specs Bundler.logger.info "Updating source: #{to_s}" fetcher = Gem::RemoteFetcher.fetcher main_index = fetcher.fetch_path("#{uri}/specs.4.8.gz") begin prerelease_index = fetcher.fetch_path("#{uri}/prerelease_specs.4.8.gz") index = Marshal.load(main_index) + Marshal.load(prerelease_index) rescue Gem::RemoteFetcher::FetchError Bundler.logger.warn "Source '#{uri}' does not support prerelease gems" index = Marshal.load(main_index) end gems = Hash.new { |h,k| h[k] = [] } index.each do |name, version, platform| spec = RemoteSpecification.new(name, version, platform, @uri) spec.source = self gems[spec.name] << spec if Gem::Platform.match(spec.platform) end gems rescue Gem::RemoteFetcher::FetchError => e raise ArgumentError, "#{to_s} is not a valid source: #{e.message}" end