Class: Rake::Gem::Maintenance::RubyVersionChecker
- Inherits:
-
Object
- Object
- Rake::Gem::Maintenance::RubyVersionChecker
- Defined in:
- lib/rake/gem/maintenance/ruby_version_checker.rb
Overview
Fetches the latest stable Ruby version and maintained minors from endoflife.date.
Constant Summary collapse
- API_URL =
"https://endoflife.date/api/ruby.json"
Instance Method Summary collapse
Instance Method Details
#latest_stable ⇒ Object
13 14 15 |
# File 'lib/rake/gem/maintenance/ruby_version_checker.rb', line 13 def latest_stable cycles.max_by { |c| ::Gem::Version.new(c[:latest]) }&.fetch(:latest) end |
#maintained_minors ⇒ Object
17 18 19 |
# File 'lib/rake/gem/maintenance/ruby_version_checker.rb', line 17 def maintained_minors cycles.map { |c| c[:cycle] }.sort_by { |v| ::Gem::Version.new(v) } end |