Class: GithubFlowReadiness::Checks::RubyVersion

Inherits:
Base
  • Object
show all
Defined in:
lib/core/github_flow_readiness/checks.rb

Constant Summary collapse

THRESHOLD =

Oldest Ruby line still receiving security backports (ruby-lang.org/en/downloads/branches/). Bump this constant when the upstream list drops the 3.3 series.

Gem::Version.new("3.3.0")

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from GithubFlowReadiness::Checks::Base

Instance Method Details

#callObject



70
71
72
73
74
75
76
# File 'lib/core/github_flow_readiness/checks.rb', line 70

def call
  version = service.inferred_ruby_version
  return warn_result("Could not determine the app Ruby version.") unless version
  return pass("Ruby #{version} is modern enough for rollout.") if version >= THRESHOLD

  fail_result("Ruby #{version} is legacy. Upgrade the repo toolchain before adding the GitHub flow.")
end