kafo_parsers 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kafo_parsers/puppet_strings_module_parser.rb +7 -2
- data/lib/kafo_parsers/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ebb12bf6ecf4fa190d9839ee1d706643ecca536
|
4
|
+
data.tar.gz: 5b436e733a9759681a24c473383649ca4acf8b88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2250f2cb342093586f88ed2e57289ab8b205b090d130122b63e32172a65e5d147a09edeb5afb3fcdfd779bb9341300e3df938f09f32973847643205fb2a9ba8
|
7
|
+
data.tar.gz: 965bd310c428fac43f795ab118fb4b02ee7a2e3790a46081ba02e17359323fccc28b636822e1155d098ca393f50058f6f5544b90ac8488b7891c7a16d555c170
|
@@ -77,7 +77,7 @@ module KafoParsers
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def values
|
80
|
-
Hash[@parsed_hash['parameters'].map { |name, value| [ name, sanitize(value) ] }]
|
80
|
+
Hash[@parsed_hash['parameters'].map { |name, value| [ name, value.nil? ? nil : sanitize(value) ] }]
|
81
81
|
end
|
82
82
|
|
83
83
|
# unsupported in puppet strings parser
|
@@ -100,7 +100,7 @@ module KafoParsers
|
|
100
100
|
parser = DocParser.new(@parsed_hash['docstring']).parse
|
101
101
|
data[:docs] = parser.docs
|
102
102
|
data[:groups] = parser.groups
|
103
|
-
data[:types] = parser.types
|
103
|
+
data[:types] = merge_doc_types(parser.types)
|
104
104
|
data[:conditions] = parser.conditions
|
105
105
|
end
|
106
106
|
data
|
@@ -123,5 +123,10 @@ module KafoParsers
|
|
123
123
|
|
124
124
|
value
|
125
125
|
end
|
126
|
+
|
127
|
+
def merge_doc_types(types)
|
128
|
+
Hash[@parsed_hash['signatures'].flatten.map { |param| [ param['name'], param['type'] ] }].merge(types)
|
129
|
+
end
|
130
|
+
|
126
131
|
end
|
127
132
|
end
|
data/lib/kafo_parsers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafo_parsers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -152,4 +152,3 @@ signing_key:
|
|
152
152
|
specification_version: 4
|
153
153
|
summary: Puppet module parsers
|
154
154
|
test_files: []
|
155
|
-
has_rdoc:
|