vendor/bundler_gem/gems/bundler-1.1.0/lib/bundler/fetcher.rb
# return the specs in the bundler format as an index
return the specs in the bundler format as an index
return the specs in the bundler format as an index
def specs(gem_names, source)
      index = Index.new
      if !gem_names || @remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
        Bundler.ui.info "Fetching source index from #{strip_user_pass_from_uri(@remote_uri)}"
        specs = fetch_all_remote_specs
      else
        Bundler.ui.info "Fetching gem metadata from #{strip_user_pass_from_uri(@remote_uri)}", Bundler.ui.debug?
        begin
          specs = fetch_remote_specs(gem_names)
        rescue HTTPError, TypeError => e
          Bundler.ui.info "" unless Bundler.ui.debug?
          if @remote_uri.to_s.include?("rubygems.org")
            Bundler.ui.info "Error #{e.class} during request to dependency API"
          end
          Bundler.ui.debug e.message
          Bundler.ui.debug e.backtrace
          Bundler.ui.info "Fetching full source index from #{strip_user_pass_from_uri(@remote_uri)}"
          specs = fetch_all_remote_specs
        else
          Bundler.ui.info "" unless Bundler.ui.debug?
        end
      end
      specs[@remote_uri].each do |name, version, platform, dependencies|
        next if name == 'bundler'
        spec = nil
        if dependencies
          spec = EndpointSpecification.new(name, version, platform, dependencies)
        else
          spec = RemoteSpecification.new(name, version, platform, self)
        end
        spec.source = source
        @@spec_fetch_map[spec.full_name] = [spec, @remote_uri]
        index << spec
      end
      index
    end
def specs ( gem_names , source ) index = Index . new if ! gem_names || @remote_uri . scheme == "file" || Bundler :: Fetcher . disable_endpoint Bundler . ui . info "Fetching source index from #{strip_user_pass_from_uri(@remote_uri)}" specs = fetch_all_remote_specs else Bundler . ui . info "Fetching gem metadata from #{strip_user_pass_from_uri(@remote_uri)}" , Bundler . ui . debug? begin specs = fetch_remote_specs ( gem_names ) rescue HTTPError , TypeError => e Bundler . ui . info "" unless Bundler . ui . debug? if @remote_uri . to_s . include? ( "rubygems.org" ) Bundler . ui . info "Error #{e.class} during request to dependency API" end Bundler . ui . debug e . message Bundler . ui . debug e . backtrace Bundler . ui . info "Fetching full source index from #{strip_user_pass_from_uri(@remote_uri)}" specs = fetch_all_remote_specs else Bundler . ui . info "" unless Bundler . ui . debug? end end specs [ @remote_uri ] . each do | name , version , platform , dependencies | next if name == 'bundler' spec = nil if dependencies spec = EndpointSpecification . new ( name , version , platform , dependencies ) else spec = RemoteSpecification . new ( name , version , platform , self ) end spec . source = source @@spec_fetch_map [ spec . full_name ] = [ spec , @remote_uri ] index << spec end index end
return the specs in the bundler format as an index
return the specs in the bundler format as an index
# fall back to the legacy index in the following cases # 1. Gemcutter Endpoint doesn't return a 200 # 2. Marshal blob doesn't load properly # 3. One of the YAML gemspecs has the Syck::DefaultKey problem # new line now that the dots are over # new line now that the dots are over
gem_names
source