24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/bundler/fetcher/dependency.rb', line 24
def specs(gem_names, full_dependency_list = [], last_spec_list = [])
query_list = gem_names.uniq - full_dependency_list
log_specs { "Query List: #{query_list.inspect}" }
return last_spec_list if query_list.empty?
spec_list, deps_list = Bundler::Retry.new("dependency api", FAIL_ERRORS).attempts do
dependency_specs(query_list)
end
returned_gems = spec_list.map(&:first).uniq
specs(deps_list, full_dependency_list + returned_gems, spec_list + last_spec_list)
rescue MarshalError, HTTPError, GemspecError
Bundler.ui.info "" unless Bundler.ui.debug? Bundler.ui.debug "could not fetch from the dependency API, trying the full index"
nil
end
|