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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 545e97728f6633e1adc5091f8e1a72c377ce8d8c809ca8b6378c0b1bffe62c7d
4
- data.tar.gz: 06a83f533ee9518518afeb63a31191861298f92a2ec36b876914347de0a0f960
3
+ metadata.gz: 5571e179d7451741df128172dc7da1c9ee868bec5402d3c152dd520e419dc568
4
+ data.tar.gz: 82459cc9c15135a2634f19e3e938460b52978d36c62f9ad9d9cb5f79fbce7aa5
5
5
  SHA512:
6
- metadata.gz: 9bc25f3009cc3775d59d456e2009fe3c7f692a13268bf559a1059547c8c56998d8c0c2856a9b8e43079afa6ffa3705a6c1f613ecf9864ae6b3cc0697c5f46ac7
7
- data.tar.gz: 860f4fc51d1bef3f7cc4599335062881681b3acd70e6f1104ecbc24e128e175ddb0b3aa44ee6c2b0d36c2596c6d118eb1ded0ec92fcab8781efa2233c2cd3875
6
+ metadata.gz: 279a35587bcc88ef9a1bbfcc556ee9c9b9f539af7860d588175e24f2360174fab715acd8bdc5f9632110d9ede4bc91b98f24a99aa924034c2fea1c8159168b1c
7
+ data.tar.gz: a6dbedbcf05fb241d717c9761779c868e397262c54ffa747bf0f1f4d2aed7b9f1d95b61aa337ea3b200027ffbbd2638e50249f6dabff9e46cf0842ec0f5f1a1f
data/CHANGELOG.md CHANGED
@@ -14,8 +14,26 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
14
14
  ## Versions
15
15
  ### [Unreleased]
16
16
  Changes since the last non-beta release.
17
+ #### Added
18
+ - Pack Generation: Added functionality that will add an import statement, if missing, to the server bundle entrypoint even if the autobundle generated files still exist [PR 1610](https://github.com/shakacode/react_on_rails/pull/1610) by [judahmeek](https://github.com/judahmeek).
19
+
20
+ ### [14.0.0] - 2024-04-03
21
+ _Major bump because dropping support for Ruby 2.7 and deprecated `webpackConfigLoader.js`._
22
+
23
+ #### Removed
24
+ - Dropped Ruby 2.7 support [PR 1595](https://github.com/shakacode/react_on_rails/pull/1595) by [ahangarha](https://github.com/ahangarha).
25
+ - Removed deprecated `webpackConfigLoader.js` [PR 1600](https://github.com/shakacode/react_on_rails/pull/1600) by [ahangarha](https://github.com/ahangarha).
26
+
27
+ #### Fixed
28
+ - Trimmed the Gem to remove package.json which could cause superflous security warnings. [PR 1605](https://github.com/shakacode/react_on_rails/pull/1605) by [justin808](https://github.com/justin808).
29
+ - Prevent displaying the deprecation message for using `webpacker_precompile?` method and `webpacker:clean` rake task when using Shakapacker v7+ [PR 1592](https://github.com/shakacode/react_on_rails/pull/1592) by [ahangarha](https://github.com/ahangarha).
30
+ - Fixed Typescript types for ServerRenderResult, ReactComponent, RenderFunction, and RailsContext interfaces. [PR 1582](https://github.com/shakacode/react_on_rails/pull/1582) & [PR 1585](https://github.com/shakacode/react_on_rails/pull/1585) by [kotarella1110](https://github.com/kotarella1110)
31
+ - Removed a workaround in `JsonOutput#escape` for an no-longer supported Rails version. Additionally, removed `Utils.rails_version_less_than_4_1_1`
32
+ which was only used in the workaround. [PR 1580](https://github.com/shakacode/react_on_rails/pull/1580) by [wwahammy](https://github.com/wwahammy)
33
+
34
+ #### Added
35
+ - Exposed TypeScript all types [PR 1586](https://github.com/shakacode/react_on_rails/pull/1586) by [kotarella1110](https://github.com/kotarella1110)
17
36
 
18
- *Please add entries here for your pull requests that are not yet released.*
19
37
  ### [13.4.0] - 2023-07-30
20
38
  #### Fixed
21
39
  - Fixed Pack Generation logic during `assets:precompile` if `auto_load_bundle` is `false` & `components_subdirectory` is not set. [PR 1567](https://github.com/shakacode/react_on_rails/pull/1545) by [blackjack26](https://github.com/blackjack26) & [judahmeek](https://github.com/judahmeek).
@@ -1104,7 +1122,8 @@ Best done with Object destructing:
1104
1122
  ##### Fixed
1105
1123
  - Fix several generator-related issues.
1106
1124
 
1107
- [Unreleased]: https://github.com/shakacode/react_on_rails/compare/13.4.0...master
1125
+ [Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.0.0...master
1126
+ [14.0.0]: https://github.com/shakacode/react_on_rails/compare/13.4.0...14.0.0
1108
1127
  [13.4.0]: https://github.com/shakacode/react_on_rails/compare/13.3.5...13.4.0
1109
1128
  [13.3.5]: https://github.com/shakacode/react_on_rails/compare/13.3.4...13.3.5
1110
1129
  [13.3.4]: https://github.com/shakacode/react_on_rails/compare/13.3.3...13.3.4
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- gem "shakapacker", "7.0.1"
3
+ gem "shakapacker", "7.2.1"
4
4
  gem "bootsnap", require: false
5
- gem "rails", "~> 7.0"
6
- gem "sqlite3"
5
+ gem "rails", "~> 7.1"
6
+
7
+ gem "sqlite3", "~> 1.6"
7
8
  gem "sass-rails", "~> 6.0"
8
9
  gem "uglifier"
9
10
  gem "jquery-rails"
10
- gem "puma", "~> 5.0"
11
- gem "bundler", "2.4.17"
11
+ gem "puma", "~> 6.0"
12
12
 
13
13
  # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
14
14
  gem "turbolinks" if ENV["DISABLE_TURBOLINKS"].nil? || ENV["DISABLE_TURBOLINKS"].strip.empty?
@@ -29,9 +29,9 @@ group :development, :test do
29
29
  gem "pry-doc"
30
30
  gem "pry-rails"
31
31
  gem "pry-rescue"
32
- gem "rubocop", "1.14.0", require: false
33
- gem "rubocop-performance", require: false
34
- gem "rubocop-rspec", require: false
32
+ gem "rubocop", "1.61.0", require: false
33
+ gem "rubocop-performance", "~>1.20.0", require: false
34
+ gem "rubocop-rspec", "~>2.26", require: false
35
35
  gem "scss_lint", require: false
36
36
  gem "spring", "~> 4.0"
37
37
  end
@@ -46,5 +46,6 @@ group :test do
46
46
  gem "rspec_junit_formatter"
47
47
  gem "rspec-rails"
48
48
  gem "rspec-retry"
49
- gem "selenium-webdriver"
49
+ gem "selenium-webdriver", "4.9.0"
50
+ gem "webdrivers", "5.3.0"
50
51
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,434 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ react_on_rails (14.0.0)
5
+ addressable
6
+ connection_pool
7
+ execjs (~> 2.5)
8
+ rails (>= 5.2)
9
+ rainbow (~> 3.0)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actioncable (7.1.3.2)
15
+ actionpack (= 7.1.3.2)
16
+ activesupport (= 7.1.3.2)
17
+ nio4r (~> 2.0)
18
+ websocket-driver (>= 0.6.1)
19
+ zeitwerk (~> 2.6)
20
+ actionmailbox (7.1.3.2)
21
+ actionpack (= 7.1.3.2)
22
+ activejob (= 7.1.3.2)
23
+ activerecord (= 7.1.3.2)
24
+ activestorage (= 7.1.3.2)
25
+ activesupport (= 7.1.3.2)
26
+ mail (>= 2.7.1)
27
+ net-imap
28
+ net-pop
29
+ net-smtp
30
+ actionmailer (7.1.3.2)
31
+ actionpack (= 7.1.3.2)
32
+ actionview (= 7.1.3.2)
33
+ activejob (= 7.1.3.2)
34
+ activesupport (= 7.1.3.2)
35
+ mail (~> 2.5, >= 2.5.4)
36
+ net-imap
37
+ net-pop
38
+ net-smtp
39
+ rails-dom-testing (~> 2.2)
40
+ actionpack (7.1.3.2)
41
+ actionview (= 7.1.3.2)
42
+ activesupport (= 7.1.3.2)
43
+ nokogiri (>= 1.8.5)
44
+ racc
45
+ rack (>= 2.2.4)
46
+ rack-session (>= 1.0.1)
47
+ rack-test (>= 0.6.3)
48
+ rails-dom-testing (~> 2.2)
49
+ rails-html-sanitizer (~> 1.6)
50
+ actiontext (7.1.3.2)
51
+ actionpack (= 7.1.3.2)
52
+ activerecord (= 7.1.3.2)
53
+ activestorage (= 7.1.3.2)
54
+ activesupport (= 7.1.3.2)
55
+ globalid (>= 0.6.0)
56
+ nokogiri (>= 1.8.5)
57
+ actionview (7.1.3.2)
58
+ activesupport (= 7.1.3.2)
59
+ builder (~> 3.1)
60
+ erubi (~> 1.11)
61
+ rails-dom-testing (~> 2.2)
62
+ rails-html-sanitizer (~> 1.6)
63
+ activejob (7.1.3.2)
64
+ activesupport (= 7.1.3.2)
65
+ globalid (>= 0.3.6)
66
+ activemodel (7.1.3.2)
67
+ activesupport (= 7.1.3.2)
68
+ activerecord (7.1.3.2)
69
+ activemodel (= 7.1.3.2)
70
+ activesupport (= 7.1.3.2)
71
+ timeout (>= 0.4.0)
72
+ activestorage (7.1.3.2)
73
+ actionpack (= 7.1.3.2)
74
+ activejob (= 7.1.3.2)
75
+ activerecord (= 7.1.3.2)
76
+ activesupport (= 7.1.3.2)
77
+ marcel (~> 1.0)
78
+ activesupport (7.1.3.2)
79
+ base64
80
+ bigdecimal
81
+ concurrent-ruby (~> 1.0, >= 1.0.2)
82
+ connection_pool (>= 2.2.5)
83
+ drb
84
+ i18n (>= 1.6, < 2)
85
+ minitest (>= 5.1)
86
+ mutex_m
87
+ tzinfo (~> 2.0)
88
+ addressable (2.8.6)
89
+ public_suffix (>= 2.0.2, < 6.0)
90
+ amazing_print (1.6.0)
91
+ ast (2.4.2)
92
+ base64 (0.2.0)
93
+ bigdecimal (3.1.8)
94
+ bootsnap (1.18.3)
95
+ msgpack (~> 1.2)
96
+ builder (3.2.4)
97
+ byebug (11.1.3)
98
+ capybara (3.40.0)
99
+ addressable
100
+ matrix
101
+ mini_mime (>= 0.1.3)
102
+ nokogiri (~> 1.11)
103
+ rack (>= 1.6.0)
104
+ rack-test (>= 0.6.3)
105
+ regexp_parser (>= 1.5, < 3.0)
106
+ xpath (~> 3.2)
107
+ capybara-screenshot (1.0.26)
108
+ capybara (>= 1.0, < 4)
109
+ launchy
110
+ childprocess (5.0.0)
111
+ coderay (1.1.3)
112
+ concurrent-ruby (1.2.3)
113
+ connection_pool (2.4.1)
114
+ coveralls (0.8.23)
115
+ json (>= 1.8, < 3)
116
+ simplecov (~> 0.16.1)
117
+ term-ansicolor (~> 1.3)
118
+ thor (>= 0.19.4, < 2.0)
119
+ tins (~> 1.6)
120
+ crass (1.0.6)
121
+ date (3.3.4)
122
+ diff-lcs (1.5.1)
123
+ docile (1.4.0)
124
+ drb (2.2.1)
125
+ equivalent-xml (0.6.0)
126
+ nokogiri (>= 1.4.3)
127
+ erubi (1.12.0)
128
+ execjs (2.9.1)
129
+ ffi (1.16.3)
130
+ gem-release (2.2.2)
131
+ generator_spec (0.10.0)
132
+ activesupport (>= 3.0.0)
133
+ railties (>= 3.0.0)
134
+ globalid (1.2.1)
135
+ activesupport (>= 6.1)
136
+ i18n (1.14.5)
137
+ concurrent-ruby (~> 1.0)
138
+ interception (0.5)
139
+ io-console (0.7.2)
140
+ irb (1.13.1)
141
+ rdoc (>= 4.0.0)
142
+ reline (>= 0.4.2)
143
+ jbuilder (2.12.0)
144
+ actionview (>= 5.0.0)
145
+ activesupport (>= 5.0.0)
146
+ jquery-rails (4.6.0)
147
+ rails-dom-testing (>= 1, < 3)
148
+ railties (>= 4.2.0)
149
+ thor (>= 0.14, < 2.0)
150
+ json (2.7.2)
151
+ language_server-protocol (3.17.0.3)
152
+ launchy (3.0.1)
153
+ addressable (~> 2.8)
154
+ childprocess (~> 5.0)
155
+ listen (3.9.0)
156
+ rb-fsevent (~> 0.10, >= 0.10.3)
157
+ rb-inotify (~> 0.9, >= 0.9.10)
158
+ loofah (2.22.0)
159
+ crass (~> 1.0.2)
160
+ nokogiri (>= 1.12.0)
161
+ mail (2.8.1)
162
+ mini_mime (>= 0.1.1)
163
+ net-imap
164
+ net-pop
165
+ net-smtp
166
+ marcel (1.0.4)
167
+ matrix (0.4.2)
168
+ method_source (1.1.0)
169
+ mini_mime (1.1.5)
170
+ mini_portile2 (2.8.6)
171
+ minitest (5.23.0)
172
+ msgpack (1.7.2)
173
+ mutex_m (0.2.0)
174
+ net-imap (0.4.11)
175
+ date
176
+ net-protocol
177
+ net-pop (0.1.2)
178
+ net-protocol
179
+ net-protocol (0.2.2)
180
+ timeout
181
+ net-smtp (0.5.0)
182
+ net-protocol
183
+ nio4r (2.7.3)
184
+ nokogiri (1.16.5)
185
+ mini_portile2 (~> 2.8.2)
186
+ racc (~> 1.4)
187
+ package_json (0.1.0)
188
+ parallel (1.24.0)
189
+ parser (3.3.1.0)
190
+ ast (~> 2.4.1)
191
+ racc
192
+ pry (0.14.2)
193
+ coderay (~> 1.1)
194
+ method_source (~> 1.0)
195
+ pry-byebug (3.10.1)
196
+ byebug (~> 11.0)
197
+ pry (>= 0.13, < 0.15)
198
+ pry-doc (1.5.0)
199
+ pry (~> 0.11)
200
+ yard (~> 0.9.11)
201
+ pry-rails (0.3.9)
202
+ pry (>= 0.10.4)
203
+ pry-rescue (1.6.0)
204
+ interception (>= 0.5)
205
+ pry (>= 0.12.0)
206
+ psych (5.1.2)
207
+ stringio
208
+ public_suffix (5.0.5)
209
+ puma (6.4.2)
210
+ nio4r (~> 2.0)
211
+ racc (1.7.3)
212
+ rack (3.0.11)
213
+ rack-proxy (0.7.7)
214
+ rack
215
+ rack-session (2.0.0)
216
+ rack (>= 3.0.0)
217
+ rack-test (2.1.0)
218
+ rack (>= 1.3)
219
+ rackup (2.1.0)
220
+ rack (>= 3)
221
+ webrick (~> 1.8)
222
+ rails (7.1.3.2)
223
+ actioncable (= 7.1.3.2)
224
+ actionmailbox (= 7.1.3.2)
225
+ actionmailer (= 7.1.3.2)
226
+ actionpack (= 7.1.3.2)
227
+ actiontext (= 7.1.3.2)
228
+ actionview (= 7.1.3.2)
229
+ activejob (= 7.1.3.2)
230
+ activemodel (= 7.1.3.2)
231
+ activerecord (= 7.1.3.2)
232
+ activestorage (= 7.1.3.2)
233
+ activesupport (= 7.1.3.2)
234
+ bundler (>= 1.15.0)
235
+ railties (= 7.1.3.2)
236
+ rails-dom-testing (2.2.0)
237
+ activesupport (>= 5.0.0)
238
+ minitest
239
+ nokogiri (>= 1.6)
240
+ rails-html-sanitizer (1.6.0)
241
+ loofah (~> 2.21)
242
+ nokogiri (~> 1.14)
243
+ railties (7.1.3.2)
244
+ actionpack (= 7.1.3.2)
245
+ activesupport (= 7.1.3.2)
246
+ irb
247
+ rackup (>= 1.0.0)
248
+ rake (>= 12.2)
249
+ thor (~> 1.0, >= 1.2.2)
250
+ zeitwerk (~> 2.6)
251
+ rainbow (3.1.1)
252
+ rake (13.2.1)
253
+ rb-fsevent (0.11.2)
254
+ rb-inotify (0.10.1)
255
+ ffi (~> 1.0)
256
+ rdoc (6.6.3.1)
257
+ psych (>= 4.0.0)
258
+ regexp_parser (2.9.2)
259
+ reline (0.5.7)
260
+ io-console (~> 0.5)
261
+ rexml (3.2.7)
262
+ strscan (>= 3.0.9)
263
+ rspec-core (3.13.0)
264
+ rspec-support (~> 3.13.0)
265
+ rspec-expectations (3.13.0)
266
+ diff-lcs (>= 1.2.0, < 2.0)
267
+ rspec-support (~> 3.13.0)
268
+ rspec-mocks (3.13.1)
269
+ diff-lcs (>= 1.2.0, < 2.0)
270
+ rspec-support (~> 3.13.0)
271
+ rspec-rails (6.1.2)
272
+ actionpack (>= 6.1)
273
+ activesupport (>= 6.1)
274
+ railties (>= 6.1)
275
+ rspec-core (~> 3.13)
276
+ rspec-expectations (~> 3.13)
277
+ rspec-mocks (~> 3.13)
278
+ rspec-support (~> 3.13)
279
+ rspec-retry (0.6.2)
280
+ rspec-core (> 3.3)
281
+ rspec-support (3.13.1)
282
+ rspec_junit_formatter (0.6.0)
283
+ rspec-core (>= 2, < 4, != 2.12.0)
284
+ rubocop (1.61.0)
285
+ json (~> 2.3)
286
+ language_server-protocol (>= 3.17.0)
287
+ parallel (~> 1.10)
288
+ parser (>= 3.3.0.2)
289
+ rainbow (>= 2.2.2, < 4.0)
290
+ regexp_parser (>= 1.8, < 3.0)
291
+ rexml (>= 3.2.5, < 4.0)
292
+ rubocop-ast (>= 1.30.0, < 2.0)
293
+ ruby-progressbar (~> 1.7)
294
+ unicode-display_width (>= 2.4.0, < 3.0)
295
+ rubocop-ast (1.31.3)
296
+ parser (>= 3.3.1.0)
297
+ rubocop-capybara (2.20.0)
298
+ rubocop (~> 1.41)
299
+ rubocop-factory_bot (2.25.1)
300
+ rubocop (~> 1.41)
301
+ rubocop-performance (1.20.2)
302
+ rubocop (>= 1.48.1, < 2.0)
303
+ rubocop-ast (>= 1.30.0, < 2.0)
304
+ rubocop-rspec (2.29.2)
305
+ rubocop (~> 1.40)
306
+ rubocop-capybara (~> 2.17)
307
+ rubocop-factory_bot (~> 2.22)
308
+ rubocop-rspec_rails (~> 2.28)
309
+ rubocop-rspec_rails (2.28.3)
310
+ rubocop (~> 1.40)
311
+ ruby-progressbar (1.13.0)
312
+ rubyzip (2.3.2)
313
+ sass (3.7.4)
314
+ sass-listen (~> 4.0.0)
315
+ sass-listen (4.0.0)
316
+ rb-fsevent (~> 0.9, >= 0.9.4)
317
+ rb-inotify (~> 0.9, >= 0.9.7)
318
+ sass-rails (6.0.0)
319
+ sassc-rails (~> 2.1, >= 2.1.1)
320
+ sassc (2.4.0)
321
+ ffi (~> 1.9)
322
+ sassc-rails (2.1.2)
323
+ railties (>= 4.0.0)
324
+ sassc (>= 2.0)
325
+ sprockets (> 3.0)
326
+ sprockets-rails
327
+ tilt
328
+ scss_lint (0.60.0)
329
+ sass (~> 3.5, >= 3.5.5)
330
+ sdoc (2.6.1)
331
+ rdoc (>= 5.0)
332
+ selenium-webdriver (4.9.0)
333
+ rexml (~> 3.2, >= 3.2.5)
334
+ rubyzip (>= 1.2.2, < 3.0)
335
+ websocket (~> 1.0)
336
+ semantic_range (3.0.0)
337
+ shakapacker (7.2.1)
338
+ activesupport (>= 5.2)
339
+ package_json
340
+ rack-proxy (>= 0.6.1)
341
+ railties (>= 5.2)
342
+ semantic_range (>= 2.3.0)
343
+ simplecov (0.16.1)
344
+ docile (~> 1.1)
345
+ json (>= 1.8, < 3)
346
+ simplecov-html (~> 0.10.0)
347
+ simplecov-html (0.10.2)
348
+ spring (4.2.1)
349
+ sprockets (4.2.1)
350
+ concurrent-ruby (~> 1.0)
351
+ rack (>= 2.2.4, < 4)
352
+ sprockets-rails (3.4.2)
353
+ actionpack (>= 5.2)
354
+ activesupport (>= 5.2)
355
+ sprockets (>= 3.0.0)
356
+ sqlite3 (1.7.3)
357
+ mini_portile2 (~> 2.8.0)
358
+ stringio (3.1.0)
359
+ strscan (3.1.0)
360
+ sync (0.5.0)
361
+ term-ansicolor (1.8.0)
362
+ tins (~> 1.0)
363
+ thor (1.3.1)
364
+ tilt (2.3.0)
365
+ timeout (0.4.1)
366
+ tins (1.33.0)
367
+ bigdecimal
368
+ sync
369
+ turbolinks (5.2.1)
370
+ turbolinks-source (~> 5.2)
371
+ turbolinks-source (5.2.0)
372
+ tzinfo (2.0.6)
373
+ concurrent-ruby (~> 1.0)
374
+ uglifier (4.2.0)
375
+ execjs (>= 0.3.0, < 3)
376
+ unicode-display_width (2.5.0)
377
+ webdrivers (5.3.0)
378
+ nokogiri (~> 1.6)
379
+ rubyzip (>= 1.3.0)
380
+ selenium-webdriver (~> 4.0, < 4.11)
381
+ webrick (1.8.1)
382
+ websocket (1.2.10)
383
+ websocket-driver (0.7.6)
384
+ websocket-extensions (>= 0.1.0)
385
+ websocket-extensions (0.1.5)
386
+ xpath (3.2.0)
387
+ nokogiri (~> 1.8)
388
+ yard (0.9.36)
389
+ zeitwerk (2.6.14)
390
+
391
+ PLATFORMS
392
+ ruby
393
+
394
+ DEPENDENCIES
395
+ amazing_print
396
+ bootsnap
397
+ capybara
398
+ capybara-screenshot
399
+ coveralls
400
+ equivalent-xml
401
+ gem-release
402
+ generator_spec
403
+ jbuilder
404
+ jquery-rails
405
+ launchy
406
+ listen
407
+ pry
408
+ pry-byebug
409
+ pry-doc
410
+ pry-rails
411
+ pry-rescue
412
+ puma (~> 6.0)
413
+ rails (~> 7.1)
414
+ react_on_rails!
415
+ rspec-rails
416
+ rspec-retry
417
+ rspec_junit_formatter
418
+ rubocop (= 1.61.0)
419
+ rubocop-performance (~> 1.20.0)
420
+ rubocop-rspec (~> 2.26)
421
+ sass-rails (~> 6.0)
422
+ scss_lint
423
+ sdoc
424
+ selenium-webdriver (= 4.9.0)
425
+ shakapacker (= 7.2.1)
426
+ spring (~> 4.0)
427
+ sprockets (~> 4.0)
428
+ sqlite3 (~> 1.6)
429
+ turbolinks
430
+ uglifier
431
+ webdrivers (= 5.3.0)
432
+
433
+ BUNDLED WITH
434
+ 2.5.9
data/README.md CHANGED
@@ -24,17 +24,25 @@
24
24
 
25
25
  *These are the docs for React on Rails 13. To see the older docs: [v12](https://github.com/shakacode/react_on_rails/tree/12.6.0) and [v11](https://github.com/shakacode/react_on_rails/tree/11.3.0).*
26
26
 
27
- #### About
28
- React on Rails integrates Rails with (server rendering of) Facebook's [React](https://github.com/facebook/react) front-end framework.
27
+ # About
28
+ React on Rails integrates Rails with (server rendering of) [React](https://github.com/facebook/react).
29
29
 
30
- This project is maintained by the software consulting firm [ShakaCode](https://www.shakacode.com). We focus on Ruby on Rails applications with React front-ends, often using TypeScript or ReScript (ReasonML). We also build React Native apps and Gatsby sites. See [our recent work](https://www.shakacode.com/recent-work) for examples of what we do. ShakaCode.com (HiChee.com) is [hiring developers that like working on open-source](https://www.shakacode.com/career/).
30
+ This project is maintained by [ShakaCode](https://www.shakacode.com).
31
31
 
32
- Are you interested in optimizing your webpack setup for React on Rails including code
33
- splitting with [react-router](https://github.com/ReactTraining/react-router#readme) and
34
- [loadable-components](https://loadable-components.com/) with server-side rendering for SEO and hot-reloading for developers?
35
- We did this for Popmenu, [lowering Heroku costs 20-25% while getting a 73% decrease in average response times](https://www.shakacode.com/recent-work/popmenu/). Several years later, Popmenu is serving millions of SSR requests per day with React on Rails.
32
+ ## ShakaCode Upgrade Support
33
+ ShakaCode focuses on helping Ruby on Rails teams better use React and Webpack. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.
36
34
 
37
- Check out [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/). For more information, feel free to contact Justin Gordon, [justin@shakacode.com](mailto:justin@shakacode.com), maintainer of React on Rails.
35
+ For an overview of working with us, see our [Client Engagement Model](https://www.shakacode.com/blog/client-engagement-model/) article and [how we bill for time](https://www.shakacode.com/blog/shortcut-jira-trello-github-toggl-time-and-task-tracking/).
36
+
37
+ We also specialize in helping development teams lower infrastructure and CI costs. Check out our project [Control Plane Flow](https://github.com/shakacode/control-plane-flow/), which can allow you to get the ease of Heroku with the power of Kubernetes and big cost savings.
38
+
39
+ If you think ShakaCode can help your project, [click here](https://meetings.hubspot.com/justingordon/30-minute-consultation) to book a call with [Justin Gordon](mailto:justin@shakacode.com), the creator of React on Rails.
40
+
41
+ ## React on Rails Pro
42
+ Are you interested in optimizing your webpack setup for React on Rails, including code splitting with [react-router](https://github.com/ReactTraining/react-router#readme) and [loadable-components](https://loadable-components.com/) with server-side rendering for SEO and hot-reloading for developers?
43
+ We did this for Popmenu, [lowering Heroku costs 20-25% while getting a 73% decrease in average response times](https://www.shakacode.com/recent-work/popmenu/). Several years later, Popmenu serves tens of millions of SSR requests daily with React on Rails Pro.
44
+
45
+ If you're interested, read more about [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/) and [book a call](https://meetings.hubspot.com/justingordon/30-minute-consultation).
38
46
 
39
47
  # Documentation
40
48
 
@@ -42,16 +50,16 @@ See the documentation at **[shakacode.com/react-on-rails/docs](https://www.shaka
42
50
 
43
51
  ## Project Objective
44
52
 
45
- To provide a high performance framework for integrating Ruby on Rails with React via the [**Webpacker**](https://github.com/rails/webpacker) gem, especially regarding React Server-Side Rendering for better SEO and improved performance.
53
+ To provide a high-performance framework for integrating Ruby on Rails with React, especially regarding React Server-Side Rendering for better SEO and improved performance.
46
54
 
47
55
  ## Features and Why React on Rails?
48
56
 
49
- Given that `rails/webpacker` gem already provides basic React integration, why would you use "React on Rails"?
57
+ Given that `shakacode/shakapacker` gem already provides basic React integration, why would you use "React on Rails"?
50
58
 
51
59
  1. Automatic configuration of what bundles are added to the page based on what React components are on the page. This results in faster browser loading time via smaller bundle sizes.
52
- 1. Keep up with the latest changes of different versions of React. React 18 is supported.
60
+ 1. Keep up with the latest changes in different versions of React. React 18 is supported.
53
61
  1. Easy passing of props directly from your Rails view to your React components rather than having your Rails view load and then make a separate request to your API.
54
- Tight integration with [shakapacker](https://github.com/shakacode/shakapacker) (or it's predecessor [rails/webpacker](https://github.com/rails/webpacker)).
62
+ Tight integration with [shakapacker](https://github.com/shakacode/shakapacker) (or its predecessor [rails/webpacker](https://github.com/rails/webpacker)).
55
63
  1. Server-Side Rendering (SSR), often used for SEO crawler indexing and UX performance.
56
64
  1. [Automated optimized entry-point creation and bundle inclusion when placing a component on a page. With this feature, you no longer need to configure `javascript_pack_tags` and `stylesheet_pack_tags` on your layouts based on what’s shown. “It just works!”](https://www.shakacode.com/react-on-rails/docs/guides/file-system-based-automated-bundle-generation/)
57
65
  1. [Redux](https://github.com/reactjs/redux) and [React Router](https://github.com/ReactTraining/react-router#readme) integration with server-side-rendering.
@@ -63,7 +71,7 @@ See [Rails/Webpacker React Integration Options](https://www.shakacode.com/react-
63
71
 
64
72
  ## Online demo
65
73
  * See the [react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial) for an example of a live implementation and code.
66
- * A deployed version of the project `spec/dummy` which demonstrates several uses of `react_on_rails` is available on heroku [through this link](https://ror-spec-dummy.herokuapp.com/)
74
+ * A deployed version of the project `spec/dummy`, which demonstrates several uses of `react_on_rails`, will soon be available on [Control Plane through this link](https://ror-spec-dummy.reactrails.com/)
67
75
 
68
76
  ## ShakaCode Forum Premium Content
69
77
  _Requires creating a free account._
@@ -73,7 +81,7 @@ _Requires creating a free account._
73
81
 
74
82
  ## Prerequisites
75
83
 
76
- Ruby on Rails >=5, rails/webpacker >= 4.2 or shakapacker > 6, Ruby >= 2.7
84
+ Ruby on Rails >=5, rails/webpacker >= 4.2 or shakapacker > 6, Ruby >= 3.0.0
77
85
 
78
86
  # Support
79
87
 
@@ -87,7 +95,7 @@ Ruby on Rails >=5, rails/webpacker >= 4.2 or shakapacker > 6, Ruby >= 2.7
87
95
 
88
96
  ## Contributing
89
97
 
90
- Bug reports and pull requests are welcome. See [Contributing](https://github.com/shakacode/react_on_rails/tree/master/CONTRIBUTING.md) to get started, and the [list of help wanted issues](https://github.com/shakacode/react_on_rails/labels/contributions%3A%20up%20for%20grabs%21).
98
+ Bug reports and pull requests are welcome. To get started, see [Contributing](https://github.com/shakacode/react_on_rails/tree/master/CONTRIBUTING.md) and the [list of help wanted issues](https://github.com/shakacode/react_on_rails/labels/contributions%3A%20up%20for%20grabs%21).
91
99
 
92
100
  # Work with Us
93
101
  ShakaCode is **[hiring passionate software engineers](http://www.shakacode.com/career)** to work on our projects, including [HiChee](https://hichee.com)!
@@ -98,7 +106,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
98
106
 
99
107
  # Supporters
100
108
 
101
- The following companies support our open source projects, and ShakaCode uses their products!
109
+ The following companies support our open-source projects, and ShakaCode uses their products!
102
110
 
103
111
  <br />
104
112
  <br />
@@ -113,7 +121,7 @@ The following companies support our open source projects, and ShakaCode uses the
113
121
  <img alt="ScoutAPM" src="https://user-images.githubusercontent.com/4244251/184881152-9f2d8fba-88ac-4ba6-873b-22387f8711c5.png" height="120px">
114
122
  </picture>
115
123
  </a>
116
- <a href="https://controlplane.com">
124
+ <a href="https://shakacode.controlplane.com">
117
125
  <picture>
118
126
  <img alt="Control Plane" src="https://github.com/shakacode/.github/assets/20628911/90babd87-62c4-4de3-baa4-3d78ef4bec25" height="120px">
119
127
  </picture>
@@ -77,7 +77,7 @@ module ReactOnRails
77
77
  end
78
78
 
79
79
  def add_yarn_dependencies
80
- major_minor_patch_only = /\A\d+\.\d+\.\d+\z/.freeze
80
+ major_minor_patch_only = /\A\d+\.\d+\.\d+\z/
81
81
  if ReactOnRails::VERSION.match?(major_minor_patch_only)
82
82
  run "yarn add react-on-rails@#{ReactOnRails::VERSION} --exact"
83
83
  else
@@ -91,7 +91,8 @@ module ReactOnRails
91
91
  babel-plugin-macros"
92
92
 
93
93
  puts "Adding CSS handlers"
94
- run "yarn add css-loader css-minimizer-webpack-plugin mini-css-extract-plugin style-loader"
94
+
95
+ run "yarn add css-loader css-minimizer-webpack-plugin mini-css-extract-plugin style-loader@"
95
96
 
96
97
  puts "Adding dev dependencies"
97
98
  run "yarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh"
@@ -39,7 +39,7 @@ module ReactOnRails
39
39
 
40
40
  hello_world_index = File.join(destination_root, "app", "views", "hello_world", "index.html.erb")
41
41
  hello_world_contents = File.read(hello_world_index)
42
- new_hello_world_contents = hello_world_contents.gsub(/prerender: false/,
42
+ new_hello_world_contents = hello_world_contents.gsub("prerender: false",
43
43
  "prerender: true")
44
44
 
45
45
  File.open(hello_world_index, "w+") { |f| f.puts new_hello_world_contents }
@@ -17,7 +17,7 @@ default: &default
17
17
 
18
18
  development:
19
19
  <<: *default
20
- # This is false since we're running `bin/shakapacker -w` in Procfile.dev-setic
20
+ # This is false since we're running `bin/shakapacker -w` in Procfile.dev-static
21
21
  compile: false
22
22
 
23
23
  # Reference: https://webpack.js.org/configuration/dev-server/
@@ -40,7 +40,7 @@ end
40
40
  # ActiveRecord::Migration.maintain_test_schema!
41
41
 
42
42
  RSpec.configure do |config|
43
- config.before(:each, type: :system, js: true) do
43
+ config.before(:each, :js, type: :system) do
44
44
  driven_by :selenium_chrome
45
45
  end
46
46
 
@@ -49,7 +49,7 @@ RSpec.configure do |config|
49
49
  ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
50
50
 
51
51
  # Remove this line if you"re not using ActiveRecord or ActiveRecord fixtures
52
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
52
+ config.fixture_path = "#{Rails.root}/spec/fixtures"
53
53
 
54
54
  # If you"re not using ActiveRecord, or you"d prefer not to run each of your
55
55
  # examples within a transaction, remove the following line or assign false