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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c7493e3ad8781aedff836503fa5a0ed75c00a3d
4
- data.tar.gz: 2a2978ad24bcfc0c1c1d96cbec2c10236926ad8f
3
+ metadata.gz: 923a9f55809eab8edc14b6e386e69b7e551b5aae
4
+ data.tar.gz: 7c034b760df2a1efcda1b036107d68dbdaf980d8
5
5
  SHA512:
6
- metadata.gz: 9d7515cfb4f25db8004655924a21dd0003ec81b673c0e9c19687ba0b3722a7ebdd0e6fdff38f715e6587d722d7f97cd339667a10e7dc2b3855440c11150799de
7
- data.tar.gz: 246c61e09378488b0c4d5ff2864294f10a3ccec5068264603d47b461b1b816e48f76fb068fa7eaddbc4a985bbb0eaf76d5820a415c2c40ef31d0530c13902e2f
6
+ metadata.gz: 8dd6c53f0404dd0690fa3dae9940016d9b83a9f5ba91f4913092975865653ac34d9b84b2981d66474618ace3577aacad9301fe819975a79a566224408ad7f1bb
7
+ data.tar.gz: 7beb788b395010fc7a40a056f7dbeeeb5d66b788200a099be4d5ddd19c368f96b526ca54602e9fe78389af163951fc965ba1000411fba95161cf5b34d75fce17
@@ -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
- self.value = ([:undef, :undefined].include?(value) ? self.default : value)
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
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.6.2"
3
+ VERSION = "0.6.3"
4
4
  end
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.2
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-10 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler