Skip to content

Commit 9dbc604

Browse files
committed
refactoring & ci fixes
1 parent ee8f57d commit 9dbc604

27 files changed

+503
-406
lines changed

.github/workflows/rubocop.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest]
1616
ruby: ['2.7', '3.0']
17+
env:
18+
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
19+
BUNDLE_GEMFILE: ${{ github.workspace }}/LintingGemfile
1720

1821
steps:
1922
- uses: actions/checkout@v4
@@ -23,7 +26,5 @@ jobs:
2326
with:
2427
ruby-version: ${{ matrix.ruby }}
2528
bundler-cache: true
26-
- name: Install linting gems
27-
run: gem install rubocop rubocop-performance rubocop-minitest
2829
- name: Run rubocop
29-
run: rubocop
30+
run: bundle exec rubocop

.github/workflows/ruby.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,13 @@ jobs:
105105
with:
106106
bundler: 2.4.9
107107
ruby-version: ${{ matrix.ruby }}
108+
- run: bundle config set --local path 'test/dummy/vendor/bundle'
108109
- run: ./test/bin/create-fake-js-package-managers ${{ matrix.js_package_manager.installer }}
109110
- name: Save dummy app ruby gems to cache
110111
uses: actions/cache@v3
111112
with:
112113
path: test/dummy/vendor/bundle
113-
key: dummy-app-gem-cache-${{ hashFiles('${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile.lock') }}
114+
key: dummy-app-gem-cache-${{ hashFiles(format('{0}/gemfiles/{1}.gemfile.lock', github.workspace, matrix.gemfile)) }}
114115
- name: Install Ruby Gems for dummy app
115116
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
116117
- run: cd test/dummy && yalc add react_ujs && ${{ matrix.js_package_manager.installer }} install

Appraisals

-11
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
appraise 'sprockets_4' do
2-
gem 'rails', '~> 7.0.x'
32
gem 'sprockets', '~> 4.0.x'
43
gem 'sprockets-rails'
54
gem 'turbolinks', '~> 5'
65
gem 'mini_racer', :platforms => :mri
76
end
87

98
appraise 'sprockets_3' do
10-
gem 'rails', '~> 7.0.x'
119
gem 'sprockets', '~> 3.5'
1210
gem 'sprockets-rails'
1311
gem 'turbolinks', '~> 5'
1412
gem 'mini_racer', :platforms => :mri
1513
end
1614

1715
appraise 'shakapacker' do
18-
gem 'rails', '~> 7.0.x'
1916
gem 'shakapacker', '7.2.0'
2017
end
21-
22-
appraise 'base' do
23-
# Appraisal adds `turbolinks` to this gemfile because it is
24-
# present in `./Gemfile`.
25-
# But it causes this gemfile to break, so it must be removed
26-
# from `./gemfiles/rails_5_no_sprockets.gemfile` manually.
27-
gem 'rails', '~> 7.0.x'
28-
end

Gemfile

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
source "http://rubygems.org"
44

55
gemspec
6-
# This is an optional dev-dependency, required whenever sprockets is required
7-
gem "rubocop"
8-
gem "rubocop-minitest"
9-
gem "rubocop-performance"

Gemfile.lock

+107-51
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,77 @@ PATH
1111
GEM
1212
remote: http://rubygems.org/
1313
specs:
14-
actionpack (6.0.2.1)
15-
actionview (= 6.0.2.1)
16-
activesupport (= 6.0.2.1)
17-
rack (~> 2.0, >= 2.0.8)
14+
actioncable (7.0.8.1)
15+
actionpack (= 7.0.8.1)
16+
activesupport (= 7.0.8.1)
17+
nio4r (~> 2.0)
18+
websocket-driver (>= 0.6.1)
19+
actionmailbox (7.0.8.1)
20+
actionpack (= 7.0.8.1)
21+
activejob (= 7.0.8.1)
22+
activerecord (= 7.0.8.1)
23+
activestorage (= 7.0.8.1)
24+
activesupport (= 7.0.8.1)
25+
mail (>= 2.7.1)
26+
net-imap
27+
net-pop
28+
net-smtp
29+
actionmailer (7.0.8.1)
30+
actionpack (= 7.0.8.1)
31+
actionview (= 7.0.8.1)
32+
activejob (= 7.0.8.1)
33+
activesupport (= 7.0.8.1)
34+
mail (~> 2.5, >= 2.5.4)
35+
net-imap
36+
net-pop
37+
net-smtp
38+
rails-dom-testing (~> 2.0)
39+
actionpack (7.0.8.1)
40+
actionview (= 7.0.8.1)
41+
activesupport (= 7.0.8.1)
42+
rack (~> 2.0, >= 2.2.4)
1843
rack-test (>= 0.6.3)
1944
rails-dom-testing (~> 2.0)
2045
rails-html-sanitizer (~> 1.0, >= 1.2.0)
21-
actionview (6.0.2.1)
22-
activesupport (= 6.0.2.1)
46+
actiontext (7.0.8.1)
47+
actionpack (= 7.0.8.1)
48+
activerecord (= 7.0.8.1)
49+
activestorage (= 7.0.8.1)
50+
activesupport (= 7.0.8.1)
51+
globalid (>= 0.6.0)
52+
nokogiri (>= 1.8.5)
53+
actionview (7.0.8.1)
54+
activesupport (= 7.0.8.1)
2355
builder (~> 3.1)
2456
erubi (~> 1.4)
2557
rails-dom-testing (~> 2.0)
2658
rails-html-sanitizer (~> 1.1, >= 1.2.0)
27-
activesupport (6.0.2.1)
59+
activejob (7.0.8.1)
60+
activesupport (= 7.0.8.1)
61+
globalid (>= 0.3.6)
62+
activemodel (7.0.8.1)
63+
activesupport (= 7.0.8.1)
64+
activerecord (7.0.8.1)
65+
activemodel (= 7.0.8.1)
66+
activesupport (= 7.0.8.1)
67+
activestorage (7.0.8.1)
68+
actionpack (= 7.0.8.1)
69+
activejob (= 7.0.8.1)
70+
activerecord (= 7.0.8.1)
71+
activesupport (= 7.0.8.1)
72+
marcel (~> 1.0)
73+
mini_mime (>= 1.1.0)
74+
activesupport (7.0.8.1)
2875
concurrent-ruby (~> 1.0, >= 1.0.2)
29-
i18n (>= 0.7, < 2)
30-
minitest (~> 5.1)
31-
tzinfo (~> 1.1)
32-
zeitwerk (~> 2.2)
76+
i18n (>= 1.6, < 2)
77+
minitest (>= 5.1)
78+
tzinfo (~> 2.0)
3379
addressable (2.8.0)
3480
public_suffix (>= 2.0.2, < 5.0)
3581
appraisal (2.4.1)
3682
bundler
3783
rake
3884
thor (>= 0.14.0)
39-
ast (2.4.2)
4085
babel-source (5.8.35)
4186
babel-transpiler (0.7.0)
4287
babel-source (>= 4.0, < 6)
@@ -65,6 +110,7 @@ GEM
65110
concurrent-ruby (1.1.10)
66111
connection_pool (2.3.0)
67112
crass (1.0.6)
113+
date (3.3.4)
68114
docile (1.1.5)
69115
erubi (1.9.0)
70116
es5-shim-rails (4.0.1)
@@ -74,6 +120,8 @@ GEM
74120
ffi (1.15.5)
75121
formatador (1.1.0)
76122
gem-release (2.2.2)
123+
globalid (1.2.1)
124+
activesupport (>= 6.1)
77125
guard (2.18.0)
78126
formatador (>= 0.2.4)
79127
listen (>= 2.7, < 4.0)
@@ -93,19 +141,36 @@ GEM
93141
actionview (>= 5.0.0)
94142
activesupport (>= 5.0.0)
95143
json (2.3.0)
96-
language_server-protocol (3.17.0.3)
97144
listen (3.0.8)
98145
rb-fsevent (~> 0.9, >= 0.9.4)
99146
rb-inotify (~> 0.9, >= 0.9.7)
100147
loofah (2.19.1)
101148
crass (~> 1.0.2)
102149
nokogiri (>= 1.5.9)
103150
lumberjack (1.2.8)
151+
mail (2.8.1)
152+
mini_mime (>= 0.1.1)
153+
net-imap
154+
net-pop
155+
net-smtp
156+
marcel (1.0.4)
104157
matrix (0.4.2)
105158
method_source (1.0.0)
106-
mini_mime (1.0.2)
159+
mini_mime (1.1.2)
107160
minitest (5.17.0)
161+
minitest-retry (0.2.2)
162+
minitest (>= 5.0)
108163
nenv (0.3.0)
164+
net-imap (0.4.11)
165+
date
166+
net-protocol
167+
net-pop (0.1.2)
168+
net-protocol
169+
net-protocol (0.2.2)
170+
timeout
171+
net-smtp (0.5.0)
172+
net-protocol
173+
nio4r (2.7.3)
109174
nokogiri (1.14.3-x86_64-darwin)
110175
racc (~> 1.4)
111176
nokogiri (1.14.3-x86_64-linux)
@@ -114,10 +179,6 @@ GEM
114179
nenv (~> 0.1)
115180
shellany (~> 0.0)
116181
package_json (0.1.0)
117-
parallel (1.24.0)
118-
parser (3.3.0.5)
119-
ast (~> 2.4.1)
120-
racc
121182
pry (0.14.2)
122183
coderay (~> 1.1)
123184
method_source (~> 1.0)
@@ -129,44 +190,38 @@ GEM
129190
rack (2.2.6.4)
130191
rack-test (2.0.2)
131192
rack (>= 1.3)
193+
rails (7.0.8.1)
194+
actioncable (= 7.0.8.1)
195+
actionmailbox (= 7.0.8.1)
196+
actionmailer (= 7.0.8.1)
197+
actionpack (= 7.0.8.1)
198+
actiontext (= 7.0.8.1)
199+
actionview (= 7.0.8.1)
200+
activejob (= 7.0.8.1)
201+
activemodel (= 7.0.8.1)
202+
activerecord (= 7.0.8.1)
203+
activestorage (= 7.0.8.1)
204+
activesupport (= 7.0.8.1)
205+
bundler (>= 1.15.0)
206+
railties (= 7.0.8.1)
132207
rails-dom-testing (2.0.3)
133208
activesupport (>= 4.2.0)
134209
nokogiri (>= 1.6)
135210
rails-html-sanitizer (1.4.4)
136211
loofah (~> 2.19, >= 2.19.1)
137-
railties (6.0.2.1)
138-
actionpack (= 6.0.2.1)
139-
activesupport (= 6.0.2.1)
212+
railties (7.0.8.1)
213+
actionpack (= 7.0.8.1)
214+
activesupport (= 7.0.8.1)
140215
method_source
141-
rake (>= 0.8.7)
142-
thor (>= 0.20.3, < 2.0)
143-
rainbow (3.1.1)
216+
rake (>= 12.2)
217+
thor (~> 1.0)
218+
zeitwerk (~> 2.5)
144219
rake (13.0.1)
145220
rb-fsevent (0.11.2)
146221
rb-inotify (0.10.1)
147222
ffi (~> 1.0)
148223
regexp_parser (2.6.0)
149224
rexml (3.2.5)
150-
rubocop (1.63.1)
151-
json (~> 2.3)
152-
language_server-protocol (>= 3.17.0)
153-
parallel (~> 1.10)
154-
parser (>= 3.3.0.2)
155-
rainbow (>= 2.2.2, < 4.0)
156-
regexp_parser (>= 1.8, < 3.0)
157-
rexml (>= 3.2.5, < 4.0)
158-
rubocop-ast (>= 1.31.1, < 2.0)
159-
ruby-progressbar (~> 1.7)
160-
unicode-display_width (>= 2.4.0, < 3.0)
161-
rubocop-ast (1.31.2)
162-
parser (>= 3.3.0.4)
163-
rubocop-minitest (0.35.0)
164-
rubocop (>= 1.61, < 2.0)
165-
rubocop-ast (>= 1.31.1, < 2.0)
166-
rubocop-performance (1.21.0)
167-
rubocop (>= 1.48.1, < 2.0)
168-
rubocop-ast (>= 1.31.1, < 2.0)
169-
ruby-progressbar (1.13.0)
170225
rubyzip (2.3.2)
171226
selenium-webdriver (4.9.0)
172227
rexml (~> 3.2, >= 3.2.5)
@@ -180,12 +235,14 @@ GEM
180235
simplecov-html (0.10.2)
181236
test-unit (2.5.5)
182237
thor (1.2.1)
183-
thread_safe (0.3.6)
184238
tilt (2.1.0)
185-
tzinfo (1.2.10)
186-
thread_safe (~> 0.1)
187-
unicode-display_width (2.5.0)
239+
timeout (0.4.1)
240+
tzinfo (2.0.6)
241+
concurrent-ruby (~> 1.0)
188242
websocket (1.2.9)
243+
websocket-driver (0.7.6)
244+
websocket-extensions (>= 0.1.0)
245+
websocket-extensions (0.1.5)
189246
xpath (3.2.0)
190247
nokogiri (~> 1.8)
191248
zeitwerk (2.6.6)
@@ -206,12 +263,11 @@ DEPENDENCIES
206263
guard-minitest
207264
jbuilder
208265
listen (~> 3.0.0)
266+
minitest-retry
209267
package_json
210268
pry-byebug
269+
rails (~> 7.0.7, >= 7.0.7.2)
211270
react-rails!
212-
rubocop
213-
rubocop-minitest
214-
rubocop-performance
215271
selenium-webdriver
216272
test-unit (~> 2.5)
217273

LintingGemfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
source "http://rubygems.org"
4+
# To install gems from this Gemfile locally, use BUNDLE_GEMFILE=./LintingGemfile bundle exec rubocop
5+
gem "rubocop"
6+
gem "rubocop-minitest"
7+
gem "rubocop-performance"

LintingGemfile.lock

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
GEM
2+
remote: http://rubygems.org/
3+
specs:
4+
ast (2.4.2)
5+
json (2.7.2)
6+
language_server-protocol (3.17.0.3)
7+
parallel (1.24.0)
8+
parser (3.3.1.0)
9+
ast (~> 2.4.1)
10+
racc
11+
racc (1.7.3)
12+
rainbow (3.1.1)
13+
regexp_parser (2.9.0)
14+
rexml (3.2.6)
15+
rubocop (1.63.5)
16+
json (~> 2.3)
17+
language_server-protocol (>= 3.17.0)
18+
parallel (~> 1.10)
19+
parser (>= 3.3.0.2)
20+
rainbow (>= 2.2.2, < 4.0)
21+
regexp_parser (>= 1.8, < 3.0)
22+
rexml (>= 3.2.5, < 4.0)
23+
rubocop-ast (>= 1.31.1, < 2.0)
24+
ruby-progressbar (~> 1.7)
25+
unicode-display_width (>= 2.4.0, < 3.0)
26+
rubocop-ast (1.31.3)
27+
parser (>= 3.3.1.0)
28+
rubocop-minitest (0.35.0)
29+
rubocop (>= 1.61, < 2.0)
30+
rubocop-ast (>= 1.31.1, < 2.0)
31+
rubocop-performance (1.21.0)
32+
rubocop (>= 1.48.1, < 2.0)
33+
rubocop-ast (>= 1.31.1, < 2.0)
34+
ruby-progressbar (1.13.0)
35+
unicode-display_width (2.5.0)
36+
37+
PLATFORMS
38+
x86_64-darwin-20
39+
x86_64-linux
40+
41+
DEPENDENCIES
42+
rubocop
43+
rubocop-minitest
44+
rubocop-performance
45+
46+
BUNDLED WITH
47+
2.4.9

0 commit comments

Comments
 (0)