helm-wrapper 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/helm-wrapper/shared/variables.rb +10 -7
- data/lib/helm-wrapper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1d3f972839e1f9e7abd290193f07d57517d5ce589056e880c06d464bdd7bf37
|
4
|
+
data.tar.gz: 9bad65a1005854b57ccdfb14cea4f7e2c1305eb4669fb4d65c17b72e5004c27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecf5901a01a7dccbb485db2d25467fec5759f243a8bd96d9ff3f0e22f7862f0e388d710190c95ab580cbdde27176923d3eeaf3573ebfc5571d779956a58fbf14
|
7
|
+
data.tar.gz: 81c011c1774a3649ecf4a5a68b3bca0f5769760a73455ac656aa624639cea78a1b99f7282cf64cd3a1f4a7dabd41ff50d8fcc7555fc5fe821f7416036008709f
|
@@ -37,7 +37,7 @@ module HelmWrapper
|
|
37
37
|
core[:namespace] = nil
|
38
38
|
core[:release] = release
|
39
39
|
|
40
|
-
user = cleanse(variables: identifiers, reserved: core.keys)
|
40
|
+
user = cleanse(variables: identifiers, reserved: core.keys, downcase: true)
|
41
41
|
|
42
42
|
begin
|
43
43
|
core[:namespace] = namespace % user
|
@@ -107,17 +107,20 @@ module HelmWrapper
|
|
107
107
|
|
108
108
|
###############################################################################
|
109
109
|
|
110
|
-
def cleanse(variables:, reserved:)
|
110
|
+
def cleanse(variables:, reserved:, downcase: false)
|
111
111
|
result = Hash.new
|
112
112
|
|
113
113
|
variables.keys.each do |key|
|
114
114
|
logger.fatal("Could not clean variables hash. All keys MUST be strings!") unless key.kind_of?(String)
|
115
|
-
logger.fatal("Could not clean variables hash, key: #{key.downcase} is reserved or already in use and cannot be used!") if reserved.include?(key.downcase.to_sym)
|
116
|
-
logger.fatal("Could not clean variables hash, duplicate key found: #{key.downcase}!") if result.key?(key.downcase.to_sym)
|
117
|
-
logger.fatal("Could not clean variables hash, value for: #{key.downcase} is not a string!") unless variables[key].kind_of?(String)
|
118
|
-
logger.fatal("Could not clean variables hash, value for: #{key.downcase} is empty!") if variables[key].strip.empty?
|
119
115
|
|
120
|
-
|
116
|
+
sym = downcase ? key.downcase.to_sym : key.to_sym
|
117
|
+
|
118
|
+
logger.fatal("Could not clean variables hash, key: #{sym.to_s} is reserved or already in use and cannot be used!") if reserved.include?(sym)
|
119
|
+
logger.fatal("Could not clean variables hash, duplicate key found: #{sym.to_s}!") if result.key?(sym)
|
120
|
+
logger.fatal("Could not clean variables hash, value for: #{sym.to_s} is not a string!") unless variables[key].kind_of?(String)
|
121
|
+
logger.fatal("Could not clean variables hash, value for: #{sym.to_s} is empty!") if variables[key].strip.empty?
|
122
|
+
|
123
|
+
result[sym] = variables[key].strip
|
121
124
|
end
|
122
125
|
|
123
126
|
return result
|
data/lib/helm-wrapper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helm-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Lees
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|