Skip to content

Commit 063b210

Browse files
committed
Fully support Shakapacker, including tests & SSR
1 parent e084b94 commit 063b210

File tree

216 files changed

+4856
-16444
lines changed

Some content is hidden

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

216 files changed

+4856
-16444
lines changed

.github/workflows/ruby.yml

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

88
name: Ruby
9-
109
on: [push]
1110
jobs:
1211
check_react_and_ujs:
@@ -35,11 +34,10 @@ jobs:
3534
matrix:
3635
ruby: [2.7]
3736
gemfile:
38-
# These have webpacker:
37+
# These have shakapacker:
3938
- rails_5.2_no_sprockets
40-
- rails_5.2_no_sprockets_webpacker_3
41-
- rails_5.2_no_sprockets_webpacker_4
42-
# These don't have webpacker:
39+
- rails_5.2_no_sprockets_shakapacker
40+
# These don't have shakapacker:
4341
- rails_5.2_sprockets_3
4442
- rails_5.2_sprockets_4
4543
runs-on: ubuntu-latest
@@ -52,6 +50,9 @@ jobs:
5250
steps:
5351
- uses: actions/checkout@v3
5452
- uses: actions/setup-node@v3
53+
- run: npm -g install yalc
54+
- run: yalc publish
55+
- run: cd test/dummy && yalc add react_ujs && yarn
5556
- uses: ruby/setup-ruby@v1
5657
with:
5758
bundler: 2.4.9

.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: 0 additions & 76 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)
@@ -255,11 +181,9 @@ 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

Rakefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

gemfiles/.bundle/config

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

gemfiles/rails_5.2_no_sprockets.gemfile.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@ GEM
197197
thor (1.2.1)
198198
thread_safe (0.3.6)
199199
tilt (2.0.10)
200-
turbolinks (5.2.1)
201-
turbolinks-source (~> 5.2)
202-
turbolinks-source (5.2.0)
203200
tzinfo (1.2.10)
204201
thread_safe (~> 0.1)
205202
webdrivers (4.2.0)
@@ -232,7 +229,6 @@ DEPENDENCIES
232229
react-rails!
233230
selenium-webdriver
234231
test-unit (~> 2.5)
235-
turbolinks
236232
webdrivers
237233

238234
BUNDLED WITH

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)