ruby-puppetdb 1.1.0 → 1.1.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.
- data/Modulefile +1 -1
- data/lib/puppetdb/lexer.l +2 -2
- data/lib/puppetdb/lexer.rb +2 -2
- metadata +3 -3
data/Modulefile
CHANGED
data/lib/puppetdb/lexer.l
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# vim: syntax=ruby
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'yaml'
|
4
4
|
|
5
5
|
class PuppetDB::Lexer
|
6
6
|
macro
|
@@ -25,7 +25,7 @@ rule
|
|
25
25
|
false(?!{STR}) { [:BOOLEAN, false]}
|
26
26
|
-?\d+\.\d+ { [:NUMBER, text.to_f] }
|
27
27
|
-?\d+ { [:NUMBER, text.to_i] }
|
28
|
-
\"(\\.|[^\\"])*\" { [:STRING,
|
28
|
+
\"(\\.|[^\\"])*\" { [:STRING, YAML.load(text)] }
|
29
29
|
{STR}+ { [:STRING, text] }
|
30
30
|
@@ { [:EXPORTED, text] }
|
31
31
|
end
|
data/lib/puppetdb/lexer.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
require 'racc/parser'
|
8
8
|
# vim: syntax=ruby
|
9
9
|
|
10
|
-
require '
|
10
|
+
require 'yaml'
|
11
11
|
|
12
12
|
module PuppetDB
|
13
13
|
class Lexer < Racc::Parser
|
@@ -115,7 +115,7 @@ class Lexer < Racc::Parser
|
|
115
115
|
@rex_tokens.push action { [:NUMBER, text.to_i] }
|
116
116
|
|
117
117
|
when (text = ss.scan(/\"(\\.|[^\\"])*\"/))
|
118
|
-
@rex_tokens.push action { [:STRING,
|
118
|
+
@rex_tokens.push action { [:STRING, YAML.load(text)] }
|
119
119
|
|
120
120
|
when (text = ss.scan(/[\w_:]+/))
|
121
121
|
@rex_tokens.push action { [:STRING, text] }
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 1
|
9
|
+
version: 1.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dan Bode
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-05
|
18
|
+
date: 2013-06-05 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|