reactrb 0.8.6 → 0.8.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddbe495a34c70871decbabe9d4caf2816922686c
|
4
|
+
data.tar.gz: c04dd8a078c54622c08dc2442d593d21cea54fca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1465573197ce0818e16208eab0dd5155e6bb121ca1219df7ea9a12b2a44181e14c6b2fcb0076455ce9fd70441d4112b23d340afe12dc9d3c4c1f62d09caa28b
|
7
|
+
data.tar.gz: 87b26b83e9467871b9d3be9a7e905060e5ddbb4893b1ae10e63ae56f36bb74d512af5ded00b5392f9a77742398998617e94a8252dc263c924dd51c1a8b8ff319
|
data/lib/react/native_library.rb
CHANGED
@@ -46,7 +46,7 @@ module React
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def method_missing(method_name, *args, &block)
|
49
|
-
method = method_name.gsub(/_as_node$/, '')
|
49
|
+
method = method_name.gsub(/_as_node$/, '') # remove once _as_node is deprecated.
|
50
50
|
component_class = get_const(method) if const_defined?(method)
|
51
51
|
component_class ||= import_const_from_native(self, method, false)
|
52
52
|
raise 'could not import a react component named: '\
|
@@ -63,8 +63,10 @@ module React
|
|
63
63
|
def lookup_native_name(js_name)
|
64
64
|
native_name = scope_native_name(js_name)
|
65
65
|
`eval(#{native_name}) !== undefined && native_name`
|
66
|
-
|
66
|
+
# rubocop:disable Lint/RescueException # that is what eval raises in Opal >= 0.10.
|
67
|
+
rescue Exception
|
67
68
|
nil
|
69
|
+
# rubocop:enable Lint/RescueException
|
68
70
|
end
|
69
71
|
|
70
72
|
def scope_native_name(js_name)
|
@@ -34,7 +34,11 @@ module ReactiveRuby
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def opal(file)
|
37
|
-
Opal::Processor.load_asset_code
|
37
|
+
if Opal::Processor.respond_to?(:load_asset_code)
|
38
|
+
Opal::Processor.load_asset_code(assets, file)
|
39
|
+
else
|
40
|
+
Opal::Sprockets.load_asset(file, assets)
|
41
|
+
end
|
38
42
|
rescue # What exception is being caught here?
|
39
43
|
end
|
40
44
|
|
@@ -112,7 +112,7 @@ module React
|
|
112
112
|
return unless @ctx
|
113
113
|
args = [1] if args.length == 0
|
114
114
|
::ReactiveRuby::ComponentLoader.new(@ctx).load!
|
115
|
-
@ctx.eval("Opal.React
|
115
|
+
@ctx.eval("Opal.React.$const_get('IsomorphicHelpers').$#{method}(#{args.collect { |arg| "'#{arg}'"}.join(', ')})")
|
116
116
|
end
|
117
117
|
|
118
118
|
def self.register_before_first_mount_block(&block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reactrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chang
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: opal
|