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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19eddb389e96a7cd3e93ca220c2ebb1c5706b764
4
- data.tar.gz: bfef0c54b56a85f5a5fb575916e7f79d6a5befdb
3
+ metadata.gz: 7ebb12bf6ecf4fa190d9839ee1d706643ecca536
4
+ data.tar.gz: 5b436e733a9759681a24c473383649ca4acf8b88
5
5
  SHA512:
6
- metadata.gz: bb52be0873323d76b9c80653f1f2cdce8e0af6c9d7361e86d50bcba213dfde9c9b3f4870f8b9f1f39b439c77d8f24bef75ff7d71d20f6f7a305eb0315e85d866
7
- data.tar.gz: be7d9ef9f009d9b056450b03420bb9614700324ea3389bc37d4b93ab2fca4290f48222cd6b532b17053cee4e1bf71a00efe45204f0bb1ad7f51fc8ea17629438
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
@@ -1,3 +1,3 @@
1
1
  module KafoParsers
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-05-06 00:00:00.000000000 Z
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: