react-rails 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/generators/react/install_generator.rb +1 -2
- data/lib/react/rails/railtie.rb +7 -3
- data/lib/react/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3778de93a6ea615712b737738fce82e2aa6aa70
|
4
|
+
data.tar.gz: a6276450147f672528b42b34c53fc998d871982f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f0c8fc937767ed500b5e5bab8b9d1a979800f54532725beff8e941347a4dbadb19f25604aae39d2d47724f3ccce747066f4dd82b8190ecd804bfc4a9c4298bb
|
7
|
+
data.tar.gz: 1aa70eb42f95f6a3dc17a2258bed4193edfe9f67ac8f10b492b23030e08c79539e02d153ff36ac11293fee9b9f8055c0ee8663593f6f467f69caa735125fb638
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,17 @@
|
|
8
8
|
|
9
9
|
#### Bug Fixes
|
10
10
|
|
11
|
+
## 2.2.1
|
12
|
+
|
13
|
+
#### New Features
|
14
|
+
|
15
|
+
- Support `config.react.server_renderer_directories` in initializers #729
|
16
|
+
|
17
|
+
#### Bug Fixes
|
18
|
+
|
19
|
+
- Fix Railtie watcher to update its timestamp when files change #722
|
20
|
+
- Don't use `yarn` binstub because webpacker doesn't provide it anymore #717
|
21
|
+
|
11
22
|
## 2.2.0
|
12
23
|
|
13
24
|
#### New Features
|
@@ -103,8 +103,7 @@ ReactRailsUJS.useContext(componentRequireContext)
|
|
103
103
|
JS
|
104
104
|
|
105
105
|
def setup_react_webpacker
|
106
|
-
|
107
|
-
`#{yarn_binstub} add react_ujs`
|
106
|
+
`yarn add react_ujs`
|
108
107
|
if manifest.exist?
|
109
108
|
append_file(manifest, WEBPACKER_SETUP_UJS)
|
110
109
|
else
|
data/lib/react/rails/railtie.rb
CHANGED
@@ -24,7 +24,7 @@ module React
|
|
24
24
|
config.react.view_helper_implementation = nil # Defaults to ComponentMount
|
25
25
|
|
26
26
|
# Watch .jsx files for changes in dev, so we can reload the JS VMs with the new JS code.
|
27
|
-
initializer "react_rails.add_watchable_files", group: :all do |app|
|
27
|
+
initializer "react_rails.add_watchable_files", after: :load_config_initializers, group: :all do |app|
|
28
28
|
# Watch files ending in `server_renderer_extensions` in each of `server_renderer_directories`
|
29
29
|
reload_paths = config.react.server_renderer_directories.reduce({}) do |memo, dir|
|
30
30
|
app_dir = File.join(app.root, dir)
|
@@ -33,9 +33,13 @@ module React
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# Rails checks these objects for changes:
|
36
|
-
|
36
|
+
react_reloader = app.config.file_watcher.new([], reload_paths) do
|
37
|
+
React::ServerRendering.reset_pool
|
38
|
+
end
|
39
|
+
app.reloaders << react_reloader
|
40
|
+
|
37
41
|
# Reload renderers in dev when files change
|
38
|
-
config.to_prepare {
|
42
|
+
config.to_prepare { react_reloader.execute_if_updated }
|
39
43
|
end
|
40
44
|
|
41
45
|
# Include the react-rails view helper lazily
|
data/lib/react/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul O’Shannessy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appraisal
|
@@ -326,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
326
|
version: '0'
|
327
327
|
requirements: []
|
328
328
|
rubyforge_project:
|
329
|
-
rubygems_version: 2.
|
329
|
+
rubygems_version: 2.5.2
|
330
330
|
signing_key:
|
331
331
|
specification_version: 4
|
332
332
|
summary: React integration for Ruby on Rails
|