hiera 1.2.0.rc2 → 1.2.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of hiera might be problematic. Click here for more details.
- data/lib/hiera.rb +1 -1
- data/lib/hiera/config.rb +15 -0
- data/spec/unit/backend_spec.rb +1 -0
- metadata +4 -4
data/lib/hiera.rb
CHANGED
data/lib/hiera/config.rb
CHANGED
@@ -42,10 +42,25 @@ class Hiera::Config
|
|
42
42
|
@config[:logger] = "console"
|
43
43
|
Hiera.logger = "console"
|
44
44
|
end
|
45
|
+
|
46
|
+
self.validate!
|
45
47
|
|
46
48
|
@config
|
47
49
|
end
|
48
50
|
|
51
|
+
def validate!
|
52
|
+
case @config[:merge_behavior]
|
53
|
+
when :deep,'deep',:deeper,'deeper'
|
54
|
+
begin
|
55
|
+
require "deep_merge"
|
56
|
+
rescue LoadError
|
57
|
+
Hiera.warn "Ignoring configured merge_behavior"
|
58
|
+
Hiera.warn "Must have 'deep_merge' gem installed."
|
59
|
+
@config[:merge_behavior] = :native
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
49
64
|
##
|
50
65
|
# yaml_load_file directly delegates to YAML.load_file and is intended to be
|
51
66
|
# a private, internal method suitable for stubbing and mocking.
|
data/spec/unit/backend_spec.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -3093716430
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
9
|
- 0
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 1.2.0.
|
11
|
+
- 3
|
12
|
+
version: 1.2.0.rc3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Puppet Labs
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2013-03-
|
20
|
+
date: 2013-03-27 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: json_pure
|