reactrb 0.8.3 → 0.8.4
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/.rubocop.yml +8 -0
- data/component-name-lookup.md +145 -0
- data/config.ru +0 -1
- data/lib/react/api.rb +31 -2
- data/lib/react/component.rb +15 -126
- data/lib/react/component/class_methods.rb +45 -22
- data/lib/react/component/dsl_instance_methods.rb +57 -0
- data/lib/react/component/props_wrapper.rb +6 -0
- data/lib/react/component/tags.rb +96 -0
- data/lib/react/native_library.rb +76 -39
- data/lib/react/rendering_context.rb +19 -21
- data/lib/react/top_level.rb +19 -29
- data/lib/reactive-ruby/rails/component_mount.rb +3 -1
- data/lib/reactive-ruby/rails/controller_helper.rb +10 -10
- data/lib/reactive-ruby/version.rb +1 -1
- data/lib/reactrb.rb +16 -15
- data/lib/reactrb/auto-import.rb +32 -0
- data/lib/sources/react-v14.js +84 -0
- data/spec/react/component_spec.rb +0 -41
- data/spec/react/dsl_spec.rb +114 -4
- data/spec/react/native_library_spec.rb +293 -5
- data/spec/react/opal_jquery_extensions_spec.rb +4 -2
- data/spec/spec_helper.rb +3 -1
- metadata +7 -2
@@ -6,8 +6,10 @@ describe 'Element' do
|
|
6
6
|
React::API.clear_component_class_cache
|
7
7
|
end
|
8
8
|
|
9
|
-
it '
|
10
|
-
|
9
|
+
it 'renders a top level component using render' do
|
10
|
+
test_div = Element.new(:div)
|
11
|
+
test_div.render(:span, id: :render_test_span) { 'hello' }
|
12
|
+
expect(Element[test_div].find('#render_test_span').html).to eq('hello')
|
11
13
|
end
|
12
14
|
|
13
15
|
it 'will find the DOM node given a react element' do
|
data/spec/spec_helper.rb
CHANGED
@@ -15,7 +15,7 @@ end
|
|
15
15
|
|
16
16
|
if RUBY_ENGINE == 'opal'
|
17
17
|
require File.expand_path('../vendor/jquery-2.2.4.min', __FILE__)
|
18
|
-
require 'react-
|
18
|
+
require 'react-v14'
|
19
19
|
require 'reactrb'
|
20
20
|
require File.expand_path('../support/react/spec_helpers', __FILE__)
|
21
21
|
|
@@ -68,6 +68,8 @@ if RUBY_ENGINE == 'opal'
|
|
68
68
|
|
69
69
|
|
70
70
|
RSpec.configure do |config|
|
71
|
+
config.run_all_when_everything_filtered = true
|
72
|
+
#config.filter_run_including only: true
|
71
73
|
config.include React::SpecHelpers
|
72
74
|
config.filter_run_excluding :ruby
|
73
75
|
end
|
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.4
|
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-06-
|
13
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: opal
|
@@ -230,11 +230,13 @@ extra_rdoc_files: []
|
|
230
230
|
files:
|
231
231
|
- ".codeclimate.yml"
|
232
232
|
- ".gitignore"
|
233
|
+
- ".rubocop.yml"
|
233
234
|
- ".travis.yml"
|
234
235
|
- Gemfile
|
235
236
|
- LICENSE
|
236
237
|
- README.md
|
237
238
|
- Rakefile
|
239
|
+
- component-name-lookup.md
|
238
240
|
- config.ru
|
239
241
|
- example/examples/Gemfile
|
240
242
|
- example/examples/Gemfile.lock
|
@@ -349,7 +351,9 @@ files:
|
|
349
351
|
- lib/react/component/api.rb
|
350
352
|
- lib/react/component/base.rb
|
351
353
|
- lib/react/component/class_methods.rb
|
354
|
+
- lib/react/component/dsl_instance_methods.rb
|
352
355
|
- lib/react/component/props_wrapper.rb
|
356
|
+
- lib/react/component/tags.rb
|
353
357
|
- lib/react/element.rb
|
354
358
|
- lib/react/event.rb
|
355
359
|
- lib/react/ext/hash.rb
|
@@ -371,6 +375,7 @@ files:
|
|
371
375
|
- lib/reactive-ruby/server_rendering/contextual_renderer.rb
|
372
376
|
- lib/reactive-ruby/version.rb
|
373
377
|
- lib/reactrb.rb
|
378
|
+
- lib/reactrb/auto-import.rb
|
374
379
|
- lib/sources/react-latest.js
|
375
380
|
- lib/sources/react-v13.js
|
376
381
|
- lib/sources/react-v14.js
|