vendor/bundler_gem/gems/bundler-1.1.0/lib/bundler/fetcher.rb
def fetch_dependency_remote_specs(gem_names)
      Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(' ')}"
      uri = URI.parse("#{@remote_uri}api/v1/dependencies?gems=#{gem_names.join(",")}")
      marshalled_deps = fetch(uri)
      gem_list = Marshal.load(marshalled_deps)
      deps_list = []

      spec_list = gem_list.map do |s|
        dependencies = s[:dependencies].map do |d|
          begin
            name, requirement = d
            dep = Gem::Dependency.new(name, requirement.split(", "))
          rescue ArgumentError => e
            if e.message.include?('Illformed requirement ["#<YAML::Syck::DefaultKey')
              puts # we shouldn't print the error message on the "fetching info" status line
              raise GemspecError, %{Unfortunately, the gem #{s[:name]} (#{s[:number]}) } +
                %{has an invalid gemspec. As a result, Bundler cannot install this Gemfile. } +
                %{Please ask the gem author to yank the bad version to fix this issue. For } +
                %{more information, see http://bit.ly/syck-defaultkey.}
            else
              raise e
            end
          end

          deps_list << dep.name

          dep
        end

        [s[:name], Gem::Version.new(s[:number]), s[:platform], dependencies]
      end

      [spec_list, deps_list.uniq]
    end
# fetch from Gemcutter Dependency Endpoint API
fetch from Gemcutter Dependency Endpoint API
fetch from Gemcutter Dependency Endpoint API
def fetch_dependency_remote_specs(gem_names)
      Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(' ')}"
      uri = URI.parse("#{@remote_uri}api/v1/dependencies?gems=#{gem_names.join(",")}")
      marshalled_deps = fetch(uri)
      gem_list = Marshal.load(marshalled_deps)
      deps_list = []
      spec_list = gem_list.map do |s|
        dependencies = s[:dependencies].map do |d|
          begin
            name, requirement = d
            dep = Gem::Dependency.new(name, requirement.split(", "))
          rescue ArgumentError => e
            if e.message.include?('Illformed requirement ["#<YAML::Syck::DefaultKey')
              puts 
              raise GemspecError, %{Unfortunately, the gem #{s[:name]} (#{s[:number]}) } +
                %{has an invalid gemspec. As a result, Bundler cannot install this Gemfile. } +
                %{Please ask the gem author to yank the bad version to fix this issue. For } +
                %{more information, see http://bit.ly/syck-defaultkey.}
            else
              raise e
            end
          end
          deps_list << dep.name
          dep
        end
        [s[:name], Gem::Version.new(s[:number]), s[:platform], dependencies]
      end
      [spec_list, deps_list.uniq]
    end
def fetch_dependency_remote_specs ( gem_names ) Bundler . ui . debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(' ')}" uri = URI . parse ( "#{@remote_uri}api/v1/dependencies?gems=#{gem_names.join(",")}" ) marshalled_deps = fetch ( uri ) gem_list = Marshal . load ( marshalled_deps ) deps_list = [ ] spec_list = gem_list . map do | s | dependencies = s [ :dependencies ] . map do | d | begin name , requirement = d dep = Gem :: Dependency . new ( name , requirement . split ( ", " ) ) rescue ArgumentError => e if e . message . include? ( 'Illformed requirement ["#<YAML::Syck::DefaultKey' ) puts raise GemspecError , %{Unfortunately, the gem #{s[:name]} (#{s[:number]}) } + %{has an invalid gemspec. As a result, Bundler cannot install this Gemfile. } + %{Please ask the gem author to yank the bad version to fix this issue. For } + %{more information, see http://bit.ly/syck-defaultkey.} else raise e end end deps_list << dep . name dep end [ s [ :name ] , Gem :: Version . new ( s [ :number ] ) , s [ :platform ] , dependencies ] end [ spec_list , deps_list . uniq ] end
fetch from Gemcutter Dependency Endpoint API
fetch from Gemcutter Dependency Endpoint API
# we shouldn't print the error message on the "fetching info" status line
gem_names