liquidscript 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37763a0403a2c5970ed9af12838e06cd201098e7
4
- data.tar.gz: 2f685296ac6651a7caf0cb4d632363ea60e31adb
3
+ metadata.gz: 15d7e4ab32600ce2b30102ede1e2872f5cc907c4
4
+ data.tar.gz: 92ab44730d63bacbb9585caa95b58b9bb9366ff2
5
5
  SHA512:
6
- metadata.gz: 8ff68b0b6dd56458726509b4e1a9660ea25ce7324d2bee3fee6b51f8a0d9dbe456085c6ef2e588c4cb56185c062160a3ff0e104075d335d2263e19c308aa8e54
7
- data.tar.gz: e9655c95acdfb55f8b4da23ddbb66daffb3bf0ac9fd91633e3c62a27b896c7411340de41ea6c6de876d7762bd1a3471bdc13025143f9f36c82112d5f5dc52a21
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.each { |v| top.context.allow(v.intern) }
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| top.context.set(v.intern,
61
- :class => true).parameter! }
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
@@ -1,5 +1,5 @@
1
1
  module Liquidscript
2
2
 
3
3
  # The current version of liquidscript.
4
- VERSION = "0.10.0".freeze
4
+ VERSION = "0.10.1".freeze
5
5
  end
@@ -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;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquidscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Rodi