reactive-ruby 0.7.39 → 0.7.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/react/component/props_wrapper.rb +1 -1
- data/lib/reactive-ruby/version.rb +1 -1
- data/spec/react/param_declaration_spec.rb +14 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f32352dc504b51ec1fa36ab7782d4c7dc65ff7
|
4
|
+
data.tar.gz: 5a39e1ace085cff51b9b01e16e2d30be7165343a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba18860c9830a012abae9ebb884039f0f1fe2dbfe880d123c2aa320df7a9eec6f74f87f6e92532937dee22744542b36cffa30f354e289ef5d5ce4e3ddbff0de
|
7
|
+
data.tar.gz: 983bb03b491c2e4c5a9af6556d803f6037ded0a76db841ca3d4a309f215dbccc940dd1ef7f9f4184179555b12d84b93c4683bd36a6b94dafa9354709d579d181
|
@@ -54,7 +54,7 @@ module React
|
|
54
54
|
def unchanged_processed_params(new_props)
|
55
55
|
Hash[
|
56
56
|
*@processed_params.collect do |key, value|
|
57
|
-
[key, value] if @props[key] == new_props[key]
|
57
|
+
[key, value] if @props[key].equal? new_props[key] # `#{@props[key]} == #{new_props[key]}`
|
58
58
|
end.compact.flatten(1)
|
59
59
|
]
|
60
60
|
end
|
@@ -218,7 +218,8 @@ describe 'the param macro' do
|
|
218
218
|
expect(React.render_to_static_markup(React.create_element(Foo, foo: {bazwoggle: 1}))).to eq('<span>2</span>')
|
219
219
|
end
|
220
220
|
|
221
|
-
it "
|
221
|
+
it "even if contains an embedded native object" do
|
222
|
+
stub_const "Bar", Class.new(React::Component::Base)
|
222
223
|
stub_const "BazWoggle", Class.new
|
223
224
|
BazWoggle.class_eval do
|
224
225
|
def initialize(kind)
|
@@ -226,23 +227,28 @@ describe 'the param macro' do
|
|
226
227
|
end
|
227
228
|
attr_accessor :kind
|
228
229
|
def self._react_param_conversion(json, validate_only)
|
229
|
-
new(json[:bazwoggle]) if json[:bazwoggle]
|
230
|
+
new(JSON.from_object(json[0])[:bazwoggle]) if JSON.from_object(json[0])[:bazwoggle]
|
230
231
|
end
|
231
|
-
end
|
232
|
-
|
232
|
+
end
|
233
|
+
Bar.class_eval do
|
233
234
|
param :foo, type: BazWoggle
|
235
|
+
def render
|
236
|
+
params.foo.kind.to_s
|
237
|
+
end
|
238
|
+
end
|
239
|
+
Foo.class_eval do
|
234
240
|
export_state :change_me
|
235
241
|
before_mount do
|
236
|
-
|
242
|
+
Foo.change_me! "initial"
|
237
243
|
end
|
238
244
|
def render
|
239
|
-
|
245
|
+
Bar(foo: Native([`{bazwoggle: #{Foo.change_me}}`]))
|
240
246
|
end
|
241
247
|
end
|
242
248
|
div = `document.createElement("div")`
|
243
|
-
React.render(React.create_element(Foo,
|
249
|
+
React.render(React.create_element(Foo, {}), div)
|
244
250
|
Foo.change_me! "updated"
|
245
|
-
expect(`div.children[0].innerHTML`).to eq("
|
251
|
+
expect(`div.children[0].innerHTML`).to eq("updated")
|
246
252
|
end
|
247
253
|
end
|
248
254
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reactive-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|