File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1313jobs :
1414 rubocop :
1515 name : Rubocop
16- runs-on : ' ubuntu-20.04 '
16+ runs-on : ' ubuntu-latest '
1717 steps :
1818 - uses : actions/checkout@v4
1919 - uses : ruby/setup-ruby@v1
Original file line number Diff line number Diff line change 22
33set -e
44
5- echo " Installing latest rubygems / bundler"
6- yes | gem update --system
7- yes | gem install bundler
5+ function is_ruby_31_plus {
6+ if ruby -e " exit(RUBY_VERSION.to_f >= 3.1)" ; then
7+ return 0
8+ else
9+ return 1
10+ fi
11+ }
12+
13+ if is_ruby_31_plus; then
14+ echo " Installing latest rubygems / bundler"
15+ yes | gem update --system
16+ yes | gem install bundler
17+ else
18+ echo " Installing rubygems 3.2.22 / bundler 2.2.22"
19+ yes | gem update --system ' 3.2.22'
20+ yes | gem install bundler -v ' 2.2.22'
21+ fi
You can’t perform that action at this time.
0 commit comments