From 086a5c4ac9a2c422dc9a7a11c98f27f7d82b80dc Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Fri, 6 Jan 2023 23:15:29 +0900 Subject: [PATCH 1/2] Add Ruby 3.2 to the CI matrix --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab9a92fd9..a5e0d73eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,10 @@ jobs: matrix: include: # Edge Rails (7.1) builds >= 2.7 + - ruby: 3.2 + allow_failure: true + env: + RAILS_VERSION: 'main' - ruby: 3.1 allow_failure: true env: @@ -47,6 +51,9 @@ jobs: RAILS_VERSION: 'main' # Rails 7.0 builds >= 2.7 + - ruby: 3.2 + env: + RAILS_VERSION: '~> 7.0.0' - ruby: 3.1 env: RAILS_VERSION: '~> 7.0.0' From 24eb5a1844947b3586352a3af4f51d562d1a38e8 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Fri, 6 Jan 2023 23:18:01 +0900 Subject: [PATCH 2/2] Change to install past Rubygems and Bundler if less than Ruby 2.6 https://github.com/rubygems/rubygems/releases/tag/bundler-v2.4.0 https://github.com/rubygems/rubygems/releases/tag/v3.4.0 --- script/predicate_functions.sh | 8 ++++++++ script/update_rubygems_and_install_bundler | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 1a3198801..90067bb10 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -57,6 +57,14 @@ function is_mri_2plus { fi } +function is_ruby_26_plus { + if ruby -e "exit(RUBY_VERSION.to_f >= 2.6)"; then + return 0 + else + return 1 + fi +} + function is_ruby_23_plus { if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then return 0 diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 3cfe3a456..4c386c945 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -5,9 +5,13 @@ set -e source script/functions.sh -if is_ruby_23_plus; then +if is_ruby_26_plus; then gem update --no-document --system gem install --no-document bundler +elif is_ruby_23_plus; then + echo "Warning installing older versions of Rubygems / Bundler" + gem update --system '3.3.26' + gem install bundler -v '2.3.26' else echo "Warning installing older versions of Rubygems / Bundler" gem update --system '2.7.10'