react_on_rails 13.4.0 → 14.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -2
  3. data/Gemfile.development_dependencies +10 -9
  4. data/Gemfile.lock +434 -0
  5. data/README.md +25 -17
  6. data/lib/generators/react_on_rails/base_generator.rb +3 -2
  7. data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
  8. data/lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml +1 -1
  9. data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +2 -2
  10. data/lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb +1 -1
  11. data/lib/react_on_rails/configuration.rb +39 -25
  12. data/lib/react_on_rails/git_utils.rb +3 -3
  13. data/lib/react_on_rails/helper.rb +3 -4
  14. data/lib/react_on_rails/json_output.rb +0 -17
  15. data/lib/react_on_rails/locales/base.rb +4 -4
  16. data/lib/react_on_rails/locales/to_js.rb +1 -1
  17. data/lib/react_on_rails/packs_generator.rb +5 -6
  18. data/lib/react_on_rails/react_component/render_options.rb +1 -1
  19. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +9 -9
  20. data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +3 -3
  21. data/lib/react_on_rails/test_helper.rb +2 -2
  22. data/lib/react_on_rails/utils.rb +2 -8
  23. data/lib/react_on_rails/version.rb +1 -1
  24. data/lib/react_on_rails/version_checker.rb +2 -2
  25. data/lib/react_on_rails/webpacker_utils.rb +6 -0
  26. data/lib/tasks/assets.rake +1 -1
  27. data/react_on_rails.gemspec +4 -4
  28. metadata +5 -132
  29. data/.bookignore +0 -15
  30. data/.circleci/config.yml +0 -338
  31. data/.coveralls.yml +0 -1
  32. data/.dockerignore +0 -2
  33. data/.eslintignore +0 -17
  34. data/.eslintrc +0 -53
  35. data/.github/FUNDING.yml +0 -1
  36. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
  37. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  38. data/.github/PULL_REQUEST_TEMPLATE.md +0 -19
  39. data/.github/workflows/lint-js-and-ruby.yml +0 -54
  40. data/.github/workflows/main.yml +0 -183
  41. data/.github/workflows/package-js-tests.yml +0 -35
  42. data/.github/workflows/rspec-package-specs.yml +0 -46
  43. data/.gitignore +0 -33
  44. data/.npmignore +0 -22
  45. data/.prettierignore +0 -14
  46. data/.prettierrc +0 -20
  47. data/.rspec +0 -2
  48. data/.rubocop.yml +0 -134
  49. data/.scss-lint.yml +0 -205
  50. data/.travis.yml +0 -61
  51. data/book.json +0 -18
  52. data/docs/additional-details/generator-details.md +0 -56
  53. data/docs/additional-details/manual-installation-overview.md +0 -30
  54. data/docs/additional-details/migrating-from-react-rails.md +0 -17
  55. data/docs/additional-details/recommended-project-structure.md +0 -69
  56. data/docs/additional-details/tips-for-usage-with-sp6.md +0 -15
  57. data/docs/additional-details/updating-dependencies.md +0 -31
  58. data/docs/additional-details/upgrade-webpacker-v3-to-v4.md +0 -10
  59. data/docs/api/javascript-api.md +0 -99
  60. data/docs/api/redux-store-api.md +0 -102
  61. data/docs/api/view-helpers-api.md +0 -133
  62. data/docs/contributor-info/errors-with-hooks.md +0 -45
  63. data/docs/contributor-info/generator-testing.md +0 -11
  64. data/docs/contributor-info/linters.md +0 -68
  65. data/docs/contributor-info/pull-requests.md +0 -42
  66. data/docs/contributor-info/releasing.md +0 -76
  67. data/docs/deployment/elastic-beanstalk.md +0 -63
  68. data/docs/deployment/heroku-deployment.md +0 -39
  69. data/docs/getting-started.md +0 -196
  70. data/docs/guides/client-vs-server-rendering.md +0 -27
  71. data/docs/guides/configuration.md +0 -289
  72. data/docs/guides/deployment.md +0 -5
  73. data/docs/guides/file-system-based-automated-bundle-generation.md +0 -197
  74. data/docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md +0 -104
  75. data/docs/guides/how-react-on-rails-works.md +0 -44
  76. data/docs/guides/how-to-conditionally-server-render-based-on-device-type.md +0 -40
  77. data/docs/guides/how-to-use-different-files-for-client-and-server-rendering.md +0 -98
  78. data/docs/guides/i18n.md +0 -87
  79. data/docs/guides/installation-into-an-existing-rails-app.md +0 -66
  80. data/docs/guides/minitest-configuration.md +0 -31
  81. data/docs/guides/rails-webpacker-react-integration-options.md +0 -213
  82. data/docs/guides/react-on-rails-overview.md +0 -29
  83. data/docs/guides/react-server-rendering.md +0 -32
  84. data/docs/guides/render-functions-and-railscontext.md +0 -205
  85. data/docs/guides/rspec-configuration.md +0 -73
  86. data/docs/guides/tutorial.md +0 -371
  87. data/docs/guides/upgrading-react-on-rails.md +0 -304
  88. data/docs/guides/webpack-configuration.md +0 -42
  89. data/docs/home.md +0 -23
  90. data/docs/javascript/angular-js-integration-migration.md +0 -28
  91. data/docs/javascript/asset-pipeline.md +0 -12
  92. data/docs/javascript/capistrano-deployment.md +0 -18
  93. data/docs/javascript/code-splitting.md +0 -165
  94. data/docs/javascript/converting-from-custom-webpack-config-to-rails-webpacker-config.md +0 -10
  95. data/docs/javascript/credits.md +0 -10
  96. data/docs/javascript/foreman-issues.md +0 -15
  97. data/docs/javascript/images.md +0 -57
  98. data/docs/javascript/node-dependencies-and-npm.md +0 -19
  99. data/docs/javascript/react-and-redux.md +0 -36
  100. data/docs/javascript/react-helmet.md +0 -100
  101. data/docs/javascript/react-router.md +0 -90
  102. data/docs/javascript/server-rendering-tips.md +0 -55
  103. data/docs/javascript/troubleshooting-when-using-shakapacker.md +0 -77
  104. data/docs/javascript/troubleshooting-when-using-webpacker.md +0 -90
  105. data/docs/javascript/webpack-v1-notes.md +0 -23
  106. data/docs/javascript/webpack.md +0 -22
  107. data/docs/misc/articles.md +0 -20
  108. data/docs/misc/code_of_conduct.md +0 -13
  109. data/docs/misc/doctrine.md +0 -77
  110. data/docs/misc/style.md +0 -33
  111. data/docs/misc/tips.md +0 -10
  112. data/docs/outdated/deferred-rendering.md +0 -39
  113. data/docs/outdated/rails-assets-relative-paths.md +0 -195
  114. data/docs/outdated/rails-assets.md +0 -77
  115. data/docs/outdated/rails3.md +0 -9
  116. data/docs/rails/convert-rails-5-api-only-app.md +0 -19
  117. data/docs/rails/rails-engine-integration.md +0 -32
  118. data/docs/rails/rails_view_rendering_from_inline_javascript.md +0 -36
  119. data/docs/rails/turbolinks.md +0 -124
  120. data/docs/react-on-rails-pro/react-on-rails-pro.md +0 -43
  121. data/docs/testimonials/hvmn.md +0 -25
  122. data/docs/testimonials/resortpass.md +0 -13
  123. data/docs/testimonials/testimonials.md +0 -28
  124. data/jest.config.js +0 -4
  125. data/package-scripts.yml +0 -49
  126. data/package.json +0 -96
  127. data/rakelib/docker.rake +0 -26
  128. data/rakelib/dummy_apps.rake +0 -30
  129. data/rakelib/example_type.rb +0 -96
  130. data/rakelib/examples.rake +0 -64
  131. data/rakelib/examples_config.yml +0 -14
  132. data/rakelib/lint.rake +0 -30
  133. data/rakelib/node_package.rake +0 -15
  134. data/rakelib/release.rake +0 -92
  135. data/rakelib/run_rspec.rake +0 -103
  136. data/rakelib/task_helpers.rb +0 -62
  137. data/script/bootstrap +0 -33
  138. data/script/release +0 -3
  139. data/script/setup +0 -23
  140. data/script/test +0 -38
  141. data/webpackConfigLoader.js +0 -71
  142. data/yarn.lock +0 -7010
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.4.0
4
+ version: 14.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-31 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: bundler
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '2'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '2'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: gem-release
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -115,33 +101,12 @@ executables: []
115
101
  extensions: []
116
102
  extra_rdoc_files: []
117
103
  files:
118
- - ".bookignore"
119
- - ".circleci/config.yml"
120
- - ".coveralls.yml"
121
- - ".dockerignore"
122
- - ".eslintignore"
123
- - ".eslintrc"
124
- - ".github/FUNDING.yml"
125
- - ".github/ISSUE_TEMPLATE/bug_report.md"
126
- - ".github/ISSUE_TEMPLATE/feature_request.md"
127
- - ".github/PULL_REQUEST_TEMPLATE.md"
128
- - ".github/workflows/lint-js-and-ruby.yml"
129
- - ".github/workflows/main.yml"
130
- - ".github/workflows/package-js-tests.yml"
131
- - ".github/workflows/rspec-package-specs.yml"
132
- - ".gitignore"
133
- - ".npmignore"
134
- - ".prettierignore"
135
- - ".prettierrc"
136
- - ".rspec"
137
- - ".rubocop.yml"
138
- - ".scss-lint.yml"
139
- - ".travis.yml"
140
104
  - CHANGELOG.md
141
105
  - CONTRIBUTING.md
142
106
  - Dockerfile_tests
143
107
  - Gemfile
144
108
  - Gemfile.development_dependencies
109
+ - Gemfile.lock
145
110
  - KUDOS.md
146
111
  - LICENSE.md
147
112
  - NEWS.md
@@ -151,81 +116,7 @@ files:
151
116
  - Rakefile
152
117
  - SUMMARY.md
153
118
  - app/helpers/react_on_rails_helper.rb
154
- - book.json
155
119
  - docker-compose.yml
156
- - docs/additional-details/generator-details.md
157
- - docs/additional-details/manual-installation-overview.md
158
- - docs/additional-details/migrating-from-react-rails.md
159
- - docs/additional-details/recommended-project-structure.md
160
- - docs/additional-details/tips-for-usage-with-sp6.md
161
- - docs/additional-details/updating-dependencies.md
162
- - docs/additional-details/upgrade-webpacker-v3-to-v4.md
163
- - docs/api/javascript-api.md
164
- - docs/api/redux-store-api.md
165
- - docs/api/view-helpers-api.md
166
- - docs/contributor-info/errors-with-hooks.md
167
- - docs/contributor-info/generator-testing.md
168
- - docs/contributor-info/linters.md
169
- - docs/contributor-info/pull-requests.md
170
- - docs/contributor-info/releasing.md
171
- - docs/deployment/elastic-beanstalk.md
172
- - docs/deployment/heroku-deployment.md
173
- - docs/getting-started.md
174
- - docs/guides/client-vs-server-rendering.md
175
- - docs/guides/configuration.md
176
- - docs/guides/deployment.md
177
- - docs/guides/file-system-based-automated-bundle-generation.md
178
- - docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md
179
- - docs/guides/how-react-on-rails-works.md
180
- - docs/guides/how-to-conditionally-server-render-based-on-device-type.md
181
- - docs/guides/how-to-use-different-files-for-client-and-server-rendering.md
182
- - docs/guides/i18n.md
183
- - docs/guides/installation-into-an-existing-rails-app.md
184
- - docs/guides/minitest-configuration.md
185
- - docs/guides/rails-webpacker-react-integration-options.md
186
- - docs/guides/react-on-rails-overview.md
187
- - docs/guides/react-server-rendering.md
188
- - docs/guides/render-functions-and-railscontext.md
189
- - docs/guides/rspec-configuration.md
190
- - docs/guides/tutorial.md
191
- - docs/guides/upgrading-react-on-rails.md
192
- - docs/guides/webpack-configuration.md
193
- - docs/home.md
194
- - docs/javascript/angular-js-integration-migration.md
195
- - docs/javascript/asset-pipeline.md
196
- - docs/javascript/capistrano-deployment.md
197
- - docs/javascript/code-splitting.md
198
- - docs/javascript/converting-from-custom-webpack-config-to-rails-webpacker-config.md
199
- - docs/javascript/credits.md
200
- - docs/javascript/foreman-issues.md
201
- - docs/javascript/images.md
202
- - docs/javascript/node-dependencies-and-npm.md
203
- - docs/javascript/react-and-redux.md
204
- - docs/javascript/react-helmet.md
205
- - docs/javascript/react-router.md
206
- - docs/javascript/server-rendering-tips.md
207
- - docs/javascript/troubleshooting-when-using-shakapacker.md
208
- - docs/javascript/troubleshooting-when-using-webpacker.md
209
- - docs/javascript/webpack-v1-notes.md
210
- - docs/javascript/webpack.md
211
- - docs/misc/articles.md
212
- - docs/misc/code_of_conduct.md
213
- - docs/misc/doctrine.md
214
- - docs/misc/style.md
215
- - docs/misc/tips.md
216
- - docs/outdated/deferred-rendering.md
217
- - docs/outdated/rails-assets-relative-paths.md
218
- - docs/outdated/rails-assets.md
219
- - docs/outdated/rails3.md
220
- - docs/rails/convert-rails-5-api-only-app.md
221
- - docs/rails/rails-engine-integration.md
222
- - docs/rails/rails_view_rendering_from_inline_javascript.md
223
- - docs/rails/turbolinks.md
224
- - docs/react-on-rails-pro/react-on-rails-pro.md
225
- - docs/testimonials/hvmn.md
226
- - docs/testimonials/resortpass.md
227
- - docs/testimonials/testimonials.md
228
- - jest.config.js
229
120
  - lib/generators/USAGE
230
121
  - lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb
231
122
  - lib/generators/react_on_rails/base_generator.rb
@@ -302,26 +193,8 @@ files:
302
193
  - lib/tasks/assets.rake
303
194
  - lib/tasks/generate_packs.rake
304
195
  - lib/tasks/locale.rake
305
- - package-scripts.yml
306
- - package.json
307
- - rakelib/docker.rake
308
- - rakelib/dummy_apps.rake
309
- - rakelib/example_type.rb
310
- - rakelib/examples.rake
311
- - rakelib/examples_config.yml
312
- - rakelib/lint.rake
313
- - rakelib/node_package.rake
314
- - rakelib/release.rake
315
- - rakelib/run_rspec.rake
316
- - rakelib/task_helpers.rb
317
196
  - react_on_rails.gemspec
318
- - script/bootstrap
319
- - script/release
320
- - script/setup
321
- - script/test
322
197
  - tsconfig.json
323
- - webpackConfigLoader.js
324
- - yarn.lock
325
198
  homepage: https://github.com/shakacode/react_on_rails
326
199
  licenses:
327
200
  - MIT
@@ -340,14 +213,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
340
213
  requirements:
341
214
  - - ">="
342
215
  - !ruby/object:Gem::Version
343
- version: 2.7.0
216
+ version: 3.0.0
344
217
  required_rubygems_version: !ruby/object:Gem::Requirement
345
218
  requirements:
346
219
  - - ">="
347
220
  - !ruby/object:Gem::Version
348
221
  version: '0'
349
222
  requirements: []
350
- rubygems_version: 3.2.32
223
+ rubygems_version: 3.5.7
351
224
  signing_key:
352
225
  specification_version: 4
353
226
  summary: Rails with react server rendering with webpack.
data/.bookignore DELETED
@@ -1,15 +0,0 @@
1
- # Directories to ignore
2
- app/*
3
- gen-examples/*
4
- lib/*
5
- node_package/"
6
- rakelib/*
7
- script/*
8
- spec/*
9
-
10
- # files in repo root to ignore
11
- Gemfile
12
- package.json
13
- Rakefile
14
- react_on_rails.gemspec
15
- ruby-lint.yml
data/.circleci/config.yml DELETED
@@ -1,338 +0,0 @@
1
- # CircleCI is not longer in use by this repository & this file is now for reference only.
2
- version: 2
3
-
4
- aliases:
5
- - &docker-image
6
- - image: circleci/ruby:2.7-node-browsers
7
-
8
- # Print critical data and executables versions.
9
- - &print-system-info
10
- name: Print system information
11
- command: |
12
- echo "Linux release: "; cat /etc/issue
13
- echo "Current user: "; whoami
14
- echo "Current directory: "; pwd
15
- echo "Ruby version: "; ruby -v
16
- echo "Node version: "; node -v
17
- echo "Yarn version: "; yarn --version
18
- echo "Bundler version: "; bundle --version
19
- - &lint-js
20
- name: Linting of JS
21
- command: yarn start lint
22
-
23
- - &lint-ruby
24
- name: Linting of Ruby
25
- command: bundle exec rubocop
26
-
27
- - &format
28
- name: Check formatting
29
- command: yarn start format.listDifferent
30
-
31
- # Install/update Node modules for renderer package unless existing set of modules is satisfying Yarn.
32
- - &install-package-node-modules
33
- name: Install Node modules with Yarn for renderer package
34
- command: |
35
- sudo yarn global add yalc
36
- yarn install --no-progress --no-emoji
37
- yarn run eslint -v
38
-
39
- # Install/update Node modules for dummy app unless existing set of modules is satisfying Yarn.
40
- - &install-dummy-app-node-modules
41
- name: Install Node modules with Yarn for dummy app
42
- command: cd spec/dummy && yarn install --no-progress --no-emoji
43
-
44
- # Setup yarn links for react-on-rails
45
- - &install-yalc-publish
46
- name: yalc publish for react-on-rails
47
- command: yalc publish
48
-
49
- - &install-yalc-add-react-on-rails
50
- name: yalc add react-on-rails
51
- command: cd spec/dummy && yalc add react-on-rails
52
-
53
- # Install ruby gems unless existing set of gems is satisfying bundler.
54
- - &install-dummy-app-ruby-gems
55
- name: Install Ruby Gems for dummy app
56
- command: |
57
- gem install bundler:2.4.17
58
- echo "Bundler version: "; bundle --version
59
- cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
60
-
61
- # Install ruby gems unless existing set of gems is satisfying bundler.
62
- - &install-package-ruby-gems
63
- name: Install Ruby Gems for package
64
- command: |
65
- gem install bundler:2.4.17
66
- echo "Bundler version: "; bundle --version
67
- bundle lock --add-platform 'x86_64-linux'
68
- bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
69
-
70
- # Restore node_modules dir from cache using yarn.lock checksum as a key.
71
- - &restore-package-node-modules-cache
72
- name: Restore cached node_modules directory
73
- keys:
74
- - v5-package-node-modules-cache-{{ checksum "yarn.lock" }}
75
-
76
- # Restore spec/dummy/node_modules dir from cache using yarn.lock checksum as a key.
77
- - &restore-dummy-app-node-modules-cache
78
- name: Restore cached spec/dummy/node_modules directory
79
- keys:
80
- - v5-dummy-app-node-modules-cache-{{ checksum "spec/dummy/yarn.lock" }}
81
-
82
- # Restore vendor/bundle dir from cache using Gemfile.lock checksum as a key.
83
- - &restore-dummy-app-gem-cache
84
- name: Restore cached Ruby Gems for dummy app
85
- keys:
86
- - v5-dummy-app-gem-cache-{{ checksum "spec/dummy/Gemfile.lock" }}
87
-
88
- # Restore vendor/bundle dir from cache using react_on_rails.gemspec checksum as a key.
89
- - &restore-package-gem-cache
90
- name: Restore cached Ruby Gems for package
91
- keys:
92
- - v5-package-app-gem-cache-{{ checksum "react_on_rails.gemspec" }}
93
-
94
- # NOTE: Sometimes CI generated docker images are not updated in time to keep up with the minimum required
95
- # by chromedriver versions of Chrome. Just bump here Chrome version if chromedriver raises errors
96
- - &install-latest-chrome
97
- name: Ensure minimum required Chrome version
98
- command: |
99
- echo -e "Installed $(google-chrome --version)\n"
100
- MINIMUM_REQUIRED_CHROME_VERSION=75
101
- INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
102
- if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
103
- wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
104
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
105
- sudo apt-get update
106
- sudo apt-get install google-chrome-stable
107
- echo -e "\nInstalled $(google-chrome --version)"
108
- fi
109
-
110
- jobs:
111
- # Lint all
112
- lint-js-and-ruby:
113
- docker: *docker-image
114
- steps:
115
- - checkout
116
- - run: *print-system-info
117
- - restore_cache: *restore-package-node-modules-cache
118
- - restore_cache: *restore-package-gem-cache
119
- - run: *install-package-ruby-gems
120
- - run: *lint-ruby
121
- - run: *lint-js
122
- - run: *format
123
-
124
- prettier:
125
- docker: *docker-image
126
- parallelism: 1
127
- steps:
128
- - checkout
129
- - restore_cache: *restore-package-node-modules-cache
130
- - run:
131
- name: prettier
132
- command: yarn start format.listDifferent
133
-
134
- # Install Node modules for Renderer package with Yarn and save them to chache.
135
- install-package-node-packages:
136
- docker: *docker-image
137
- steps:
138
- - checkout
139
- - run: *print-system-info
140
- - restore_cache: *restore-package-node-modules-cache
141
- - run: *install-package-node-modules
142
- - save_cache:
143
- name: Save root node_modules to cache
144
- key: v5-package-node-modules-cache-{{ checksum "yarn.lock" }}
145
- paths:
146
- - node_modules
147
-
148
-
149
- # Install Node modules for dummy app with Yarn and save them to cache.
150
- install-dummy-app-node-packages:
151
- docker: *docker-image
152
- steps:
153
- - checkout
154
- - run: *print-system-info
155
- - restore_cache: *restore-dummy-app-node-modules-cache
156
- - run: *install-package-node-modules
157
- - run: *install-yalc-publish
158
- - run: *install-yalc-add-react-on-rails
159
- - run: *install-dummy-app-node-modules
160
- - save_cache:
161
- name: Save spec/dummy/node_modules to cache
162
- key: v5-dummy-app-node-modules-cache-{{ checksum "spec/dummy/yarn.lock" }}
163
- paths:
164
- - spec/dummy/node_modules
165
- - spec/dummy/node_modules
166
-
167
- # Install Ruby gems for package with Bundler and save them to cache.
168
- install-package-ruby-gems:
169
- docker: *docker-image
170
- steps:
171
- - checkout
172
- - run: *print-system-info
173
- - restore_cache: *restore-package-gem-cache
174
- - run: *install-package-ruby-gems
175
- - save_cache:
176
- name: Save dummy app ruby gems to cache
177
- key: v5-package-app-gem-cache-{{ checksum "react_on_rails.gemspec" }}
178
- paths:
179
- - vendor/bundle
180
-
181
- # Install Ruby gems for dummy app with Bundler and save them to cache.
182
- install-dummy-app-ruby-gems:
183
- docker: *docker-image
184
- steps:
185
- - checkout
186
- - run: *print-system-info
187
- - restore_cache: *restore-dummy-app-gem-cache
188
- - run: *install-dummy-app-ruby-gems
189
- - save_cache:
190
- name: Save dummy app ruby gems to cache
191
- key: v5-dummy-app-gem-cache-{{ checksum "spec/dummy/Gemfile.lock" }}
192
- paths:
193
- - spec/dummy/vendor/bundle
194
-
195
- # Build client and server bundles for dummy app with Webpack and save them to cache.
196
- # NOTE: keeping around this cache in case we have multiple rspec suites in the future to tests
197
- # different node renderers.
198
- build-dummy-app-webpack-test-bundles:
199
- docker: *docker-image
200
- steps:
201
- - checkout
202
- - run: *print-system-info
203
- - run: *install-package-node-modules
204
- - run: *install-yalc-publish
205
- - restore_cache: *restore-dummy-app-node-modules-cache
206
- - run: *install-yalc-add-react-on-rails
207
- - run: *install-dummy-app-node-modules
208
- - run: *install-dummy-app-ruby-gems
209
- - run:
210
- name: generate file system-based packs
211
- command: cd spec/dummy && bundle exec rake react_on_rails:generate_packs
212
- - run:
213
- name: Build test bundles for dummy app
214
- command: cd spec/dummy && yarn run build:test
215
- - save_cache:
216
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
217
- key: v5-dummy-app-webpack-bundle-{{ .Revision }}
218
- paths:
219
- - spec/dummy/public/webpack
220
- # Run JS unit tests for Renderer package.
221
- package-js-tests:
222
- docker: *docker-image
223
- steps:
224
- - checkout
225
- - run: *print-system-info
226
- - restore_cache: *restore-package-node-modules-cache
227
- - run: *install-package-node-modules
228
- - run:
229
- name: Run JS unit tests for Renderer package
230
- command: yarn test
231
-
232
- rspec-package-specs:
233
- docker: *docker-image
234
- steps:
235
- - checkout
236
- - run: *print-system-info
237
- - restore_cache: *restore-package-gem-cache
238
- - run: *install-package-ruby-gems
239
- - run:
240
- name: Run rspec tests
241
- command: |
242
- bundle exec rspec spec/react_on_rails
243
- - store_test_results:
244
- path: ~/rspec
245
- - store_artifacts:
246
- path: log/test.log
247
-
248
- main:
249
- docker: *docker-image
250
- steps:
251
- - checkout
252
- - run: *print-system-info
253
- - restore_cache: *restore-package-gem-cache
254
- - restore_cache: *restore-dummy-app-gem-cache
255
- - restore_cache:
256
- name: Restore cached webpack bundles for dummy app
257
- key: v5-dummy-app-webpack-bundle-{{ .Revision }}
258
- - restore_cache: *restore-dummy-app-node-modules-cache
259
- - restore_cache: *restore-package-node-modules-cache
260
- - run: *install-package-node-modules
261
- - run: *install-yalc-publish
262
- - run: *install-yalc-add-react-on-rails
263
- - run: *install-package-ruby-gems
264
- - run: *install-dummy-app-ruby-gems
265
- - run: *install-latest-chrome
266
- - run:
267
- name: Touch webpack bundles
268
- command: touch spec/dummy/public/webpack/test/*
269
- - run:
270
- name: Install yalc globally
271
- command: sudo yarn global add yalc
272
- - run:
273
- name: Prep for CI
274
- # TODO -- need to leverage Circle CI containers
275
- command: |
276
- bundle exec rake prepare_for_ci
277
- - run:
278
- name: Main CI
279
- # TODO -- need to leverage Circle CI containers
280
- command: |
281
- bundle exec rake run_rspec:all_dummy
282
- # The following step will run only if the main job is finished successfully.
283
- # Build hook is triggered by curl command described here https://docs.netlify.com/configure-builds/build-hooks/
284
- # NETLIFY_HOOK is an environment variable on CircleCI to keep sensitive data outside the repo
285
- - run:
286
- name: Deploy SC website
287
- command: |
288
- if [ $CIRCLE_BRANCH = "master" ]; then
289
- curl -X POST -d '{}' ${NETLIFY_HOOK}
290
- fi
291
- when: on_success
292
- - store_test_results:
293
- path: ~/rspec
294
- - store_artifacts:
295
- path: spec/dummy/tmp/capybara
296
- - store_artifacts:
297
- path: spec/dummy/tmp/screenshots
298
- - store_artifacts:
299
- path: spec/dummy/log/test.log
300
- - store_artifacts:
301
- path: spec/dummy/yarn-error.log
302
-
303
- workflows:
304
- version: 2
305
- build-and-test:
306
- jobs:
307
- - install-package-node-packages
308
- - install-package-ruby-gems
309
- - install-dummy-app-node-packages
310
- - install-dummy-app-ruby-gems
311
- - lint-js-and-ruby:
312
- requires:
313
- - install-package-node-packages
314
- - install-package-ruby-gems
315
- - prettier:
316
- filters:
317
- branches:
318
- ignore: master
319
- requires:
320
- - install-package-node-packages
321
- - build-dummy-app-webpack-test-bundles:
322
- requires:
323
- - install-dummy-app-node-packages
324
- - install-dummy-app-ruby-gems
325
- - package-js-tests:
326
- requires:
327
- - install-package-node-packages
328
- - rspec-package-specs:
329
- requires:
330
- - install-package-ruby-gems
331
- - build-dummy-app-webpack-test-bundles
332
- - install-dummy-app-ruby-gems
333
- - main:
334
- requires:
335
- - install-package-ruby-gems
336
- - install-dummy-app-ruby-gems
337
- - install-package-node-packages
338
- - build-dummy-app-webpack-test-bundles
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci
data/.dockerignore DELETED
@@ -1,2 +0,0 @@
1
- coverage/
2
- docker-compose.yml
data/.eslintignore DELETED
@@ -1,17 +0,0 @@
1
- node_modules
2
- coverage
3
- spec/react_on_rails/dummy-for-generators
4
- spec/dummy
5
- node_package/lib/
6
- node_package/tests/node_modules
7
- node_package/webpack.config.js
8
- **/node_modules/**
9
- **/assets/webpack/**
10
- **/public/webpack/**
11
- **/generated/**
12
- **/app/assets/javascripts/application.js
13
- **/coverage/**
14
- **/cable.js
15
- **/public/packs*/*
16
- gen-examples
17
- bundle/
data/.eslintrc DELETED
@@ -1,53 +0,0 @@
1
- extends:
2
- - eslint-config-shakacode
3
- - prettier
4
- - prettier/react
5
-
6
- plugins:
7
- - prettier
8
-
9
- globals:
10
- __DEBUG_SERVER_ERRORS__: true
11
- __SERVER_ERRORS__: true
12
-
13
- env:
14
- browser: true
15
- node: true
16
- mocha: true
17
- jest: true
18
-
19
- overrides:
20
- - files: ["**/*.ts", "**/*.tsx"]
21
- parser: "@typescript-eslint/parser"
22
- parserOptions:
23
- ecmaVersion: 2018
24
- sourceType: module
25
- project: "./tsconfig.json"
26
- extends:
27
- - eslint:recommended
28
- - plugin:@typescript-eslint/eslint-recommended
29
- - plugin:@typescript-eslint/recommended
30
- plugins:
31
- - "@typescript-eslint"
32
- rules:
33
- "@typescript-eslint/no-namespace": 0
34
- "@typescript-eslint/no-shadow": ["error"]
35
-
36
- rules:
37
- no-shadow: 0
38
- no-console: 0
39
- function-paren-newline: 0
40
- object-curly-newline: 0
41
- no-restricted-syntax: ["error", "SequenceExpression"]
42
- # https://stackoverflow.com/a/59268871/5241481
43
- import/extensions: ['error', 'ignorePackages', {"js": 'never',"ts": "never"}]
44
-
45
- # https://github.com/benmosher/eslint-plugin-import/issues/340
46
- import/no-extraneous-dependencies: 0
47
-
48
- settings:
49
- import/core-modules:
50
- - react-redux
51
- import/resolver:
52
- node:
53
- extensions: [".js", ".ts", ".d.ts"]
data/.github/FUNDING.yml DELETED
@@ -1 +0,0 @@
1
- github: [shakacode]
@@ -1,23 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open [a discussion](https://github.com/shakacode/react_on_rails/discussions).
11
-
12
- ## Environment
13
-
14
- 1. Ruby version:
15
- 2. Rails version:
16
- 3. Shakapacker/Webpacker version:
17
- 4. React on Rails version:
18
-
19
- ## Expected behavior
20
-
21
- ## Actual behavior
22
-
23
- ## Small, reproducible repo
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Is your feature request related to a problem? Please describe.**
11
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
-
13
- **Describe the solution you'd like**
14
- A clear and concise description of what you want to happen.
15
-
16
- **Describe alternatives you've considered**
17
- A clear and concise description of any alternative solutions or features you've considered.
18
-
19
- **Additional context**
20
- Add any other context or screenshots about the feature request here.
@@ -1,19 +0,0 @@
1
- ### Summary
2
-
3
- _Remove this paragraph and provide a general description of the code changes in your pull
4
- request... were there any bugs you had fixed? If so, mention them. If
5
- these bugs have open GitHub issues, be sure to tag them here as well,
6
- to keep the conversation linked together._
7
-
8
- ### Pull Request checklist
9
- _Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by `~`._
10
-
11
- - [ ] Add/update test to cover these changes
12
- - [ ] Update documentation
13
- - [ ] Update CHANGELOG file
14
- _Add the CHANGELOG entry at the top of the file._
15
-
16
- ### Other Information
17
-
18
- _Remove this paragraph and mention any other important and relevant information such as benchmarks._
19
-