react_on_rails 8.0.2 → 9.0.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.
- checksums.yaml +4 -4
- data/.eslintignore +2 -0
- data/.gitignore +2 -2
- data/.rubocop.yml +5 -0
- data/.travis.yml +12 -1
- data/CHANGELOG.md +185 -6
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +6 -2
- data/Gemfile.rails32 +74 -0
- data/KUDOS.md +5 -0
- data/README.md +200 -84
- data/Rakefile +11 -1
- data/app/helpers/react_on_rails_helper.rb +1 -1
- data/docs/additional-reading/asset-pipeline.md +20 -0
- data/docs/additional-reading/hot-reloading-rails-development.md +4 -75
- data/docs/additional-reading/node-server-rendering.md +2 -166
- data/docs/additional-reading/rails-assets-relative-paths.md +3 -1
- data/docs/additional-reading/rails-engine-integration.md +1 -1
- data/docs/additional-reading/rspec-configuration.md +7 -24
- data/docs/api/ruby-api-hot-reload-view-helpers.md +2 -2
- data/{lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt → docs/basics/configuration.md} +80 -41
- data/docs/basics/generator.md +0 -5
- data/docs/basics/installation-overview.md +6 -5
- data/docs/contributor-info/generator-testing.md +0 -9
- data/docs/tutorial.md +31 -34
- data/lib/generators/USAGE +0 -4
- data/lib/generators/react_on_rails/base_generator.rb +43 -76
- data/lib/generators/react_on_rails/dev_tests_generator.rb +7 -5
- data/lib/generators/react_on_rails/install_generator.rb +5 -10
- data/lib/generators/react_on_rails/react_no_redux_generator.rb +10 -9
- data/lib/generators/react_on_rails/react_with_redux_generator.rb +27 -17
- data/lib/generators/react_on_rails/templates/.eslintrc +2 -0
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev +4 -0
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-server +5 -0
- data/lib/generators/react_on_rails/templates/base/base/{client/app → app/javascript}/bundles/HelloWorld/components/HelloWorld.jsx +1 -2
- data/lib/generators/react_on_rails/templates/base/base/app/views/hello_world/index.html.erb.tt +0 -1
- data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb +12 -0
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb +41 -0
- data/lib/generators/react_on_rails/templates/dev_tests/.eslintrc +25 -0
- data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +0 -1
- data/lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb +1 -1
- data/lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb +2 -0
- data/lib/generators/react_on_rails/templates/redux/base/{client/app → app/javascript}/bundles/HelloWorld/startup/HelloWorldApp.jsx +1 -3
- data/lib/react_on_rails/configuration.rb +21 -16
- data/lib/react_on_rails/git_utils.rb +9 -3
- data/lib/react_on_rails/prerender_error.rb +15 -9
- data/lib/react_on_rails/server_rendering_pool/exec.rb +21 -8
- data/lib/react_on_rails/test_helper/ensure_assets_compiled.rb +1 -1
- data/lib/react_on_rails/test_helper/webpack_assets_compiler.rb +3 -1
- data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +12 -8
- data/lib/react_on_rails/test_helper.rb +7 -6
- data/lib/react_on_rails/utils.rb +77 -16
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/version_checker.rb +2 -1
- data/lib/tasks/assets.rake +12 -4
- data/package.json +25 -21
- data/rakelib/dummy_apps.rake +9 -0
- data/rakelib/example_type.rb +4 -70
- data/rakelib/examples.rake +5 -55
- data/rakelib/node_package.rake +1 -0
- data/rakelib/release.rake +9 -1
- data/rakelib/run_rspec.rake +24 -5
- data/react_on_rails.gemspec +2 -1
- data/webpackConfigLoader.js +45 -72
- data/yarn.lock +638 -252
- metadata +36 -26
- data/lib/generators/react_on_rails/node_generator.rb +0 -24
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt +0 -2
- data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb.tt +0 -15
- data/lib/generators/react_on_rails/templates/base/base/client/.babelrc +0 -3
- data/lib/generators/react_on_rails/templates/base/base/client/REACT_ON_RAILS_CLIENT_README.md +0 -9
- data/lib/generators/react_on_rails/templates/base/base/client/package.json.tt +0 -36
- data/lib/generators/react_on_rails/templates/base/base/client/webpack.config.js +0 -77
- data/lib/generators/react_on_rails/templates/base/base/config/webpacker_lite.yml +0 -27
- data/lib/generators/react_on_rails/templates/base/base/package.json.tt +0 -8
- data/lib/generators/react_on_rails/templates/node/base/client/node/package.json +0 -10
- data/lib/generators/react_on_rails/templates/node/base/client/node/server.js +0 -105
- /data/lib/generators/react_on_rails/templates/base/base/{client/app/bundles/HelloWorld/startup/registration.jsx.tt → app/javascript/packs/registration.js.tt} +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/{client/app/bundles/HelloWorld/actions/helloWorldActionCreators.jsx → app/javascript/bundles/HelloWorld/actions/helloWorldActionCreators.js} +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/{client/app → app/javascript}/bundles/HelloWorld/components/HelloWorld.jsx +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/{client/app/bundles/HelloWorld/constants/helloWorldConstants.jsx → app/javascript/bundles/HelloWorld/constants/helloWorldConstants.js} +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/{client/app/bundles/HelloWorld/containers/HelloWorldContainer.jsx → app/javascript/bundles/HelloWorld/containers/HelloWorldContainer.js} +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/{client/app/bundles/HelloWorld/reducers/helloWorldReducer.jsx → app/javascript/bundles/HelloWorld/reducers/helloWorldReducer.js} +0 -0
- /data/lib/generators/react_on_rails/templates/redux/base/{client/app/bundles/HelloWorld/store/helloWorldStore.jsx → app/javascript/bundles/HelloWorld/store/helloWorldStore.js} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 726ec46ad50d1fe90c1362e3b500edc55c9c7061
|
|
4
|
+
data.tar.gz: '0882d017eeafe5a267fced472d736e248ef53294'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 869d84250e0b3e582100bb91bcd0e038746fad8d1badbeec51a05ac202a48c5f36bfca545db2453820bb591d7aeb9a23fcb38c30d3864d30403c2e526971184e
|
|
7
|
+
data.tar.gz: 6f2e9bf6b123f2f6cd86fee23f8482d303e56565f23b0c86fd5de1033a6942a25bc78bca4ef677f036ec7e540e3706926f0071496bcaac66e142f287b1ec78de
|
data/.eslintignore
CHANGED
|
@@ -2,6 +2,7 @@ node_modules
|
|
|
2
2
|
coverage
|
|
3
3
|
spec/react_on_rails/dummy-for-generators
|
|
4
4
|
spec/dummy
|
|
5
|
+
spec/dummy_no_webpacker
|
|
5
6
|
node_package/lib/
|
|
6
7
|
node_package/tests/node_modules
|
|
7
8
|
node_package/webpack.config.js
|
|
@@ -12,3 +13,4 @@ node_package/webpack.config.js
|
|
|
12
13
|
**/app/assets/javascripts/application.js
|
|
13
14
|
**/coverage/**
|
|
14
15
|
**/cable.js
|
|
16
|
+
**/public/packs*/*
|
data/.gitignore
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/.bundle/
|
|
2
2
|
/.yardoc
|
|
3
3
|
/Gemfile.lock
|
|
4
|
+
/Gemfile.rails32.lock
|
|
4
5
|
/_yardoc/
|
|
5
6
|
/coverage/
|
|
6
7
|
/doc/
|
|
@@ -25,9 +26,8 @@ node_modules
|
|
|
25
26
|
/node_package/lib
|
|
26
27
|
|
|
27
28
|
yarn-debug.*
|
|
28
|
-
|
|
29
|
+
yarn-error.*
|
|
29
30
|
npm-debug.*
|
|
30
|
-
spec/dummy/client/npm-debug.log*
|
|
31
31
|
|
|
32
32
|
/gen-examples
|
|
33
33
|
|
data/.rubocop.yml
CHANGED
|
@@ -27,6 +27,10 @@ AllCops:
|
|
|
27
27
|
- 'spec/dummy/bin/**/*'
|
|
28
28
|
- 'spec/dummy/client/node_modules/**/*'
|
|
29
29
|
- 'spec/dummy/client/node_modules/**/.*'
|
|
30
|
+
- 'spec/dummy_no_webpacker/Procfile.*'
|
|
31
|
+
- 'spec/dummy_no_webpacker/bin/**/*'
|
|
32
|
+
- 'spec/dummy_no_webpacker/client/node_modules/**/*'
|
|
33
|
+
- 'spec/dummy_no_webpacker/client/node_modules/**/.*'
|
|
30
34
|
- 'gen-examples/examples/**/.*'
|
|
31
35
|
- 'gen-examples/examples/**/*'
|
|
32
36
|
|
|
@@ -34,6 +38,7 @@ Style/FileName:
|
|
|
34
38
|
Exclude:
|
|
35
39
|
- 'Gemfile'
|
|
36
40
|
- 'spec/dummy/Gemfile'
|
|
41
|
+
- 'spec/dummy_no_webpacker/Gemfile'
|
|
37
42
|
|
|
38
43
|
# Turn off until we require 2.3 ruby
|
|
39
44
|
Style/SafeNavigation:
|
data/.travis.yml
CHANGED
|
@@ -6,6 +6,7 @@ rvm:
|
|
|
6
6
|
# Rails 5 requires 2.2
|
|
7
7
|
- 2.3.1
|
|
8
8
|
- 2.4.1
|
|
9
|
+
- 2.2.6
|
|
9
10
|
services:
|
|
10
11
|
- docker
|
|
11
12
|
|
|
@@ -17,6 +18,7 @@ cache:
|
|
|
17
18
|
|
|
18
19
|
gemfile:
|
|
19
20
|
- spec/dummy/Gemfile
|
|
21
|
+
- spec/dummy_no_webpacker/Gemfile.rails32
|
|
20
22
|
|
|
21
23
|
env:
|
|
22
24
|
global:
|
|
@@ -36,7 +38,7 @@ install:
|
|
|
36
38
|
- travis_retry gem install bundler
|
|
37
39
|
- travis_retry nvm install node 8.0.0
|
|
38
40
|
- node -v
|
|
39
|
-
- travis_retry npm i -g yarn@0.
|
|
41
|
+
- travis_retry npm i -g yarn@0.27.5
|
|
40
42
|
- travis_retry yarn global add babel-cli
|
|
41
43
|
- travis_retry bundle install
|
|
42
44
|
- travis_retry yarn
|
|
@@ -49,6 +51,15 @@ before_script:
|
|
|
49
51
|
script:
|
|
50
52
|
- bundle exec rake
|
|
51
53
|
|
|
54
|
+
matrix:
|
|
55
|
+
exclude:
|
|
56
|
+
- gemfile: spec/dummy_no_webpacker/Gemfile.rails32
|
|
57
|
+
rvm: 2.3.1
|
|
58
|
+
- gemfile: spec/dummy_no_webpacker/Gemfile.rails32
|
|
59
|
+
rvm: 2.4.1
|
|
60
|
+
- gemfile: spec/dummy/Gemfile
|
|
61
|
+
rvm: 2.2.6
|
|
62
|
+
|
|
52
63
|
notifications:
|
|
53
64
|
slack:
|
|
54
65
|
secure: LfcUk4AJ4vAxWwRIyw4tFh8QNbYefMwfG/oLfsN3CdRMWMOtCOHR1GGsRhAOlfVVJ/FvHqVqWj5gK7z7CaO5Uvl7rD3/zJ8QzExKx/iH9yWj55iIPuKLzwFNnBwRpFW/cqyU2lFPPRxGD50BUn3c+qybkuSqtKZ6qtTowwqlxLa5iyM3N95aZp7MEIKCP7cPcnHfLbJyP8wBpotp/rtw62eXM2HIRJJwgjcp+n+My7VFR9DnBXNFf6R91aZHM4U4cHHDbu15HFtH8honVrzK1JQdyqMNHga+j04dFuaS7z9Q369/hsELMOBp/227+Pz7ZRfWZFK4UASguOvyeX7RmGTRpTuWLm1XJeUzfsPZVROecaSVQBve+U7F12yKqilt97QlvRXn2EGyBILqvxtFNNR4S9kgAf72/6EFgiM1TKq7i9zy6lVOnagU2+7amq7UeopX1uoFsUfNKMR7YbgV1WjF0IK95UP0b0/7ZOJlPYgi5zzkQi129qAFWSMmxGk+ZpsttHh/tjJtvAh0A3mHq/zb5w4ub/MbSyZqeDUNgGj72QArOWUFSAStQT1ybsVLeDoKPgOvVq7OV1D64rpcHjBXcqOCit8tDZ+TqkFhcYJo2cITSaqE4zJXn+4F5s7So5O8CyfKYQq+kFJCooYGmfgTUckJpGl7eIvKmL4TN9Q=
|
data/CHANGELOG.md
CHANGED
|
@@ -8,10 +8,172 @@ Changes since last non-beta release.
|
|
|
8
8
|
|
|
9
9
|
*Please add entries here for your pull requests.*
|
|
10
10
|
|
|
11
|
+
- Fix regression where `react_component(... prerender: true)` wouldn't find the generated asset bundle, because it wasn't looking for the hashed path.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 9.0 from 8.x. Upgrade Instructions
|
|
15
|
+
All 9.0.0 beta versions can be viewed in [PR 908](https://github.com/shakacode/react_on_rails/pull/908)
|
|
16
|
+
|
|
17
|
+
For an example of upgrading, see [react-webpack-rails-tutorial/pull/416](https://github.com/shakacode/react-webpack-rails-tutorial/pull/416).
|
|
18
|
+
|
|
19
|
+
- Breaking Configuration Changes
|
|
20
|
+
1. Added `config.node_modules_location` which defaults to `""` if Webpacker is installed. You may want to set this to 'client'` to `config/initializers/react_on_rails.rb` to keep your node_modules inside of `/client`
|
|
21
|
+
2. Renamed
|
|
22
|
+
* config.npm_build_test_command ==> config.build_test_command
|
|
23
|
+
* config.build_production_command ==> config.build_production_command
|
|
24
|
+
|
|
25
|
+
- Update the gemfile. Switch over to using the webpacker gem.
|
|
26
|
+
|
|
27
|
+
```rb
|
|
28
|
+
gem "webpacker"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- Update for the renaming in the `WebpackConfigLoader` in your webpack configuration.
|
|
32
|
+
You will need to rename the following object properties:
|
|
33
|
+
- webpackOutputPath ==> output.path
|
|
34
|
+
- webpackPublicOutputDir ==> output.publicPath
|
|
35
|
+
- hotReloadingUrl ==> output.publicPathWithHost
|
|
36
|
+
- hotReloadingHostname ==> settings.dev_server.host
|
|
37
|
+
- hotReloadingPort ==> settings.dev_server.port
|
|
38
|
+
- hmr ==> settings.dev_server.hmr
|
|
39
|
+
- manifest ==> Remove this one. We use the default for Webpack of manifest.json
|
|
40
|
+
- env ==> Use `const { env } = require('process');`
|
|
41
|
+
- devBuild ==> Use `const devBuild = process.env.NODE_ENV !== 'production';`
|
|
42
|
+
|
|
43
|
+
- Edit your Webpack.config files:
|
|
44
|
+
- Change your Webpack output to be like:
|
|
45
|
+
```
|
|
46
|
+
const webpackConfigLoader = require('react-on-rails/webpackConfigLoader');
|
|
47
|
+
const configPath = resolve('..', 'config');
|
|
48
|
+
const { output, settings } = webpackConfigLoader(configPath);
|
|
49
|
+
const hmr = settings.dev_server.hmr;
|
|
50
|
+
const devBuild = process.env.NODE_ENV !== 'production';
|
|
51
|
+
|
|
52
|
+
output: {
|
|
53
|
+
filename: isHMR ? '[name]-[hash].js' : '[name]-[chunkhash].js',
|
|
54
|
+
chunkFilename: '[name]-[chunkhash].chunk.js',
|
|
55
|
+
|
|
56
|
+
publicPath: output.publicPath,
|
|
57
|
+
path: output.path,
|
|
58
|
+
},
|
|
59
|
+
```
|
|
60
|
+
- Change your ManifestPlugin definition to something like the following
|
|
61
|
+
```
|
|
62
|
+
new ManifestPlugin({
|
|
63
|
+
publicPath: output.publicPath,
|
|
64
|
+
writeToFileEmit: true
|
|
65
|
+
}),
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Find your `webpacker_lite.yml` and rename it to `webpacker.yml`
|
|
70
|
+
- Consider copying a default webpacker.yml setup such as https://github.com/shakacode/react-on-rails-v9-rc-generator/blob/master/config/webpacker.yml
|
|
71
|
+
- If you are not using the webpacker webpacker setup, be sure to put in `compile: false` in the `default` section.
|
|
72
|
+
- Alternately, if you are updating from webpacker_lite, you can manually change these:
|
|
73
|
+
- Add a default setting
|
|
74
|
+
```
|
|
75
|
+
cache_manifest: false
|
|
76
|
+
```
|
|
77
|
+
- For production, set:
|
|
78
|
+
```
|
|
79
|
+
cache_manifest: true
|
|
80
|
+
```
|
|
81
|
+
- Add a section like this under your development env:
|
|
82
|
+
```
|
|
83
|
+
dev_server:
|
|
84
|
+
host: localhost
|
|
85
|
+
port: 3035
|
|
86
|
+
hmr: false
|
|
87
|
+
```
|
|
88
|
+
Set hmr to your preference.
|
|
89
|
+
- See the example `spec/dummy/config/webpacker.yml`.
|
|
90
|
+
- Remove keys `hot_reloading_host` and `hot_reloading_enabled_by_default`. These are replaced by the `dev_server` key.
|
|
91
|
+
- Rename `webpack_public_output_dir` to `public_output_path`.
|
|
92
|
+
|
|
93
|
+
- Edit your Procfile.dev
|
|
94
|
+
- Remove the env value WEBPACKER_DEV_SERVER as it's not used
|
|
95
|
+
- For hot loading:
|
|
96
|
+
- Set the `hmr` key in your `webpacker.yml` to `true`.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
#### Troubleshooting
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### [9.0.0]
|
|
104
|
+
*Diffs for the beta to master*
|
|
105
|
+
|
|
106
|
+
### [9.0.0-beta.12]
|
|
107
|
+
- Updated for latest rails/webpacker using the official gem
|
|
108
|
+
- hot reloading working in generator
|
|
109
|
+
|
|
110
|
+
### [9.0.0-beta.11]
|
|
111
|
+
- Updated for latest rails_webpacker.
|
|
112
|
+
- hot reloading working in spec/dummy
|
|
113
|
+
|
|
114
|
+
### [9.0.0-beta.10]
|
|
115
|
+
- Updated for the latest rails/webpacker. Added the cache_manifest setting.
|
|
116
|
+
|
|
117
|
+
### [9.0.0-beta.9]
|
|
118
|
+
- Fixes precompile task going to Webpacker's. You need to set `custom_compile: true` in your `webpacker.yml`.
|
|
119
|
+
- Changed webpack-bundle.js name to hello-world-bundle.js
|
|
120
|
+
- Update for latest from rails/webpacker
|
|
121
|
+
gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
|
122
|
+
branch: "issue-464-merge-webpacker-lite-into-webpacker-v3"
|
|
123
|
+
|
|
124
|
+
### [9.0.0-beta.8]
|
|
125
|
+
- bugfix for server rendering
|
|
126
|
+
|
|
127
|
+
### [9.0.0-beta.7]
|
|
128
|
+
- Depend on updated rails/webpacker in branch
|
|
129
|
+
|
|
130
|
+
gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
|
131
|
+
branch: "issue-464-merge-webpacker-lite-into-webpacker-v2"
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### [9.0.0-beta.6]
|
|
135
|
+
- Change "hot" to "hmr".
|
|
136
|
+
|
|
137
|
+
### [9.0.0-beta.3]
|
|
138
|
+
- Fix typo on webpackConfigLoader.js
|
|
139
|
+
|
|
140
|
+
### [9.0.0-beta.3]
|
|
141
|
+
- Fix typo on webpackConfigLoader.js
|
|
142
|
+
|
|
143
|
+
### [9.0.0-beta.2]
|
|
144
|
+
- Fixed problems when running in development mode for both the generator and spec/dummy.
|
|
145
|
+
|
|
146
|
+
### [9.0.0-beta.1]
|
|
147
|
+
- First version of depending on Webpacker rather than Webpacker Lite
|
|
148
|
+
|
|
149
|
+
### [8.0.7]
|
|
150
|
+
#### fixed
|
|
151
|
+
- Fixes generator bug by keeping blank line at top in case existing .gitignore does not end in a newline. [#916](https://github.com/shakacode/react_on_rails/pull/916) by [justin808](https://github.com/justin808).
|
|
152
|
+
|
|
153
|
+
### [8.0.6]
|
|
154
|
+
#### fixed
|
|
155
|
+
- Fixes server rendering when using a CDN. Server rendering would try to fetch a file with the "asset_host". This change updates the webpacker_lite dependency to 2.1.0 which has a new helper `pack_path`. [#901](https://github.com/shakacode/react_on_rails/pull/901) by [justin808](https://github.com/justin808). Be sure to update webpacker_lite to 2.1.0.
|
|
156
|
+
- The package.json file created by the generator now creates minified javascript production builds by default. This was done by adding the -p flag to webpack on the build:production script. [#895](https://github.com/shakacode/react_on_rails/pull/895) by [serodriguez68 ](https://github.com/serodriguez68)
|
|
157
|
+
- Fixes GitUtils.uncommitted_changes? throwing an error when called in an environment without Git, and allows install generator to be run successfully with `--ignore-warnings` [#878](https://github.com/shakacode/react_on_rails/pull/878) by [jasonblalock](https://github.com/jasonblalock).
|
|
158
|
+
|
|
159
|
+
## [8.0.5]
|
|
160
|
+
### fixed
|
|
161
|
+
- Corrects `devBuild` value for webpack production build from webpackConfigLoader. [#877](https://github.com/shakacode/react_on_rails/pull/877) by [chenqingspring](https://github.com/chenqingspring).
|
|
162
|
+
- Remove contentBase deprecation warning message. [#878](https://github.com/shakacode/react_on_rails/pull/878) by [ened ](https://github.com/ened).
|
|
163
|
+
- Removes invalid reference to _railsContext in the generated files. [#886](https://github.com/shakacode/react_on_rails/pull/886) by [justin808](https://github.com/justin808).
|
|
164
|
+
- All tests run against Rails 5.1.2
|
|
165
|
+
|
|
166
|
+
*Note: 8.0.4 skipped.*
|
|
167
|
+
|
|
168
|
+
## [8.0.3]
|
|
169
|
+
### Fixed
|
|
170
|
+
- Ruby 2.1 issue due to `<<~` as reported in [issue #870](https://github.com/shakacode/react_on_rails/issues/870). [#867](https://github.com/shakacode/react_on_rails/pull/867) by [justin808](https://github.com/justin808)
|
|
171
|
+
|
|
11
172
|
## [8.0.2]
|
|
12
173
|
### Fixed
|
|
13
|
-
- Any failure in webpack to build test files quits tests.
|
|
14
|
-
-
|
|
174
|
+
- Any failure in webpack to build test files quits tests.
|
|
175
|
+
- Fixed a Ruby 2.4 potential crash which could cause a crash due to pathname change in Ruby 2.4.
|
|
176
|
+
- CI Improvements:
|
|
15
177
|
- Switched to yarn link and removed relative path install of react-on-rails
|
|
16
178
|
- Removed testing of Turbolinks 2
|
|
17
179
|
- All tests run against Rails 5.1.1
|
|
@@ -35,7 +197,7 @@ Changes since last non-beta release.
|
|
|
35
197
|
### Changed
|
|
36
198
|
- Major updates for WebpackerLite 2.0.2. [#844](https://github.com/shakacode/react_on_rails/pull/845) by [justin808](https://github.com/justin808) with help from ](https://github.com/robwise)
|
|
37
199
|
- Logging no longer occurs when trace is turned to false. [#845](https://github.com/shakacode/react_on_rails/pull/845) by [conturbo](https://github.com/Conturbo)
|
|
38
|
-
|
|
200
|
+
|
|
39
201
|
## [8.0.0-beta.2] - 2017-05-08
|
|
40
202
|
|
|
41
203
|
### Changed
|
|
@@ -288,7 +450,7 @@ No changes.
|
|
|
288
450
|
- See [shakacode/react-webpack-rails-tutorial/pull/287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287) for an example of upgrading from v5.
|
|
289
451
|
|
|
290
452
|
- To configure the asset compliation you can either
|
|
291
|
-
1. Specify a `config/react_on_rails` setting for `
|
|
453
|
+
1. Specify a `config/react_on_rails` setting for `build_production_command` to be nil to turn this feature off.
|
|
292
454
|
2. Specify the script command you want to run to build your production assets, and remove your assets.rake file.
|
|
293
455
|
|
|
294
456
|
- If you are using the ReactOnRails test helper, then you will need to add the 'config.npm_build_test_command' to your config to tell react_on_rails what command to run when you run rspec.
|
|
@@ -299,7 +461,7 @@ Here is the addition to the generated config file:
|
|
|
299
461
|
```ruby
|
|
300
462
|
# This configures the script to run to build the production assets by webpack. Set this to nil
|
|
301
463
|
# if you don't want react_on_rails building this file for you.
|
|
302
|
-
config.
|
|
464
|
+
config.build_production_command = "npm run build:production"
|
|
303
465
|
|
|
304
466
|
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
|
305
467
|
# with rspec then this controls what npm command is run
|
|
@@ -606,7 +768,24 @@ Best done with Object destructing:
|
|
|
606
768
|
##### Fixed
|
|
607
769
|
- Fix several generator related issues.
|
|
608
770
|
|
|
609
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/
|
|
771
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/rails-webpacker...9.0.0-beta.11
|
|
772
|
+
[9.0.0]: https://github.com/shakacode/react_on_rails/compare/master...9.0.0-beta.11
|
|
773
|
+
[9.0.0-beta.12]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.11...9.0.0-beta.12
|
|
774
|
+
[9.0.0-beta.11]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.10...9.0.0-beta.11
|
|
775
|
+
[9.0.0-beta.10]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.9...9.0.0-beta.10
|
|
776
|
+
[9.0.0-beta.9]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.8...9.0.0-beta.9
|
|
777
|
+
[9.0.0-beta.8]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.7...9.0.0-beta.8
|
|
778
|
+
[9.0.0-beta.7]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.6...9.0.0-beta.7
|
|
779
|
+
[9.0.0-beta.6]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.5...9.0.0-beta.6
|
|
780
|
+
[9.0.0-beta.5]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.4...9.0.0-beta.5
|
|
781
|
+
[9.0.0-beta.4]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.3...9.0.0-beta.4
|
|
782
|
+
[9.0.0-beta.3]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.2...9.0.0-beta.3
|
|
783
|
+
[9.0.0-beta.2]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.1...9.0.0-beta.2
|
|
784
|
+
[9.0.0-beta.1]: https://github.com/shakacode/react_on_rails/compare/master...9.0.0-beta.1
|
|
785
|
+
[8.0.7]: https://github.com/shakacode/react_on_rails/compare/8.0.6...8.0.7
|
|
786
|
+
[8.0.6]: https://github.com/shakacode/react_on_rails/compare/8.0.5...8.0.6
|
|
787
|
+
[8.0.5]: https://github.com/shakacode/react_on_rails/compare/8.0.3...8.0.5
|
|
788
|
+
[8.0.3]: https://github.com/shakacode/react_on_rails/compare/8.0.2...8.0.3
|
|
610
789
|
[8.0.2]: https://github.com/shakacode/react_on_rails/compare/8.0.1...8.0.2
|
|
611
790
|
[8.0.1]: https://github.com/shakacode/react_on_rails/compare/8.0.0...8.0.1
|
|
612
791
|
[8.0.0]: https://github.com/shakacode/react_on_rails/compare/7.0.4...8.0.0
|
data/CONTRIBUTING.md
CHANGED
|
@@ -46,7 +46,7 @@ When making doc changes, we want the change to work on both the gitbook and the
|
|
|
46
46
|
|
|
47
47
|
```sh
|
|
48
48
|
cd react_on_rails/
|
|
49
|
-
bundle && yarn && rake examples:
|
|
49
|
+
bundle && yarn && rake examples:gen_all && rake node_package && rake
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
In order to run tests in browser
|
|
@@ -145,7 +145,7 @@ yarn run install-react-on-rails
|
|
|
145
145
|
```
|
|
146
146
|
_Note: this runs npm under the hood as explained in **Test NPM for react-on-rails** section above_
|
|
147
147
|
|
|
148
|
-
From now on, the example and dummy apps will use your local node_package folder as the react-on-rails node package. This will also be done automatically for you via the `rake examples:
|
|
148
|
+
From now on, the example and dummy apps will use your local node_package folder as the react-on-rails node package. This will also be done automatically for you via the `rake examples:gen_all` rake task.
|
|
149
149
|
|
|
150
150
|
*Side note: It's critical to use the alias section of the webpack config to avoid a double inclusion error. This has already been done for you in the example and dummy apps, but for reference:*
|
|
151
151
|
|
data/Gemfile
CHANGED
|
@@ -14,7 +14,7 @@ gem "jbuilder", "~> 2.0"
|
|
|
14
14
|
gem "jquery-rails"
|
|
15
15
|
gem "mini_racer"
|
|
16
16
|
gem "puma"
|
|
17
|
-
gem "rails", "5.1.
|
|
17
|
+
gem "rails", "5.1.2"
|
|
18
18
|
gem "rails_12factor"
|
|
19
19
|
gem "rubocop", require: false
|
|
20
20
|
gem "ruby-lint", require: false
|
|
@@ -38,6 +38,10 @@ gem "chromedriver-helper"
|
|
|
38
38
|
gem "launchy"
|
|
39
39
|
gem "poltergeist"
|
|
40
40
|
gem "selenium-webdriver"
|
|
41
|
-
gem "
|
|
41
|
+
gem "webpacker", "~> 3.0"
|
|
42
42
|
|
|
43
|
+
# TODO: remove once we get out of beta.
|
|
44
|
+
# gem 'webpacker', path: "../../forks/webpacker"
|
|
45
|
+
|
|
46
|
+
gem "equivalent-xml", github: "mbklein/equivalent-xml"
|
|
43
47
|
gem "rainbow"
|
data/Gemfile.rails32
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
eval_gemfile File.expand_path("../react_on_rails.gemspec", __FILE__)
|
|
6
|
+
|
|
7
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
|
8
|
+
gem "rails", "~> 3.2"
|
|
9
|
+
# Use sqlite3 as the database for Active Record
|
|
10
|
+
gem "sqlite3"
|
|
11
|
+
# Use SCSS for stylesheets
|
|
12
|
+
gem "sass-rails"
|
|
13
|
+
# Use Uglifier as compressor for JavaScript assets
|
|
14
|
+
gem "uglifier"
|
|
15
|
+
# Use CoffeeScript for .coffee assets and views
|
|
16
|
+
gem "coffee-rails"
|
|
17
|
+
|
|
18
|
+
# Use jquery as the JavaScript library
|
|
19
|
+
gem "jquery-rails"
|
|
20
|
+
|
|
21
|
+
gem "puma"
|
|
22
|
+
|
|
23
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
|
24
|
+
gem "jbuilder"
|
|
25
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
|
26
|
+
gem "sdoc", group: :doc
|
|
27
|
+
|
|
28
|
+
# Use ActiveModel has_secure_password
|
|
29
|
+
# gem 'bcrypt', '~> 3.1.7'
|
|
30
|
+
|
|
31
|
+
# Use Unicorn as the app server
|
|
32
|
+
# gem 'unicorn'
|
|
33
|
+
|
|
34
|
+
# Use Capistrano for deployment
|
|
35
|
+
# gem 'capistrano-rails', group: :development
|
|
36
|
+
|
|
37
|
+
gem "mini_racer"
|
|
38
|
+
gem "connection_pool"
|
|
39
|
+
gem "rainbow"
|
|
40
|
+
gem "addressable"
|
|
41
|
+
gem "execjs"
|
|
42
|
+
|
|
43
|
+
group :development, :test do
|
|
44
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
|
45
|
+
gem "awesome_print"
|
|
46
|
+
gem "listen"
|
|
47
|
+
gem "pry"
|
|
48
|
+
gem "pry-byebug"
|
|
49
|
+
gem "pry-doc"
|
|
50
|
+
gem "pry-rails"
|
|
51
|
+
gem "pry-rescue"
|
|
52
|
+
gem "pry-stack_explorer"
|
|
53
|
+
gem "rubocop", require: false
|
|
54
|
+
gem "ruby-lint", require: false
|
|
55
|
+
gem "scss_lint", require: false
|
|
56
|
+
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
group :test do
|
|
60
|
+
gem "capybara"
|
|
61
|
+
gem "capybara-screenshot"
|
|
62
|
+
gem "coveralls", require: false
|
|
63
|
+
# install trouble with updated
|
|
64
|
+
# gem "capybara-webkit"
|
|
65
|
+
gem "chromedriver-helper"
|
|
66
|
+
gem "generator_spec"
|
|
67
|
+
gem "launchy"
|
|
68
|
+
gem "poltergeist"
|
|
69
|
+
gem "rspec-rails"
|
|
70
|
+
gem "rspec-retry"
|
|
71
|
+
gem "selenium-webdriver"
|
|
72
|
+
gem 'test-unit', '~> 3.0'
|
|
73
|
+
gem "equivalent-xml", github: "mbklein/equivalent-xml"
|
|
74
|
+
end
|
data/KUDOS.md
CHANGED
|
@@ -2,6 +2,11 @@ This is a sibling file to [PROJECTS.md](./PROJECTS.md).
|
|
|
2
2
|
|
|
3
3
|
I'm looking for quotes on why you like using React on Rails. You might mention any benefits you particularly like and if you've migrated from react-rails. Just click to edit and github will automatically open up a PR. Thanks to everybody that contributes!
|
|
4
4
|
|
|
5
|
+
## June 9, 2017
|
|
6
|
+
By Github Issue [#868](https://github.com/shakacode/react_on_rails/issues/868)
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
5
10
|
### May 6, 2017
|
|
6
11
|
By Email
|
|
7
12
|
|