reactive-ruby 0.7.40 → 0.7.41

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8f32352dc504b51ec1fa36ab7782d4c7dc65ff7
4
- data.tar.gz: 5a39e1ace085cff51b9b01e16e2d30be7165343a
3
+ metadata.gz: 6a705f2db0690bcdfe2c8e7d6770cdcf7cff3945
4
+ data.tar.gz: 941e5ccb93eb82f42b28bf201b3af8d09da3560c
5
5
  SHA512:
6
- metadata.gz: 9ba18860c9830a012abae9ebb884039f0f1fe2dbfe880d123c2aa320df7a9eec6f74f87f6e92532937dee22744542b36cffa30f354e289ef5d5ce4e3ddbff0de
7
- data.tar.gz: 983bb03b491c2e4c5a9af6556d803f6037ded0a76db841ca3d4a309f215dbccc940dd1ef7f9f4184179555b12d84b93c4683bd36a6b94dafa9354709d579d181
6
+ metadata.gz: 2c6e0e2cbc89a402357a32bde0f8507c340b89c4103d159ede64cb2231e2c3d49123940a2dfb807316e6d6df466cbe92f61750465b1d4bbdba66ce77c937a85b
7
+ data.tar.gz: e89a5259098a121564b22dd52b53869c54ca96ceeddb0dea21bd3325178b3ffad69427e6599afa5cc2762b499734945b691895af41abbebcb811ec958014c85f
@@ -25,8 +25,8 @@ module ReactiveRuby
25
25
 
26
26
  def configure_test_app
27
27
  template 'boot.rb.erb', "#{test_app_path}/config/boot.rb", force: true
28
- template 'application.rb.erb', "#{test_app_path}/config/application.rb", force: true
29
- template 'assets/javascripts/application.rb',
28
+ template 'test_application.rb.erb', "#{test_app_path}/config/application.rb", force: true
29
+ template 'assets/javascripts/test_application.rb',
30
30
  "#{test_app_path}/app/assets/javascripts/application.rb", force: true
31
31
  template 'assets/javascripts/components.rb',
32
32
  "#{test_app_path}/app/views/components.rb", force: true
@@ -64,7 +64,11 @@ module React
64
64
  end
65
65
 
66
66
  def children
67
- nodes = [`#{@native}.props.children`].flatten
67
+ nodes = if `#{@native}.props.children==undefined`
68
+ []
69
+ else
70
+ [`#{@native}.props.children`].flatten
71
+ end
68
72
  class << nodes
69
73
  include Enumerable
70
74
 
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = "0.7.40"
2
+ VERSION = "0.7.41"
3
3
  end
@@ -705,6 +705,14 @@ describe React::Component do
705
705
  expect(nodes).to be_a(Enumerator)
706
706
  expect(nodes.size).to eq(2)
707
707
  end
708
+
709
+ it 'returns an empty Enumerator if there are no children' do
710
+ ele = React.create_element(Foo)
711
+ renderElementToDocument(ele)
712
+ nodes = Foo.the_children.each
713
+ expect(nodes.size).to eq(nil)
714
+ expect(nodes.count).to eq(0)
715
+ end
708
716
  end
709
717
  end
710
718
  end
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.40
4
+ version: 0.7.41
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-03 00:00:00.000000000 Z
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -303,11 +303,11 @@ files:
303
303
  - example/todos/vendor/base.css
304
304
  - example/todos/vendor/bg.png
305
305
  - example/todos/vendor/jquery.js
306
- - lib/generators/reactive_ruby/test_app/templates/application.rb.erb
307
- - lib/generators/reactive_ruby/test_app/templates/assets/javascripts/application.rb
308
306
  - lib/generators/reactive_ruby/test_app/templates/assets/javascripts/components.rb
307
+ - lib/generators/reactive_ruby/test_app/templates/assets/javascripts/test_application.rb
309
308
  - lib/generators/reactive_ruby/test_app/templates/boot.rb.erb
310
309
  - lib/generators/reactive_ruby/test_app/templates/script/rails
310
+ - lib/generators/reactive_ruby/test_app/templates/test_application.rb.erb
311
311
  - lib/generators/reactive_ruby/test_app/templates/views/components/hello_world.rb
312
312
  - lib/generators/reactive_ruby/test_app/templates/views/components/todo.rb
313
313
  - lib/generators/reactive_ruby/test_app/test_app_generator.rb