react-rails 1.3.3 → 1.4.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/README.md +2 -2
- data/lib/assets/react-source/development-with-addons/react-server.js +21647 -0
- data/lib/assets/react-source/development-with-addons/react.js +21637 -21642
- data/lib/assets/react-source/development/react-server.js +19640 -0
- data/lib/assets/react-source/development/react.js +19602 -19602
- data/lib/assets/react-source/production-with-addons/react-server.js +21647 -0
- data/lib/assets/react-source/production-with-addons/react.js +21637 -18
- data/lib/assets/react-source/production/react-server.js +19640 -0
- data/lib/assets/react-source/production/react.js +19602 -16
- data/lib/react/rails/version.rb +1 -1
- data/lib/react/server_rendering/exec_js_renderer.rb +2 -1
- data/lib/react/server_rendering/sprockets_renderer.rb +1 -1
- metadata +6 -2
data/lib/react/rails/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# A bare-bones renderer for React.js + Exec.js
|
2
|
+
# - Depends on global ReactDOMServer in the ExecJS context
|
2
3
|
# - No Rails dependency
|
3
4
|
# - No browser concerns
|
4
5
|
module React
|
@@ -14,7 +15,7 @@ module React
|
|
14
15
|
js_code = <<-JS
|
15
16
|
(function () {
|
16
17
|
#{before_render(component_name, props, prerender_options)}
|
17
|
-
var result =
|
18
|
+
var result = ReactDOMServer.#{render_function}(React.createElement(#{component_name}, #{props}));
|
18
19
|
#{after_render(component_name, props, prerender_options)}
|
19
20
|
return result;
|
20
21
|
})()
|
@@ -7,7 +7,7 @@ module React
|
|
7
7
|
class SprocketsRenderer < ExecJSRenderer
|
8
8
|
def initialize(options={})
|
9
9
|
@replay_console = options.fetch(:replay_console, true)
|
10
|
-
filenames = options.fetch(:files, ["react.js", "components.js"])
|
10
|
+
filenames = options.fetch(:files, ["react-server.js", "components.js"])
|
11
11
|
js_code = CONSOLE_POLYFILL.dup
|
12
12
|
|
13
13
|
filenames.each do |filename|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul O’Shannessy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -257,9 +257,13 @@ extra_rdoc_files: []
|
|
257
257
|
files:
|
258
258
|
- lib/assets/javascripts/JSXTransformer.js
|
259
259
|
- lib/assets/javascripts/react_ujs.js.erb
|
260
|
+
- lib/assets/react-source/development/react-server.js
|
260
261
|
- lib/assets/react-source/development/react.js
|
262
|
+
- lib/assets/react-source/development-with-addons/react-server.js
|
261
263
|
- lib/assets/react-source/development-with-addons/react.js
|
264
|
+
- lib/assets/react-source/production/react-server.js
|
262
265
|
- lib/assets/react-source/production/react.js
|
266
|
+
- lib/assets/react-source/production-with-addons/react-server.js
|
263
267
|
- lib/assets/react-source/production-with-addons/react.js
|
264
268
|
- lib/generators/react/component_generator.rb
|
265
269
|
- lib/generators/react/install_generator.rb
|