Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring & CI fixes #1339

Merged
merged 3 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
matrix:
os: [ubuntu-latest]
ruby: ['2.7', '3.0']
env:
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/LintingGemfile

steps:
- uses: actions/checkout@v4
Expand All @@ -23,7 +26,5 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install linting gems
run: gem install rubocop rubocop-performance rubocop-minitest
- name: Run rubocop
run: rubocop
run: bundle exec rubocop
3 changes: 2 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ jobs:
with:
bundler: 2.4.9
ruby-version: ${{ matrix.ruby }}
- run: bundle config set --local path 'test/dummy/vendor/bundle'
- run: ./test/bin/create-fake-js-package-managers ${{ matrix.js_package_manager.installer }}
- name: Save dummy app ruby gems to cache
uses: actions/cache@v3
with:
path: test/dummy/vendor/bundle
key: dummy-app-gem-cache-${{ hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock') }}
key: dummy-app-gem-cache-${{ hashFiles(format('{0}/gemfiles/{1}.gemfile.lock', github.workspace, matrix.gemfile)) }}
- name: Install Ruby Gems for dummy app
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=test/dummy/vendor/bundle || bundle _2.4.9_ install --frozen --path=test/dummy/vendor/bundle --jobs=4 --retry=3
- run: cd test/dummy && yalc add react_ujs && ${{ matrix.js_package_manager.installer }} install
Expand Down
11 changes: 0 additions & 11 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
appraise 'sprockets_4' do
gem 'rails', '~> 7.0.x'
gem 'sprockets', '~> 4.0.x'
gem 'sprockets-rails'
gem 'turbolinks', '~> 5'
gem 'mini_racer', :platforms => :mri
end

appraise 'sprockets_3' do
gem 'rails', '~> 7.0.x'
gem 'sprockets', '~> 3.5'
gem 'sprockets-rails'
gem 'turbolinks', '~> 5'
gem 'mini_racer', :platforms => :mri
end

appraise 'shakapacker' do
gem 'rails', '~> 7.0.x'
gem 'shakapacker', '7.2.0'
end

appraise 'base' do
# Appraisal adds `turbolinks` to this gemfile because it is
# present in `./Gemfile`.
# But it causes this gemfile to break, so it must be removed
# from `./gemfiles/rails_5_no_sprockets.gemfile` manually.
gem 'rails', '~> 7.0.x'
end
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Changes since the last non-beta release.

_Please add entries here for your pull requests that are not yet released. Include LINKS for PRs and committers._

#### Fixed
- Replaced call to ReactRailsUJS.unmountComponents that was erroneously removed by #1290 in 3.0.0 #1339

## [3.2.0] - 2024-01-10

#### Changed
Expand Down
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
source "http://rubygems.org"

gemspec
# This is an optional dev-dependency, required whenever sprockets is required
gem "rubocop"
gem "rubocop-minitest"
gem "rubocop-performance"
158 changes: 107 additions & 51 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,77 @@ PATH
GEM
remote: http://rubygems.org/
specs:
actionpack (6.0.2.1)
actionview (= 6.0.2.1)
activesupport (= 6.0.2.1)
rack (~> 2.0, >= 2.0.8)
actioncable (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.1)
actionpack (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activesupport (= 7.0.8.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.1)
actionview (= 7.0.8.1)
activesupport (= 7.0.8.1)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (6.0.2.1)
activesupport (= 6.0.2.1)
actiontext (7.0.8.1)
actionpack (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.1)
activesupport (= 7.0.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (6.0.2.1)
activejob (7.0.8.1)
activesupport (= 7.0.8.1)
globalid (>= 0.3.6)
activemodel (7.0.8.1)
activesupport (= 7.0.8.1)
activerecord (7.0.8.1)
activemodel (= 7.0.8.1)
activesupport (= 7.0.8.1)
activestorage (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activesupport (= 7.0.8.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
appraisal (2.4.1)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
Expand Down Expand Up @@ -65,6 +110,7 @@ GEM
concurrent-ruby (1.1.10)
connection_pool (2.3.0)
crass (1.0.6)
date (3.3.4)
docile (1.1.5)
erubi (1.9.0)
es5-shim-rails (4.0.1)
Expand All @@ -74,6 +120,8 @@ GEM
ffi (1.15.5)
formatador (1.1.0)
gem-release (2.2.2)
globalid (1.2.1)
activesupport (>= 6.1)
guard (2.18.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
Expand All @@ -93,19 +141,36 @@ GEM
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.3.0)
language_server-protocol (3.17.0.3)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.0.2)
mini_mime (1.1.2)
minitest (5.17.0)
minitest-retry (0.2.2)
minitest (>= 5.0)
nenv (0.3.0)
net-imap (0.4.11)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.14.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
Expand All @@ -114,10 +179,6 @@ GEM
nenv (~> 0.1)
shellany (~> 0.0)
package_json (0.1.0)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand All @@ -129,44 +190,38 @@ GEM
rack (2.2.6.4)
rack-test (2.0.2)
rack (>= 1.3)
rails (7.0.8.1)
actioncable (= 7.0.8.1)
actionmailbox (= 7.0.8.1)
actionmailer (= 7.0.8.1)
actionpack (= 7.0.8.1)
actiontext (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activemodel (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
bundler (>= 1.15.0)
railties (= 7.0.8.1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
railties (6.0.2.1)
actionpack (= 6.0.2.1)
activesupport (= 6.0.2.1)
railties (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.1.1)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.6.0)
rexml (3.2.5)
rubocop (1.63.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2)
selenium-webdriver (4.9.0)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -180,12 +235,14 @@ GEM
simplecov-html (0.10.2)
test-unit (2.5.5)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.1.0)
tzinfo (1.2.10)
thread_safe (~> 0.1)
unicode-display_width (2.5.0)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
websocket (1.2.9)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.6)
Expand All @@ -206,12 +263,11 @@ DEPENDENCIES
guard-minitest
jbuilder
listen (~> 3.0.0)
minitest-retry
package_json
pry-byebug
rails (~> 7.0.7, >= 7.0.7.2)
react-rails!
rubocop
rubocop-minitest
rubocop-performance
selenium-webdriver
test-unit (~> 2.5)

Expand Down
7 changes: 7 additions & 0 deletions LintingGemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "http://rubygems.org"
# To install gems from this Gemfile locally, use BUNDLE_GEMFILE=./LintingGemfile bundle exec rubocop
gem "rubocop"
gem "rubocop-minitest"
gem "rubocop-performance"
47 changes: 47 additions & 0 deletions LintingGemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
GEM
remote: http://rubygems.org/
specs:
ast (2.4.2)
json (2.7.2)
language_server-protocol (3.17.0.3)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.63.5)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
unicode-display_width (2.5.0)

PLATFORMS
x86_64-darwin-20
x86_64-linux

DEPENDENCIES
rubocop
rubocop-minitest
rubocop-performance

BUNDLED WITH
2.4.9
Loading
Loading