kafo 0.6.2 → 0.6.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/param.rb +17 -3
- data/lib/kafo/version.rb +1 -1
- 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: 923a9f55809eab8edc14b6e386e69b7e551b5aae
|
4
|
+
data.tar.gz: 7c034b760df2a1efcda1b036107d68dbdaf980d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dd6c53f0404dd0690fa3dae9940016d9b83a9f5ba91f4913092975865653ac34d9b84b2981d66474618ace3577aacad9301fe819975a79a566224408ad7f1bb
|
7
|
+
data.tar.gz: 7beb788b395010fc7a40a056f7dbeeeb5d66b788200a099be4d5ddd19c368f96b526ca54602e9fe78389af163951fc965ba1000411fba95161cf5b34d75fce17
|
data/lib/kafo/param.rb
CHANGED
@@ -42,11 +42,25 @@ module Kafo
|
|
42
42
|
if default == 'UNSET'
|
43
43
|
self.value = nil
|
44
44
|
else
|
45
|
-
# if we don't have default value from dump (can happen for modules added from hooks)
|
46
|
-
# we fallback to their own default values
|
47
45
|
if defaults.has_key?(default)
|
48
46
|
value = defaults[default]
|
49
|
-
|
47
|
+
case value
|
48
|
+
when :undef
|
49
|
+
# value can be set to :undef if value is not defined
|
50
|
+
# (e.g. puppetmaster = $::puppetmaster which is not defined yet)
|
51
|
+
self.value = nil
|
52
|
+
when :undefined
|
53
|
+
# in puppet 2.7 :undefined means that it's param which value is
|
54
|
+
# not set by another parameter (e.g. foreman_group = 'something')
|
55
|
+
# which means, default is sensible unlike dumped default
|
56
|
+
# newer puppet has default dump in format 'value' => 'value' so
|
57
|
+
# it's handled correctly by else branch
|
58
|
+
self.value = self.default
|
59
|
+
else
|
60
|
+
self.value = value
|
61
|
+
end
|
62
|
+
# if we don't have default value from dump (can happen for modules added from hooks)
|
63
|
+
# we fallback to their own default values which must be sensible
|
50
64
|
else
|
51
65
|
self.value = self.default
|
52
66
|
end
|
data/lib/kafo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.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: 2014-06-
|
11
|
+
date: 2014-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|