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 +4 -4
- data/lib/react-jsx-sprockets/tilt.rb +8 -3
- data/lib/react-jsx-sprockets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d08407f1ac326c39409e4e332bbdd5c7335e91e8
|
4
|
+
data.tar.gz: 77bbe56f3cf04980ecbbf873e6ec47c83e7a3107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|