Skip to content

Commit 24eb5a1

Browse files
committed
1 parent 086a5c4 commit 24eb5a1

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

script/predicate_functions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ function is_mri_2plus {
5757
fi
5858
}
5959

60+
function is_ruby_26_plus {
61+
if ruby -e "exit(RUBY_VERSION.to_f >= 2.6)"; then
62+
return 0
63+
else
64+
return 1
65+
fi
66+
}
67+
6068
function is_ruby_23_plus {
6169
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
6270
return 0

script/update_rubygems_and_install_bundler

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
set -e
66
source script/functions.sh
77

8-
if is_ruby_23_plus; then
8+
if is_ruby_26_plus; then
99
gem update --no-document --system
1010
gem install --no-document bundler
11+
elif is_ruby_23_plus; then
12+
echo "Warning installing older versions of Rubygems / Bundler"
13+
gem update --system '3.3.26'
14+
gem install bundler -v '2.3.26'
1115
else
1216
echo "Warning installing older versions of Rubygems / Bundler"
1317
gem update --system '2.7.10'

0 commit comments

Comments
 (0)