Class: Gem2Rpm::SpecFetcher
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Gem2Rpm::SpecFetcher
- Defined in:
- lib/gem2rpm/gem/spec_fetcher.rb
Instance Method Summary collapse
-
#spec_for_dependency(dependency, matching_platform = true) ⇒ Object
Find and fetch specs that match
dependency
.
Instance Method Details
#spec_for_dependency(dependency, matching_platform = true) ⇒ Object
Find and fetch specs that match dependency
.
If matching_platform
is false, gems for all platforms are returned.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gem2rpm/gem/spec_fetcher.rb', line 9 def spec_for_dependency(dependency, matching_platform = true) super rescue errors = [] begin spec, source = find_matching(dependency, true, matching_platform).first rescue Gem::Exception => e errors << OpenStruct.new(:error => e) end source = OpenStruct.new(:uri => source) [[[spec, source]], errors] end |