hiera-multiyaml 0.0.1 → 0.0.2
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 +4 -4
- data/lib/hiera/backend/multiyaml_backend.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e83e964946c8fc4bfc5726b09ef9c92180faeb8d
|
4
|
+
data.tar.gz: 89e3546bceecda814c6c7dd917e0dbdc39d66c35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1350987dddbe140ca5bc7a34e9da2051ff009813b7618ad938b8f6eb185a370075552129d0ff25986d66c6ce386270a735f42677497d1e5b80559a319a01ad61
|
7
|
+
data.tar.gz: 9e8b7336edf9583076d5f147252f4e48b009ed464e53cc32b7ae6a8ee5a650621d50293d2c9397fca9d03467850894a58749eca5ec011aec5c2cf8e54c059869
|
@@ -40,10 +40,13 @@ class Hiera
|
|
40
40
|
next if data.empty?
|
41
41
|
next unless data.include?(key)
|
42
42
|
|
43
|
-
Hiera.debug("MultiYAML: Found #{key} in #{backend}/#{source}")
|
43
|
+
Hiera.debug("MultiYAML: Found #{key} in #{backend}/#{source} with resolution_type #{resolution_type}")
|
44
44
|
|
45
45
|
new_answer = Backend.parse_answer(data[key], scope)
|
46
46
|
answer = merge_answer(resolution_type, new_answer, answer)
|
47
|
+
if resolution_type == :priority
|
48
|
+
break
|
49
|
+
end
|
47
50
|
end
|
48
51
|
Hiera.debug("MultiYAML: Done with backend #{backend}")
|
49
52
|
end
|
@@ -54,7 +57,7 @@ class Hiera
|
|
54
57
|
|
55
58
|
def merge_answer(resolution_type, new_answer, answer)
|
56
59
|
if not new_answer.nil?
|
57
|
-
case resolution_type
|
60
|
+
case resolution_type.is_a?(Hash) ? :hash : resolution_type
|
58
61
|
when :array
|
59
62
|
raise Exception, "Hiera type mismatch: expected Array and got #{new_answer.class}" unless new_answer.kind_of? Array or new_answer.kind_of? String
|
60
63
|
answer ||= []
|
@@ -71,4 +74,4 @@ class Hiera
|
|
71
74
|
end
|
72
75
|
end
|
73
76
|
end
|
74
|
-
end
|
77
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera-multiyaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- denise stockman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Multiple yaml backend for Puppet
|
14
14
|
email: denise@stockmans.org
|