Skip to content

Commit 0a369c0

Browse files
committed
create up-to-date & passing CI test suite
1 parent 6acfb83 commit 0a369c0

File tree

220 files changed

+5226
-16742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+5226
-16742
lines changed

.github/workflows/ruby.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,39 @@
66
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
77

88
name: Ruby
9-
on: [push, pull_request]
9+
on: [push]
1010
jobs:
11+
check_react_and_ujs:
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
ruby: [2.7]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
bundler: 2.4.9
22+
ruby-version: ${{ matrix.ruby }}
23+
- uses: actions/setup-node@v3
24+
- run: bundle install
25+
- run: yarn
26+
- run: bundle exec rake react:update
27+
- run: bundle exec rake ujs:update
28+
- run: ./check_for_uncommitted_files.sh
29+
30+
1131
test:
32+
needs: check_react_and_ujs
1233
strategy:
1334
fail-fast: false
1435
matrix:
15-
ruby:
16-
- 2.7.0
17-
- 2.6.5
18-
# TODO restore testing against JRuby w/ therubyrhino
19-
# - jruby-9.3.7.0
36+
ruby: [2.7]
2037
gemfile:
21-
# These have webpacker:
38+
# These have shakapacker:
2239
- rails_5.2_no_sprockets
23-
- rails_5.2_no_sprockets_webpacker_3
24-
- rails_5.2_no_sprockets_webpacker_4
25-
# These don't have webpacker:
40+
- rails_5.2_no_sprockets_shakapacker
41+
# These don't have shakapacker:
2642
- rails_5.2_sprockets_3
2743
- rails_5.2_sprockets_4
2844
runs-on: ubuntu-latest
@@ -35,8 +51,12 @@ jobs:
3551
steps:
3652
- uses: actions/checkout@v3
3753
- uses: actions/setup-node@v3
54+
- run: npm -g install yalc
55+
- run: yalc publish
56+
- run: cd test/dummy && yalc add react_ujs && yarn
3857
- uses: ruby/setup-ruby@v1
3958
with:
59+
bundler: 2.4.9
4060
ruby-version: ${{ matrix.ruby }}
4161
# TODO: Impalement caching
4262
# bundler-cache: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ test/*/public/packs
77
**/node_modules
88
react-builds/build
99
coverage/
10+
**/.yalc/**
11+
yalc.lock

Appraisals

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,18 @@ appraise 'rails-5.2-sprockets_4' do
33
gem 'sprockets', '~> 4.0.x'
44
gem 'turbolinks', '~> 5'
55
gem 'mini_racer', :platforms => :mri
6-
gem 'therubyrhino', :platforms => :jruby
76
end
87

98
appraise 'rails-5.2-sprockets_3' do
109
gem 'rails', '~> 5.2.x'
1110
gem 'sprockets', '~> 3.5'
1211
gem 'turbolinks', '~> 5'
1312
gem 'mini_racer', :platforms => :mri
14-
gem 'therubyrhino', :platforms => :jruby
1513
end
1614

17-
appraise 'rails-5.2_no_sprockets_webpacker_3' do
15+
appraise 'rails-5.2_no_sprockets_shakapacker' do
1816
gem 'rails', '~> 5.2.x'
19-
gem 'webpacker', '~> 3.0'
20-
gem 'mini_racer', :platforms => :mri
21-
gem 'therubyrhino', :platforms => :jruby
22-
end
23-
24-
appraise 'rails-5.2_no_sprockets_webpacker_4' do
25-
gem 'rails', '~> 5.2.x'
26-
gem 'webpacker', '~> 4.0'
27-
gem 'mini_racer', :platforms => :mri
28-
gem 'therubyrhino', :platforms => :jruby
17+
gem 'shakapacker', '~> 6.4.x'
2918
end
3019

3120
appraise 'rails-5.2-no_sprockets' do

Gemfile.lock

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,19 @@ PATH
1111
GEM
1212
remote: http://rubygems.org/
1313
specs:
14-
actioncable (6.0.2.1)
15-
actionpack (= 6.0.2.1)
16-
nio4r (~> 2.0)
17-
websocket-driver (>= 0.6.1)
18-
actionmailbox (6.0.2.1)
19-
actionpack (= 6.0.2.1)
20-
activejob (= 6.0.2.1)
21-
activerecord (= 6.0.2.1)
22-
activestorage (= 6.0.2.1)
23-
activesupport (= 6.0.2.1)
24-
mail (>= 2.7.1)
25-
actionmailer (6.0.2.1)
26-
actionpack (= 6.0.2.1)
27-
actionview (= 6.0.2.1)
28-
activejob (= 6.0.2.1)
29-
mail (~> 2.5, >= 2.5.4)
30-
rails-dom-testing (~> 2.0)
3114
actionpack (6.0.2.1)
3215
actionview (= 6.0.2.1)
3316
activesupport (= 6.0.2.1)
3417
rack (~> 2.0, >= 2.0.8)
3518
rack-test (>= 0.6.3)
3619
rails-dom-testing (~> 2.0)
3720
rails-html-sanitizer (~> 1.0, >= 1.2.0)
38-
actiontext (6.0.2.1)
39-
actionpack (= 6.0.2.1)
40-
activerecord (= 6.0.2.1)
41-
activestorage (= 6.0.2.1)
42-
activesupport (= 6.0.2.1)
43-
nokogiri (>= 1.8.5)
4421
actionview (6.0.2.1)
4522
activesupport (= 6.0.2.1)
4623
builder (~> 3.1)
4724
erubi (~> 1.4)
4825
rails-dom-testing (~> 2.0)
4926
rails-html-sanitizer (~> 1.1, >= 1.2.0)
50-
activejob (6.0.2.1)
51-
activesupport (= 6.0.2.1)
52-
globalid (>= 0.3.6)
53-
activemodel (6.0.2.1)
54-
activesupport (= 6.0.2.1)
55-
activerecord (6.0.2.1)
56-
activemodel (= 6.0.2.1)
57-
activesupport (= 6.0.2.1)
58-
activestorage (6.0.2.1)
59-
actionpack (= 6.0.2.1)
60-
activejob (= 6.0.2.1)
61-
activerecord (= 6.0.2.1)
62-
marcel (~> 0.3.1)
6327
activesupport (6.0.2.1)
6428
concurrent-ruby (~> 1.0, >= 1.0.2)
6529
i18n (>= 0.7, < 2)
@@ -110,8 +74,6 @@ GEM
11074
ffi (1.15.5)
11175
formatador (1.1.0)
11276
gem-release (2.2.2)
113-
globalid (1.0.1)
114-
activesupport (>= 5.0)
11577
guard (2.18.0)
11678
formatador (>= 0.2.4)
11779
listen (>= 2.7, < 4.0)
@@ -138,20 +100,12 @@ GEM
138100
crass (~> 1.0.2)
139101
nokogiri (>= 1.5.9)
140102
lumberjack (1.2.8)
141-
mail (2.7.1)
142-
mini_mime (>= 0.1.1)
143-
marcel (0.3.3)
144-
mimemagic (~> 0.3.2)
145103
matrix (0.4.2)
146104
method_source (1.0.0)
147-
mimemagic (0.3.10)
148-
nokogiri (~> 1)
149-
rake
150105
mini_mime (1.0.2)
151106
mini_portile2 (2.8.1)
152107
minitest (5.17.0)
153108
nenv (0.3.0)
154-
nio4r (2.5.2)
155109
nokogiri (1.14.3)
156110
mini_portile2 (~> 2.8.0)
157111
racc (~> 1.4)
@@ -169,21 +123,6 @@ GEM
169123
rack (2.2.6.4)
170124
rack-test (2.0.2)
171125
rack (>= 1.3)
172-
rails (6.0.2.1)
173-
actioncable (= 6.0.2.1)
174-
actionmailbox (= 6.0.2.1)
175-
actionmailer (= 6.0.2.1)
176-
actionpack (= 6.0.2.1)
177-
actiontext (= 6.0.2.1)
178-
actionview (= 6.0.2.1)
179-
activejob (= 6.0.2.1)
180-
activemodel (= 6.0.2.1)
181-
activerecord (= 6.0.2.1)
182-
activestorage (= 6.0.2.1)
183-
activesupport (= 6.0.2.1)
184-
bundler (>= 1.3.0)
185-
railties (= 6.0.2.1)
186-
sprockets-rails (>= 2.0.0)
187126
rails-dom-testing (2.0.3)
188127
activesupport (>= 4.2.0)
189128
nokogiri (>= 1.6)
@@ -212,29 +151,16 @@ GEM
212151
json (>= 1.8, < 3)
213152
simplecov-html (~> 0.10.0)
214153
simplecov-html (0.10.2)
215-
sprockets (4.0.0)
216-
concurrent-ruby (~> 1.0)
217-
rack (> 1, < 3)
218-
sprockets-rails (3.2.1)
219-
actionpack (>= 4.0)
220-
activesupport (>= 4.0)
221-
sprockets (>= 3.0.0)
222154
test-unit (2.5.5)
223155
thor (1.2.1)
224156
thread_safe (0.3.6)
225157
tilt (2.1.0)
226-
turbolinks (5.2.1)
227-
turbolinks-source (~> 5.2)
228-
turbolinks-source (5.2.0)
229158
tzinfo (1.2.10)
230159
thread_safe (~> 0.1)
231160
webdrivers (5.2.0)
232161
nokogiri (~> 1.6)
233162
rubyzip (>= 1.3.0)
234163
selenium-webdriver (~> 4.0)
235-
websocket-driver (0.7.1)
236-
websocket-extensions (>= 0.1.0)
237-
websocket-extensions (0.1.5)
238164
xpath (3.2.0)
239165
nokogiri (~> 1.8)
240166
zeitwerk (2.6.6)
@@ -244,7 +170,7 @@ PLATFORMS
244170

245171
DEPENDENCIES
246172
appraisal
247-
bundler (~> 2.0)
173+
bundler (~> 2.4.9)
248174
capybara
249175
codeclimate-test-reporter
250176
coffee-rails
@@ -255,12 +181,10 @@ DEPENDENCIES
255181
jbuilder
256182
listen (~> 3.0.0)
257183
pry-byebug
258-
rails (>= 3.2)
259184
react-rails!
260185
selenium-webdriver
261186
test-unit (~> 2.5)
262-
turbolinks
263187
webdrivers
264188

265189
BUNDLED WITH
266-
2.4.10
190+
2.4.9

Rakefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ namespace :ujs do
7171
end
7272

7373
require 'appraisal'
74-
require 'rake/testtask'
74+
require 'minitest/test_task'
7575

76-
Rake::TestTask.new(:test) do |t|
76+
Minitest::TestTask.create(:test) do |t|
7777
t.libs << 'lib'
7878
t.libs << 'test'
79-
t.pattern = ENV['TEST_PATTERN'] || 'test/**/*_test.rb'
79+
t.test_globs = ENV['TEST_PATTERN'] || 'test/**/*_test.rb'
8080
t.verbose = ENV['TEST_VERBOSE'] == '1'
8181
t.warning = false
8282
end
@@ -85,10 +85,7 @@ task default: :test
8585

8686
task :test_setup do
8787
load 'webdrivers/Rakefile'
88-
Dir.chdir('./test/dummy_sprockets') do
89-
`yarn install`
90-
end
91-
Dir.chdir('./test/dummy_webpacker3') do
88+
Dir.chdir('./test/dummy') do
9289
`yarn install`
9390
end
9491
end

check_for_uncommitted_files.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -e
3+
4+
status=$(git status --porcelain)
5+
if [ -n "$status" ]; then
6+
status="${status//'%'/'%25'}"
7+
status="${status//$'\n'/'%0A'}"
8+
status="${status//$'\r'/'%0D'}"
9+
echo "$status"
10+
exit 1
11+
else
12+
echo "The repository is clean"
13+
exit 0
14+
fi

gemfiles/.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

gemfiles/rails_5.2_no_sprockets.gemfile.lock

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
react-rails (2.6.2)
4+
react-rails (2.7.0.rc.2)
55
babel-transpiler (>= 0.7.0)
66
connection_pool
77
execjs
@@ -95,6 +95,7 @@ GEM
9595
execjs (2.7.0)
9696
ffi (1.11.3)
9797
formatador (0.2.5)
98+
gem-release (2.2.2)
9899
globalid (0.6.0)
99100
activesupport (>= 5.0)
100101
guard (2.16.1)
@@ -127,12 +128,10 @@ GEM
127128
marcel (1.0.2)
128129
method_source (0.9.2)
129130
mini_mime (1.1.2)
130-
mini_portile2 (2.8.0)
131131
minitest (5.16.3)
132132
nenv (0.3.0)
133133
nio4r (2.5.8)
134-
nokogiri (1.13.8)
135-
mini_portile2 (~> 2.8.0)
134+
nokogiri (1.13.8-x86_64-darwin)
136135
racc (~> 1.4)
137136
notiffany (0.1.3)
138137
nenv (~> 0.1)
@@ -198,9 +197,6 @@ GEM
198197
thor (1.2.1)
199198
thread_safe (0.3.6)
200199
tilt (2.0.10)
201-
turbolinks (5.2.1)
202-
turbolinks-source (~> 5.2)
203-
turbolinks-source (5.2.0)
204200
tzinfo (1.2.10)
205201
thread_safe (~> 0.1)
206202
webdrivers (4.2.0)
@@ -214,15 +210,16 @@ GEM
214210
nokogiri (~> 1.8)
215211

216212
PLATFORMS
217-
ruby
213+
x86_64-darwin-20
218214

219215
DEPENDENCIES
220216
appraisal
221-
bundler (~> 2.0)
217+
bundler (~> 2.4.9)
222218
capybara
223219
codeclimate-test-reporter
224220
coffee-rails
225221
es5-shim-rails (>= 2.0.5)
222+
gem-release
226223
guard
227224
guard-minitest
228225
jbuilder
@@ -232,8 +229,7 @@ DEPENDENCIES
232229
react-rails!
233230
selenium-webdriver
234231
test-unit (~> 2.5)
235-
turbolinks
236232
webdrivers
237233

238234
BUNDLED WITH
239-
2.1.4
235+
2.4.9

gemfiles/rails_5.2_no_sprockets_webpacker_3.gemfile renamed to gemfiles/rails_5.2_no_sprockets_shakapacker.gemfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
source "http://rubygems.org"
44

55
gem "rails", "~> 5.2.x"
6-
gem "webpacker", "~> 3.0"
7-
gem "mini_racer", platforms: :mri
8-
gem "therubyrhino", platforms: :jruby
6+
gem "shakapacker", "6.6.0"
97

108
gemspec path: "../"

0 commit comments

Comments
 (0)