liquidscript 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liquidscript/compiler/icr.rb +9 -3
- data/lib/liquidscript/version.rb +1 -1
- data/spec/fixtures/class.generate.yml +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15d7e4ab32600ce2b30102ede1e2872f5cc907c4
|
4
|
+
data.tar.gz: 92ab44730d63bacbb9585caa95b58b9bb9366ff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc621cd96f8dcc4e4258294fd6faaca57e94aa4d0b7f43802ed3f9191d4286d6bb95b1a7e0bbab1ce1335f24d926ea79de11e2e8e4a68567a0c273843d8f83ef
|
7
|
+
data.tar.gz: 8bbdd4a09b1f4474b98b5f457c42bc3e7c3027e82c0875c8932295916188dd2c574a88beb3b7cbac6b39de82760b0b920fe64b7219d9eb0a3f18a16d5b856ea3
|
@@ -54,16 +54,22 @@ module Liquidscript
|
|
54
54
|
case meta[:command].downcase
|
55
55
|
when "allow"
|
56
56
|
variables = meta[:args].split(' ')
|
57
|
-
variables.
|
57
|
+
variables.map {|x| normalize(x) }.each { |v|
|
58
|
+
top.context.allow(v.intern) }
|
58
59
|
when "cvar"
|
59
60
|
variables = meta[:args].split(' ')
|
60
|
-
variables.each { |v|
|
61
|
-
|
61
|
+
variables.map {|x| normalize(x) }.each { |v|
|
62
|
+
top.context.set(v.intern,
|
63
|
+
:class => true).parameter! }
|
62
64
|
else
|
63
65
|
raise UnknownDirectiveError.new(meta[:command])
|
64
66
|
end
|
65
67
|
end
|
66
68
|
end
|
69
|
+
|
70
|
+
def normalize(s)
|
71
|
+
s.gsub(/\-[a-z]/) { |p| p[1].upcase }
|
72
|
+
end
|
67
73
|
end
|
68
74
|
end
|
69
75
|
end
|
data/lib/liquidscript/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
data: |
|
2
|
-
#! allow require
|
2
|
+
#! allow require set-timeout
|
3
3
|
|
4
4
|
assert = require('assert)
|
5
5
|
|
@@ -32,6 +32,7 @@ data: |
|
|
32
32
|
}
|
33
33
|
|
34
34
|
assert.equal(new AnotherTest().some-number, 2)
|
35
|
+
set-timeout(()-> {})
|
35
36
|
|
36
37
|
module.exports = Something
|
37
38
|
|
@@ -78,5 +79,6 @@ compiled: |
|
|
78
79
|
Something.AnotherTest = AnotherTest;;
|
79
80
|
|
80
81
|
assert.equal(new AnotherTest().someNumber, 2);
|
82
|
+
setTimeout(function(){});
|
81
83
|
|
82
84
|
module.exports = Something;
|