instance method
Gem::SpecFetcher#spec_for_dependency
spec_for_dependency(dependency, matching_platform = true)
lib/rubygems/spec_fetcher.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/spec_fetcher.rb, line 153
def spec_for_dependency(dependency, matching_platform = true)
tuples, errors = search_for_dependency(dependency, matching_platform)
specs = []
tuples.each do |tup, source|
spec = source.fetch_spec(tup)
rescue Gem::RemoteFetcher::FetchError => e
errors << Gem::SourceFetchProblem.new(source, e)
else
specs << [spec, source]
end
[specs, errors]
end
Find and fetch specs that match dependency.
If matching_platform is false, gems for all platforms are returned.
See also
#search_for_dependency
#suggest_gems_from_name
#detect
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0