reactive-ruby 0.7.8 → 0.7.10

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: b37bddd1d92ebf8066e674ec21b5b1be0ecac5b3
4
- data.tar.gz: 7b8e0bcd250bca4d6d7d4ddb223cd9e520aa33a6
3
+ metadata.gz: 052c49e46522094adc05b9cb25ab4e1a84b9278e
4
+ data.tar.gz: b9a5721c96d244535be8348991b28d9cf5f242e5
5
5
  SHA512:
6
- metadata.gz: 958880a0f9b43d0d6859a6476d46bb2865d89863e5f60abba0caa2b7f1907a33ce6a52ce6058bd721d075f726c8edc774a8e6461a0e7b977d64d0d5a0aa3fa2a
7
- data.tar.gz: b783c96071b318b6adcb17c3dff9d79d52e840f31b813f3fb9aecc7fa4664312e3716fe2418f0c9fc545339c4f0d5e79b200aeb355062d5315b595eb5d9a0af5
6
+ metadata.gz: e01c83717b8d4bf5832b251f096aee5882bdef41c687206d76e99cdb13bd03cc82f94b168209e7bd2d6cb0b79ed18993ed8812ac6630edc5b290c45182cc7e17
7
+ data.tar.gz: f1056417667e177f9671b9559f4dec30ae2409615648c7925a3af3607485468175c5f4a81bc21391590736052169989c278c7a6123038c5b7f64a4541cc4874d
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: ../..
15
15
  specs:
16
- reactive-ruby (0.7.7)
16
+ reactive-ruby (0.7.9)
17
17
  jquery-rails
18
18
  opal
19
19
  opal-activesupport
@@ -5,15 +5,18 @@ module Components
5
5
  module Home
6
6
 
7
7
  class Show
8
-
8
+
9
9
  include React::Component # will create a new component named Show
10
10
 
11
11
  optional_param :say_hello_to
12
- other_params :others
12
+
13
+ backtrace :on
13
14
 
14
15
  def render
15
16
  puts "Rendering my first component!"
16
- "hello #{'there '+say_hello_to if say_hello_to}" # render "hello" with optional 'there ...'
17
+ div do
18
+ txt "hello #{'there '+say_hello_to if say_hello_to}" # render "hello" with optional 'there ...'
19
+ end
17
20
  end
18
21
 
19
22
  end
@@ -369,9 +369,9 @@ module React
369
369
  end
370
370
 
371
371
  module API
372
- #include Native
372
+ include Native
373
373
 
374
- alias_native :dom_node, :getDOMNode
374
+ #alias_native :dom_node, :getDOMNode
375
375
  alias_native :mounted?, :isMounted
376
376
  alias_native :force_update!, :forceUpdate
377
377
 
@@ -8,7 +8,9 @@ module React
8
8
 
9
9
  def self.render(name, *args, &block)
10
10
  @buffer = [] unless @buffer
11
- if block
11
+ if name == "txt"
12
+ element = args[0]
13
+ elsif block
12
14
  element = build do
13
15
  saved_waiting_on_resources = waiting_on_resources
14
16
  self.waiting_on_resources = nil
@@ -23,7 +25,7 @@ module React
23
25
  raise "a components render method must generate and return exactly 1 element or a string"
24
26
  end
25
27
 
26
- @buffer << result.to_s if result.is_a? String or (result.respond_to? :acts_as_string? and result.acts_as_string?) # For convience we push the last return value on if its a string
28
+ @buffer << result.to_s if !(result === @buffer.last) and (result.is_a? String or (result.respond_to? :acts_as_string? and result.acts_as_string?)) # For convience we push the last return value on if its a string
27
29
  @buffer << result if result.is_a? Element and @buffer.count == 0
28
30
  if name
29
31
  buffer = @buffer.dup
@@ -81,6 +83,11 @@ module React
81
83
  end
82
84
  end
83
85
 
86
+ def txt(*args)
87
+ return self.method_missing('txt', *args) if self.is_a? React::Component
88
+ React::RenderingContext.render("txt", self.to_s)
89
+ end
90
+
84
91
  def br
85
92
  return self.method_missing(*["br"]) if self.is_a? React::Component
86
93
  React::RenderingContext.render("span") { React::RenderingContext.render(self.to_s); React::RenderingContext.render("br") }
@@ -10,7 +10,7 @@ module React
10
10
  main map mark menu menuitem meta meter nav noscript object ol optgroup option
11
11
  output p param picture pre progress q rp rt ruby s samp script section select
12
12
  small source span strong style sub summary sup table tbody td textarea tfoot th
13
- thead time title tr track u ul var video wbr)
13
+ thead time title tr track u ul var video wbr txt)
14
14
  ATTRIBUTES = %w(accept acceptCharset accessKey action allowFullScreen allowTransparency alt
15
15
  async autoComplete autoPlay cellPadding cellSpacing charSet checked classID
16
16
  className cols colSpan content contentEditable contextMenu controls coords
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = "0.7.8"
2
+ VERSION = "0.7.10"
3
3
  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.8
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal