Skip to content

Commit

Permalink
CI: use arrays for Puma versions
Browse files Browse the repository at this point in the history
The [String, Float, Float] array syntax of
min-library-version-as-string, min-ruby-version-as-float, and (optional)
max-ruby-version-as-float can be used to express version constraints
  • Loading branch information
fallwith committed Sep 21, 2023
1 parent f81c98e commit bbf283d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions test/multiverse/suites/rack/Envfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@ instrumentation_methods :chain, :prepend

# The Rack suite also tests Puma::Rack::Builder
# Which is why we also control Puma tested versions here
PUMA_VERSIONS = [
'nil',
'5.6.4',
'4.3.12',
'3.12.6'
]

# Ruby v3.3.0+ requires Puma v6.4.0+
# https://github.com/puma/puma/commit/188f5da1920ff99a8689b3e9b46f2f26b7c62d66
if RUBY_VERSION >= Gem::Version.new('3.3.0')
puma_min = Gem::Version.new('6.4.0')
PUMA_VERSIONS.reject! { |v| !v.eql?('nil') && Gem::Version.new(v) < puma_min }
end
PUMA_VERSIONS = [
[nil, 2.4],
['5.6.4', 2.4, 3.2],
['4.3.12', 2.4, 3.2],
['3.12.6', 2.4, 3.2]
]

def gem_list(puma_version = nil)
<<~RB
Expand Down

0 comments on commit bbf283d

Please sign in to comment.