hyper-react 1.0.0.lap24 → 1.0.0.lap25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hyper-react.gemspec +1 -0
- data/lib/react/config.rb +3 -3
- data/lib/react/react-source.rb +2 -1
- data/lib/react/rendering_context.rb +5 -2
- data/lib/reactive-ruby/isomorphic_helpers.rb +1 -3
- data/lib/reactive-ruby/version.rb +1 -1
- metadata +20 -8
- data/lib/react/config/client.rb.erb +0 -19
- data/lib/react/config/server.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4359d66ff90af21650612feaaa0c166bf6f91863a71a259987b6c32f8c422000
|
4
|
+
data.tar.gz: 9c2008546a55dea4c180f5524045a8d7ea943e6d8455a0d126c75544457f9376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88f3bc7f4ebfb1a53a959d299e6ba851a42c72375edca576314a23b8781d6a0fe4536ab48241f268918b0856b0a21fc6f14c24b21f86ba2655f05b24528b55d
|
7
|
+
data.tar.gz: 7f1b7dad44b7af799006f0349838c4bf9a718a8e2a4de5b3b6446a320b13d81d45b3c539b9f0d27a686209dcfcd0e4cce2cdf86bb32126160e8327bf35ecafc3
|
data/hyper-react.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'hyper-store', React::VERSION
|
26
26
|
spec.add_dependency 'opal', '>= 0.11.0', '< 0.12.0'
|
27
27
|
spec.add_dependency 'opal-activesupport', '~> 0.3.1'
|
28
|
+
spec.add_dependency 'hyperloop-config', React::VERSION
|
28
29
|
|
29
30
|
spec.add_development_dependency 'chromedriver-helper'
|
30
31
|
spec.add_development_dependency 'hyper-spec', React::VERSION
|
data/lib/react/config.rb
CHANGED
data/lib/react/react-source.rb
CHANGED
@@ -11,6 +11,7 @@ if RUBY_ENGINE == 'opal'
|
|
11
11
|
else
|
12
12
|
require "react/config"
|
13
13
|
require "react/rails/asset_variant"
|
14
|
-
|
14
|
+
variant = Hyperloop.env.production? ? 'production' : 'development'
|
15
|
+
react_directory = React::Rails::AssetVariant.new({environment: variant}).react_directory
|
15
16
|
Opal.append_path react_directory.untaint
|
16
17
|
end
|
@@ -80,7 +80,7 @@ module React
|
|
80
80
|
# 3 an element that is NOT yet pushed on the rendering buffer
|
81
81
|
# 4 or the last element pushed on the buffer
|
82
82
|
#
|
83
|
-
# in case 1 we
|
83
|
+
# in case 1 we render a span
|
84
84
|
# in case 2 we automatically push the string onto the buffer
|
85
85
|
# in case 3 we also push the Element onto the buffer IF the buffer is empty
|
86
86
|
# case 4 requires no special processing
|
@@ -93,7 +93,10 @@ module React
|
|
93
93
|
def run_child_block(is_outer_scope)
|
94
94
|
result = yield
|
95
95
|
if result.respond_to?(:acts_as_string?) && result.acts_as_string?
|
96
|
-
|
96
|
+
# hyper-mesh DummyValues respond to acts_as_string, and must
|
97
|
+
# be converted to spans INSIDE the parent, otherwise the waiting_on_resources
|
98
|
+
# flag will get set in the wrong context
|
99
|
+
React::RenderingContext.render(:span) { result.to_s }
|
97
100
|
elsif result.is_a?(String) || (result.is_a?(React::Element) && @buffer.empty?)
|
98
101
|
@buffer << result
|
99
102
|
end
|
@@ -37,9 +37,7 @@ module React
|
|
37
37
|
def self.log(message, message_type = :info)
|
38
38
|
message = [message] unless message.is_a? Array
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
if (message_type == :info || message_type == :warning) && is_production
|
40
|
+
if (message_type == :info || message_type == :warning) && Hyperloop.env.production?
|
43
41
|
return
|
44
42
|
end
|
45
43
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyper-react
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.lap25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chang
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-02
|
14
|
+
date: 2018-03-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: hyper-store
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.0.
|
22
|
+
version: 1.0.0.lap25
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.0.
|
29
|
+
version: 1.0.0.lap25
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: opal
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,6 +61,20 @@ dependencies:
|
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 0.3.1
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: hyperloop-config
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - '='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.0.0.lap25
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - '='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.0.lap25
|
64
78
|
- !ruby/object:Gem::Dependency
|
65
79
|
name: chromedriver-helper
|
66
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,14 +95,14 @@ dependencies:
|
|
81
95
|
requirements:
|
82
96
|
- - '='
|
83
97
|
- !ruby/object:Gem::Version
|
84
|
-
version: 1.0.0.
|
98
|
+
version: 1.0.0.lap25
|
85
99
|
type: :development
|
86
100
|
prerelease: false
|
87
101
|
version_requirements: !ruby/object:Gem::Requirement
|
88
102
|
requirements:
|
89
103
|
- - '='
|
90
104
|
- !ruby/object:Gem::Version
|
91
|
-
version: 1.0.0.
|
105
|
+
version: 1.0.0.lap25
|
92
106
|
- !ruby/object:Gem::Dependency
|
93
107
|
name: jquery-rails
|
94
108
|
requirement: !ruby/object:Gem::Requirement
|
@@ -367,8 +381,6 @@ files:
|
|
367
381
|
- lib/react/component/should_component_update.rb
|
368
382
|
- lib/react/component/tags.rb
|
369
383
|
- lib/react/config.rb
|
370
|
-
- lib/react/config/client.rb.erb
|
371
|
-
- lib/react/config/server.rb
|
372
384
|
- lib/react/element.rb
|
373
385
|
- lib/react/event.rb
|
374
386
|
- lib/react/ext/hash.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
if RUBY_ENGINE == 'opal'
|
2
|
-
module React
|
3
|
-
module Config
|
4
|
-
extend self
|
5
|
-
def environment=(value)
|
6
|
-
raise "Environment cannot be configured at runtime."
|
7
|
-
end
|
8
|
-
|
9
|
-
def config
|
10
|
-
hash = %x{
|
11
|
-
Opal.hash({
|
12
|
-
environment: <%= '"' + React::Config.config[:environment] + '"' %>
|
13
|
-
})
|
14
|
-
}
|
15
|
-
hash
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
data/lib/react/config/server.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
if RUBY_ENGINE != 'opal'
|
2
|
-
module React
|
3
|
-
module Config
|
4
|
-
extend self
|
5
|
-
def environment=(value)
|
6
|
-
config[:environment] = value
|
7
|
-
end
|
8
|
-
|
9
|
-
def config
|
10
|
-
@config ||= default_config
|
11
|
-
end
|
12
|
-
|
13
|
-
def default_config
|
14
|
-
{
|
15
|
-
environment: ENV['RACK_ENV'] || 'development'
|
16
|
-
}
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
module Hyperloop
|
21
|
-
define_setting :prerendering, :off
|
22
|
-
end
|
23
|
-
end
|