spec_for_dependency(dependency, matching_platform=true)
public
Find and fetch specs that match
dependency.
If matching_platform is false, gems for all platforms are
returned.
# File lib/rubygems/spec_fetcher.rb, line 165
def spec_for_dependency(dependency, matching_platform=true)
tuples, errors = search_for_dependency(dependency, matching_platform)
specs = []
tuples.each do |tup, source|
begin
spec = source.fetch_spec(tup)
rescue Gem::RemoteFetcher::FetchError => e
errors << Gem::SourceFetchProblem.new(source, e)
else
specs << [spec, source]
end
end
return [specs, errors]
end