kafo 1.0.2 → 1.0.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 +14 -2
- data/lib/kafo/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d72a4ee27bfb7b43960efdca85631bf83423fc0
|
4
|
+
data.tar.gz: 80f0f06eaf07cabde8a67df2d5e231511fc2d50f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3d55c99f389d35e425e5fd9ede4cc09dd559ca84a51c6fea66fe7fef49168240424b6e7d1756404b9fab4e9a9dca16769d612327fe25bbd9a33f626702c9c1
|
7
|
+
data.tar.gz: 2b6d1cecef96812457b9749e65e1b84b4cba5fa772d489fbdc0a11cb851dcc4dca0287b0f08bd6e861879e8167c15ea4fe0bda09facbbc0d878513ba3c013f45
|
data/lib/kafo/param.rb
CHANGED
@@ -26,8 +26,7 @@ module Kafo
|
|
26
26
|
|
27
27
|
def value=(value)
|
28
28
|
@value_set = true
|
29
|
-
value
|
30
|
-
@value = value
|
29
|
+
@value = normalize_value(value)
|
31
30
|
end
|
32
31
|
|
33
32
|
def unset_value
|
@@ -144,6 +143,19 @@ module Kafo
|
|
144
143
|
arg == :undef ? nil : arg
|
145
144
|
end
|
146
145
|
end
|
146
|
+
|
147
|
+
def normalize_value(value)
|
148
|
+
case value
|
149
|
+
when ::HighLine::String # don't persist highline extensions
|
150
|
+
value.to_s
|
151
|
+
when Array
|
152
|
+
value.map { |v| normalize_value(v) }
|
153
|
+
when Hash
|
154
|
+
Hash[value.map { |k,v| [normalize_value(k), normalize_value(v)] }]
|
155
|
+
else
|
156
|
+
value
|
157
|
+
end
|
158
|
+
end
|
147
159
|
end
|
148
160
|
end
|
149
161
|
|
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: 1.0.
|
4
|
+
version: 1.0.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-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.1.1
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: puppet
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "<"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 4.0.0
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "<"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 4.0.0
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: logging
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|