Skip to content

Commit 2c04db6

Browse files
authored
Update Ruby Dependencies (#1595)
* Remove unused sqlite3 gem * Move sqlite3 gem into dummy gemfile * Revert "Move sqlite3 gem into dummy gemfile" This reverts commit 270507e. * Revert "Remove unused sqlite3 gem" This reverts commit 55629c9. * Bump rails to 7.1 * Bump Shakapacker to 7.2.1 * Bump rubocop related gems * Fix Rubocop issues * Bump to use Ruby 3.0.0 * Fix Rubocop issues * Update CircleCI config for Ruby 3 * Remove outdated comment for Ruby 2.2 * Update changelog
1 parent 6f1ca20 commit 2c04db6

File tree

26 files changed

+180
-286
lines changed

26 files changed

+180
-286
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33

44
aliases:
55
- &docker-image
6-
- image: circleci/ruby:2.7-node-browsers
6+
- image: circleci/ruby:3.0-node-browsers
77

88
# Print critical data and executables versions.
99
- &print-system-info
@@ -54,15 +54,15 @@ aliases:
5454
- &install-dummy-app-ruby-gems
5555
name: Install Ruby Gems for dummy app
5656
command: |
57-
gem install bundler:2.4.17
57+
gem install bundler:2.5.3
5858
echo "Bundler version: "; bundle --version
5959
cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
6060
6161
# Install ruby gems unless existing set of gems is satisfying bundler.
6262
- &install-package-ruby-gems
6363
name: Install Ruby Gems for package
6464
command: |
65-
gem install bundler:2.4.17
65+
gem install bundler:2.5.3
6666
echo "Bundler version: "; bundle --version
6767
bundle lock --add-platform 'x86_64-linux'
6868
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3

.github/workflows/lint-js-and-ruby.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: ruby/setup-ruby@v1
2323
with:
2424
ruby-version: ${{ matrix.ruby }}
25-
bundler: 2.4.17
25+
bundler: 2.5.3
2626
- name: Setup Node
2727
uses: actions/setup-node@v3
2828
with:
@@ -52,7 +52,7 @@ jobs:
5252
yarn run eslint -v
5353
sudo yarn global add yalc
5454
- name: Install Ruby Gems for package
55-
run: bundle check --path=vendor/bundle || bundle _2.4.17_ install --path=vendor/bundle --jobs=4 --retry=3
55+
run: bundle check --path=vendor/bundle || bundle _2.5.3_ install --path=vendor/bundle --jobs=4 --retry=3
5656
- name: Linting of Ruby
5757
run: bundle exec rubocop
5858
- name: Linting of JS

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build-dummy-app-webpack-test-bundles:
1111
strategy:
1212
matrix:
13-
ruby: [2.7, 3.2]
13+
ruby: [3.0, 3.3]
1414
node: [14, 20]
1515
runs-on: ubuntu-22.04
1616
steps:
@@ -21,7 +21,7 @@ jobs:
2121
uses: ruby/setup-ruby@v1
2222
with:
2323
ruby-version: ${{ matrix.ruby }}
24-
bundler: 2.4.17
24+
bundler: 2.5.3
2525
# libyaml-dev is needed for psych v5
2626
# this gem depends on sdoc which depends on rdoc which depends on psych
2727
- name: Fix dependency for libyaml-dev
@@ -66,7 +66,7 @@ jobs:
6666
path: spec/dummy/vendor/bundle
6767
key: v5-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
6868
- name: Install Ruby Gems for dummy app
69-
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.4.17_ install --path=vendor/bundle --jobs=4 --retry=3
69+
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.3_ install --path=vendor/bundle --jobs=4 --retry=3
7070
- name: generate file system-based packs
7171
run: cd spec/dummy && RAILS_ENV=test bundle exec rake react_on_rails:generate_packs
7272
- name: Build test bundles for dummy app
@@ -83,7 +83,7 @@ jobs:
8383
needs: build-dummy-app-webpack-test-bundles
8484
strategy:
8585
matrix:
86-
ruby: [2.7, 3.2]
86+
ruby: [3.0, 3.3]
8787
node: [14, 20]
8888
rake_task: ['run_rspec:all_but_examples', 'run_rspec:examples']
8989
runs-on: ubuntu-22.04
@@ -95,7 +95,7 @@ jobs:
9595
uses: ruby/setup-ruby@v1
9696
with:
9797
ruby-version: ${{ matrix.ruby }}
98-
bundler: 2.4.17
98+
bundler: 2.5.3
9999
- name: Setup Node
100100
uses: actions/setup-node@v3
101101
with:
@@ -148,7 +148,7 @@ jobs:
148148
- name: Install Ruby Gems for package
149149
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
150150
- name: Install Ruby Gems for dummy app
151-
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.4.17_ install --path=vendor/bundle --jobs=4 --retry=3
151+
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.3_ install --path=vendor/bundle --jobs=4 --retry=3
152152
- name: Ensure minimum required Chrome version
153153
run: |
154154
echo -e "Already installed $(google-chrome --version)\n"

.github/workflows/rspec-package-specs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
ruby: [2.7, 3.2]
13+
ruby: [3.0, 3.3]
1414
node: [14, 20]
1515
runs-on: ubuntu-22.04
1616
steps:
@@ -21,7 +21,7 @@ jobs:
2121
uses: ruby/setup-ruby@v1
2222
with:
2323
ruby-version: ${{ matrix.ruby }}
24-
bundler: 2.4.17
24+
bundler: 2.5.3
2525
- name: Print system information
2626
run: |
2727
echo "Linux release: "; cat /etc/issue

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require:
77
AllCops:
88
NewCops: enable
99
DisplayCopNames: true
10-
TargetRubyVersion: 2.5
10+
TargetRubyVersion: 3.0.0
1111

1212
Include:
1313
- '**/Rakefile'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
1515
### [Unreleased]
1616
Changes since the last non-beta release.
1717

18+
#### Removed
19+
- Dropped Ruby 2.7 support [PR 1595](https://github.com/shakacode/react_on_rails/pull/1595) by [ahangarha](https://github.com/ahangarha).
20+
1821
### [13.4.1]
1922
#### Fixed
2023
- Fixed Typescript types for ServerRenderResult, ReactComponent, RenderFunction, and RailsContext interfaces. [PR 1582](https://github.com/shakacode/react_on_rails/pull/1582) & [PR 1585](https://github.com/shakacode/react_on_rails/pull/1585) by [kotarella1110](https://github.com/kotarella1110)

Gemfile.development_dependencies

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# frozen_string_literal: true
22

3-
gem "shakapacker", "7.0.1"
3+
gem "shakapacker", "7.2.1"
44
gem "bootsnap", require: false
5-
gem "rails", "~> 7.0", ">= 7.0.1"
5+
gem "rails", "~> 7.1"
66

7-
# sqlite3 1.7.0 ends native gem support for Ruby 2.7
8-
gem "sqlite3", "~> 1.0", "< 1.7.0"
7+
gem "sqlite3"
98
gem "sass-rails", "~> 6.0"
109
gem "uglifier"
1110
gem "jquery-rails"
1211
gem "puma", "~> 6.0"
13-
gem "bundler", "2.4.17"
12+
gem "bundler", "2.5.3"
1413

1514
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
1615
gem "turbolinks" if ENV["DISABLE_TURBOLINKS"].nil? || ENV["DISABLE_TURBOLINKS"].strip.empty?
@@ -31,9 +30,9 @@ group :development, :test do
3130
gem "pry-doc"
3231
gem "pry-rails"
3332
gem "pry-rescue"
34-
gem "rubocop", "~>1.56", require: false
35-
gem "rubocop-performance", "~>1.18.0", require: false
36-
gem "rubocop-rspec", "~>2.23.2", require: false
33+
gem "rubocop", "~>1.59", require: false
34+
gem "rubocop-performance", "~>1.20.0", require: false
35+
gem "rubocop-rspec", "~>2.26", require: false
3736
gem "scss_lint", require: false
3837
gem "spring", "~> 4.0"
3938
end

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ _Requires creating a free account._
7373

7474
## Prerequisites
7575

76-
Ruby on Rails >=5, rails/webpacker >= 4.2 or shakapacker > 6, Ruby >= 2.7
76+
Ruby on Rails >=5, rails/webpacker >= 4.2 or shakapacker > 6, Ruby >= 3.0.0
7777

7878
# Support
7979

lib/generators/react_on_rails/base_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def add_base_gems_to_gemfile
7777
end
7878

7979
def add_yarn_dependencies
80-
major_minor_patch_only = /\A\d+\.\d+\.\d+\z/.freeze
80+
major_minor_patch_only = /\A\d+\.\d+\.\d+\z/
8181
if ReactOnRails::VERSION.match?(major_minor_patch_only)
8282
run "yarn add react-on-rails@#{ReactOnRails::VERSION} --exact"
8383
else

lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# ActiveRecord::Migration.maintain_test_schema!
4141

4242
RSpec.configure do |config|
43-
config.before(:each, js: true, type: :system) do
43+
config.before(:each, :js, type: :system) do
4444
driven_by :selenium_chrome
4545
end
4646

0 commit comments

Comments
 (0)