react_on_rails 12.3.0 → 12.4.0.rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +12 -10
  3. data/CHANGELOG.md +21 -15
  4. data/NEWS.md +9 -3
  5. data/README.md +12 -308
  6. data/SUMMARY.md +12 -12
  7. data/docs/additional-details/generator-details.md +1 -1
  8. data/docs/additional-details/manual-installation-overview.md +2 -2
  9. data/docs/api/view-helpers-api.md +4 -4
  10. data/docs/contributor-info/linters.md +1 -1
  11. data/docs/contributor-info/pull-requests.md +1 -1
  12. data/docs/{basics → guides}/client-vs-server-rendering.md +1 -1
  13. data/docs/{basics → guides}/configuration.md +0 -0
  14. data/docs/{basics → guides}/deployment.md +1 -1
  15. data/docs/guides/getting-started.md +183 -0
  16. data/docs/{basics → guides}/hmr-and-hot-reloading-with-the-webpack-dev-server.md +0 -0
  17. data/docs/{basics → guides}/how-react-on-rails-works.md +3 -1
  18. data/docs/guides/how-to-conditionally-server-render-based-on-device-type.md +39 -0
  19. data/docs/guides/how-to-use-different-files-for-client-and-server-rendering.md +98 -0
  20. data/docs/{basics → guides}/i18n.md +0 -0
  21. data/docs/{basics → guides}/installation-into-an-existing-rails-app.md +3 -3
  22. data/docs/{basics → guides}/minitest-configuration.md +0 -0
  23. data/docs/{rails-webpacker-react-integration-options.md → guides/rails-webpacker-react-integration-options.md} +1 -1
  24. data/docs/guides/react-on-rails-overview.md +30 -0
  25. data/docs/{basics → guides}/react-server-rendering.md +2 -2
  26. data/docs/{basics → guides}/render-functions-and-railscontext.md +0 -0
  27. data/docs/{basics → guides}/rspec-configuration.md +2 -2
  28. data/docs/{basics → guides}/tutorial.md +2 -4
  29. data/docs/{basics → guides}/upgrading-react-on-rails.md +1 -1
  30. data/docs/{basics → guides}/webpack-configuration.md +1 -1
  31. data/docs/home.md +19 -378
  32. data/docs/javascript/code-splitting.md +2 -2
  33. data/docs/misc/articles.md +1 -1
  34. data/docs/misc/doctrine.md +3 -3
  35. data/docs/outdated/rails-assets-relative-paths.md +2 -2
  36. data/docs/outdated/rails-assets.md +1 -1
  37. data/docs/rails/convert-rails-5-api-only-app.md +1 -1
  38. data/docs/rails/rails-engine-integration.md +3 -12
  39. data/docs/react-on-rails-pro/react-on-rails-pro.md +43 -0
  40. data/docs/testimonials/testimonials.md +4 -4
  41. data/lib/react_on_rails/helper.rb +6 -0
  42. data/lib/react_on_rails/locales/base.rb +7 -12
  43. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +9 -0
  44. data/lib/react_on_rails/version.rb +1 -1
  45. data/lib/tasks/assets.rake +3 -1
  46. data/package.json +1 -1
  47. metadata +24 -19
@@ -150,6 +150,10 @@ module ReactOnRails
150
150
  end
151
151
 
152
152
  def execjs_timer_polyfills
153
+ if ReactOnRails::Utils.react_on_rails_pro? && ReactOnRailsPro.configuration.execjs_polyfills == false
154
+ return ""
155
+ end
156
+
153
157
  <<~JS
154
158
  function getStackTrace () {
155
159
  var stack;
@@ -204,6 +208,11 @@ module ReactOnRails
204
208
  JS
205
209
  end
206
210
 
211
+ if defined?(ScoutApm)
212
+ include ScoutApm::Tracer
213
+ instrument_method :exec_server_render_js, type: "ReactOnRails", name: "ExecJs React Server Rendering"
214
+ end
215
+
207
216
  private
208
217
 
209
218
  def file_url_to_string(url)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRails
4
- VERSION = "12.3.0"
4
+ VERSION = "12.4.0.rc.0"
5
5
  end
@@ -7,7 +7,9 @@ require "active_support"
7
7
 
8
8
  ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
9
9
 
10
- unless ReactOnRails::WebpackerUtils.webpacker_webpack_production_config_exists?
10
+ skip_react_on_rails_precompile = %w[no false n f].include?(ENV["REACT_ON_RAILS_PRECOMPILE"])
11
+
12
+ if !skip_react_on_rails_precompile && !ReactOnRails::WebpackerUtils.webpacker_webpack_production_config_exists?
11
13
  # Ensure that rails/webpacker does not call bin/webpack if we're providing
12
14
  # the build command.
13
15
  ENV["WEBPACKER_PRECOMPILE"] = "false"
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "12.3.0",
3
+ "version": "12.4.0-rc.0",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
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: 12.3.0
4
+ version: 12.4.0.rc.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-26 00:00:00.000000000 Z
11
+ date: 2021-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -173,20 +173,6 @@ files:
173
173
  - docs/api/javascript-api.md
174
174
  - docs/api/redux-store-api.md
175
175
  - docs/api/view-helpers-api.md
176
- - docs/basics/client-vs-server-rendering.md
177
- - docs/basics/configuration.md
178
- - docs/basics/deployment.md
179
- - docs/basics/hmr-and-hot-reloading-with-the-webpack-dev-server.md
180
- - docs/basics/how-react-on-rails-works.md
181
- - docs/basics/i18n.md
182
- - docs/basics/installation-into-an-existing-rails-app.md
183
- - docs/basics/minitest-configuration.md
184
- - docs/basics/react-server-rendering.md
185
- - docs/basics/render-functions-and-railscontext.md
186
- - docs/basics/rspec-configuration.md
187
- - docs/basics/tutorial.md
188
- - docs/basics/upgrading-react-on-rails.md
189
- - docs/basics/webpack-configuration.md
190
176
  - docs/contributor-info/errors-with-hooks.md
191
177
  - docs/contributor-info/generator-testing.md
192
178
  - docs/contributor-info/linters.md
@@ -194,6 +180,25 @@ files:
194
180
  - docs/contributor-info/releasing.md
195
181
  - docs/deployment/elastic-beanstalk.md
196
182
  - docs/deployment/heroku-deployment.md
183
+ - docs/guides/client-vs-server-rendering.md
184
+ - docs/guides/configuration.md
185
+ - docs/guides/deployment.md
186
+ - docs/guides/getting-started.md
187
+ - docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md
188
+ - docs/guides/how-react-on-rails-works.md
189
+ - docs/guides/how-to-conditionally-server-render-based-on-device-type.md
190
+ - docs/guides/how-to-use-different-files-for-client-and-server-rendering.md
191
+ - docs/guides/i18n.md
192
+ - docs/guides/installation-into-an-existing-rails-app.md
193
+ - docs/guides/minitest-configuration.md
194
+ - docs/guides/rails-webpacker-react-integration-options.md
195
+ - docs/guides/react-on-rails-overview.md
196
+ - docs/guides/react-server-rendering.md
197
+ - docs/guides/render-functions-and-railscontext.md
198
+ - docs/guides/rspec-configuration.md
199
+ - docs/guides/tutorial.md
200
+ - docs/guides/upgrading-react-on-rails.md
201
+ - docs/guides/webpack-configuration.md
197
202
  - docs/home.md
198
203
  - docs/javascript/angular-js-integration-migration.md
199
204
  - docs/javascript/asset-pipeline.md
@@ -220,11 +225,11 @@ files:
220
225
  - docs/outdated/rails-assets-relative-paths.md
221
226
  - docs/outdated/rails-assets.md
222
227
  - docs/outdated/rails3.md
223
- - docs/rails-webpacker-react-integration-options.md
224
228
  - docs/rails/convert-rails-5-api-only-app.md
225
229
  - docs/rails/rails-engine-integration.md
226
230
  - docs/rails/rails_view_rendering_from_inline_javascript.md
227
231
  - docs/rails/turbolinks.md
232
+ - docs/react-on-rails-pro/react-on-rails-pro.md
228
233
  - docs/testimonials/hvmn.md
229
234
  - docs/testimonials/resortpass.md
230
235
  - docs/testimonials/testimonials.md
@@ -328,9 +333,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
328
333
  version: 2.5.0
329
334
  required_rubygems_version: !ruby/object:Gem::Requirement
330
335
  requirements:
331
- - - ">="
336
+ - - ">"
332
337
  - !ruby/object:Gem::Version
333
- version: '0'
338
+ version: 1.3.1
334
339
  requirements: []
335
340
  rubygems_version: 3.1.4
336
341
  signing_key: