File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 5
5
set -e
6
6
source script/functions.sh
7
7
8
- if ruby -e " exit(ENV['RAILS_VERSION'].to_f < 5)" ; then
8
+ if ruby -e " exit(ENV['RAILS_VERSION'].scan(/\d+\.\d+.\d+/)[0]. to_f < 5)" ; then
9
9
# On Rails versions less than 5, Bundler 2.0 is not supported
10
10
echo " Warning dowgrading to older version of Bundler"
11
- gem uninstall -aIx bundler
11
+
12
+ gem uninstall -aIx bundler || echo " Warning error occured removing bundler via gem"
12
13
13
14
# this only works on Ruby 2.3 which is luckily the version we need to fix
14
- if is_ruby_23_plus ; then
15
+ if is_ruby_23 ; then
15
16
rvm @global do gem uninstall -aIx bundler
16
17
fi
17
18
Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ function is_mri_2plus {
57
57
fi
58
58
}
59
59
60
+ function is_ruby_23 {
61
+ if ruby -e " exit(RUBY_VERSION.to_f == 2.3)" ; then
62
+ return 0
63
+ else
64
+ return 1
65
+ fi
66
+ }
67
+
60
68
function is_ruby_23_plus {
61
69
if ruby -e " exit(RUBY_VERSION.to_f >= 2.3)" ; then
62
70
return 0
You can’t perform that action at this time.
0 commit comments