Bundler higher than ~> 2.4.0 will require Ruby 3.0 or later

This commit is contained in:
David Rodríguez
2022-12-25 19:28:37 +01:00
committed by Benoit Daloze
parent 02c9cccf0e
commit bb3a0553d5
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -108,6 +108,7 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
// Use Bundler 1 when we know Bundler 2 does not work
// Use Bundler 2.3 when we use Ruby 2.3.2-2.5
// Use Bundler 2.4 when we use Ruby 2.6-2.7
if (bundlerVersion.startsWith('2')) {
if (engine === 'ruby' && floatVersion <= 2.2) {
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2')
@@ -118,6 +119,9 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
} else if (engine === 'ruby' && floatVersion <= 2.5) {
console.log('Ruby 2.3.2-2.5 only works with Bundler 2.3')
bundlerVersion = '2.3'
} else if (engine === 'ruby' && floatVersion <= 2.7) {
console.log('Ruby 2.6-2.7 only works with Bundler 2.4')
bundlerVersion = '2.4'
} else if (engine === 'jruby' && rubyVersion.startsWith('9.1')) { // JRuby 9.1 targets Ruby 2.3, treat it the same
console.log('JRuby 9.1 has a bug with Bundler 2 (https://github.com/ruby/setup-ruby/issues/108), using Bundler 1 instead on JRuby 9.1')
bundlerVersion = '1'
Generated Vendored
+4
View File
@@ -123,6 +123,7 @@ async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, p
// Use Bundler 1 when we know Bundler 2 does not work
// Use Bundler 2.3 when we use Ruby 2.3.2-2.5
// Use Bundler 2.4 when we use Ruby 2.6-2.7
if (bundlerVersion.startsWith('2')) {
if (engine === 'ruby' && floatVersion <= 2.2) {
console.log('Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2')
@@ -133,6 +134,9 @@ async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, p
} else if (engine === 'ruby' && floatVersion <= 2.5) {
console.log('Ruby 2.3.2-2.5 only works with Bundler 2.3')
bundlerVersion = '2.3'
} else if (engine === 'ruby' && floatVersion <= 2.7) {
console.log('Ruby 2.6-2.7 only works with Bundler 2.4')
bundlerVersion = '2.4'
} else if (engine === 'jruby' && rubyVersion.startsWith('9.1')) { // JRuby 9.1 targets Ruby 2.3, treat it the same
console.log('JRuby 9.1 has a bug with Bundler 2 (https://github.com/ruby/setup-ruby/issues/108), using Bundler 1 instead on JRuby 9.1')
bundlerVersion = '1'