End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
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-3.0.5/lib/rubygems/spec_fetcher.rb, line 152
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
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 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1