Class: GemDating::Rubygems
- Inherits:
-
Object
- Object
- GemDating::Rubygems
- Defined in:
- lib/gem_dating/rubygems.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.fetch ⇒ Object
3 4 5 |
# File 'lib/gem_dating/rubygems.rb', line 3 def self.fetch(...) new.fetch(...) end |
Instance Method Details
#fetch(gems) ⇒ Object
7 8 9 10 11 |
# File 'lib/gem_dating/rubygems.rb', line 7 def fetch(gems) gems.map do |gem| Gem.latest_spec_for(gem) || unknown_version(gem) end end |
#unknown_version(gemname) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/gem_dating/rubygems.rb', line 13 def unknown_version(gemname) Gem::Specification.new do |s| s.name = gemname s.version = "0.0.0.UNKNOWN" s.date = "1970-01-01" end end |