react-jsx-sprockets 0.2.3 → 0.2.4

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: 029a471f3fa1c61122db3b17e0f7ec171d4e46c9
4
- data.tar.gz: 393184c6fd4229af69016dd5ef0fcb0b4ac3421f
3
+ metadata.gz: d08407f1ac326c39409e4e332bbdd5c7335e91e8
4
+ data.tar.gz: 77bbe56f3cf04980ecbbf873e6ec47c83e7a3107
5
5
  SHA512:
6
- metadata.gz: 91ec307fe9fe8c7f286796620187a46111aab772e258bd7567e20072664f47dd9444af61654acc9ed88114ad1e713487b817d6c4da00e5170a6c01e91221a856
7
- data.tar.gz: 5c04be7cd4cfde69e4612f06655a42390c693be377314acbaa55d091c1abdf2f12ff82fb2af52a6016e863d29a5e72e2cb9f0a3cdeb8e7d64116cbc3dce64bb3
6
+ metadata.gz: 83581cf32ff66eae0e38997e0528206eea90090f0361ab26fcb939772ee8b60181de74e37c71a0d4613f1b99b5ff8c5eb63efd385759bc8c7813d3d3f2f9e52d
7
+ data.tar.gz: e434ee1c96b309ee9b8b0e14cebdebbfdfbd7e3b248f82166c6d2e9ffe54f2f470134cc196b641a78067ae0e0cea16734051655ddb878f2da8a727bfd89f12aa
@@ -7,15 +7,20 @@ module ReactJSXSprockets
7
7
  CompileError = Class.new(StandardError)
8
8
 
9
9
  def evaluate(scope, locals, &block)
10
+ self.call(data:data)
11
+ end
12
+
13
+ def prepare; end
14
+
15
+ # new sprockets expects a proc rather than tilt
16
+ def self.call(input)
10
17
  begin
11
- output = JSX.compile(data)
18
+ output = JSX.compile(input[:data])
12
19
  rescue ExecJS::RuntimeError => e
13
20
  raise CompileError.new("ReactJSXSprockets: Failed to compile: #{e.inspect}")
14
21
  end
15
22
 
16
23
  output
17
24
  end
18
-
19
- def prepare; end
20
25
  end
21
26
  end
@@ -1,3 +1,3 @@
1
1
  module ReactJSXSprockets
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react-jsx-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Stuart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-12 00:00:00.000000000 Z
11
+ date: 2016-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs