react_component 0.0.1 → 0.0.2

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: 8f267b1f6fb8676d1e991828550fefc908c50516
4
- data.tar.gz: ad16c4e507d9c0d3071b184ebf7c8fc534d0e14d
3
+ metadata.gz: 326ea9b40a4a9701bac490b9ff6b20e357e21aaa
4
+ data.tar.gz: fdfefbf10ce9738738abffeef83bee28231949a5
5
5
  SHA512:
6
- metadata.gz: 5431b5828f9388ccb95b771467da842da496011d1e729d58bd6d0a7d1533b104da177fb0374c7a205551277a3410153f227114b70f0fec9d3eea79fd77dd151b
7
- data.tar.gz: d8a0e8ccfcf8007e8ebd77789e8ac94e2e4a07031f00412431a8abc00ac38c16c6fb33028219f261ba8af946274a1a132fe07518fcf287166cb272cc9f2d7f2c
6
+ metadata.gz: 293745ed4e10f9ce37807d2ae4710786d7587d5c6d7277556c62682a0d7dab72d25429f568b20dcd1139058818f9af10809814fae382f8ce22a8709603136d29
7
+ data.tar.gz: 46d9f01639f70092396511fc16c28c0313d3695203400d0e3a3867f7bed8a5d4f1e5847c0bd9a3983fe3a942ae67878c7663cab2f963d7168105689e880c9919
@@ -1,3 +1,3 @@
1
1
  module ReactComponent
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,18 @@
1
+ @ReactComponent = (definition) ->
2
+ old_render = definition.render
3
+ new_render = ->
4
+ fun = old_render.toString()
5
+ chunks = fun.split("{")
6
+
7
+ for key, value of React.DOM
8
+ unless key == 'var'
9
+ chunks[1] = "var #{key} = React.DOM['#{key}'];\n" + chunks[1]
10
+
11
+ fun = chunks.join("{")
12
+
13
+ eval("(#{fun}).call(this);")
14
+
15
+ definition.render = new_render
16
+
17
+ React.createClass definition
18
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hubert Łępicki, Marcin Nieborak
@@ -53,6 +53,7 @@ files:
53
53
  - lib/react_component/sprockets.rb
54
54
  - lib/react_component/version.rb
55
55
  - lib/tasks/react_component_tasks.rake
56
+ - vendor/assets/javascripts/react_component.js.coffee
56
57
  homepage: http://github.com/amberbit/react_component
57
58
  licenses:
58
59
  - MIT