debian_specs/passenger/helpers.rb
def distro_ruby_versions
  case distribution_class
  when :ubuntu
    if is_distribution?("<= artful")
      ["2.3"]
    elsif is_distribution?(">= focal")
      ["2.7"]
    else
      # v18.04 Bionic
      ["2.5"]
    end
  when :debian
    if is_distribution?("<= jessie")
      ["2.1"]
    elsif is_distribution?("<= stretch")
      # At least up to, and including, v9 Stretch
      ["2.3"]
    else
      ["2.5"]
    end
  else
    raise "Unknown distribution class"
  end
end
# Returns the Ruby versions available for a given distribution.
# The result is ordered from least preferred to most preferred.
Returns the Ruby versions available for a given distribution.
The result is ordered from least preferred to most preferred.
Returns the Ruby versions available for a given distribution . The result is ordered from least preferred to most preferred .
def distro_ruby_versions
  case distribution_class
  when :ubuntu
    if is_distribution?("<= artful")
      ["2.3"]
    elsif is_distribution?(">= focal")
      ["2.7"]
    else
      ["2.5"]
    end
  when :debian
    if is_distribution?("<= jessie")
      ["2.1"]
    elsif is_distribution?("<= stretch")
      ["2.3"]
    else
      ["2.5"]
    end
  else
    raise "Unknown distribution class"
  end
end
def distro_ruby_versions case distribution_class when :ubuntu if is_distribution? ( "<= artful" ) [ "2.3" ] elsif is_distribution? ( ">= focal" ) [ "2.7" ] else [ "2.5" ] end when :debian if is_distribution? ( "<= jessie" ) [ "2.1" ] elsif is_distribution? ( "<= stretch" ) [ "2.3" ] else [ "2.5" ] end else raise "Unknown distribution class" end end
Returns the Ruby versions available for a given distribution.
Returns the Ruby versions available for a given distribution .
# v18.04 Bionic # At least up to, and including, v9 Stretch