k8s-client 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/k8s/client/version.rb +1 -1
- data/lib/k8s/stack.rb +1 -1
- data/lib/k8s/util.rb +14 -0
- 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: 6e770f7bd940686f59826ca1076d57718c8518dbfeeb754c6a28356c4225548b
|
4
|
+
data.tar.gz: 1b5b2a882826ddad99bf9db696dee1520a6bf6098b6ac6bbce0314bef088fb4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f3cf3e36c7a44f50701180ac8b942e1b9f807826fcc806605b245fbac555d797c5c2368f520a6ea25f715863f51bfce2aa2c0c678b52bd94b70020fdef50fc9
|
7
|
+
data.tar.gz: 89e5f36e62fe1b89f7ef8d64f6edf31d56a4502d61948bc8592212c584fede337c50c4e4f2ed3c1782b085d41752b541b6414fc15e462a3e05c80ece1c86a773
|
data/lib/k8s/client/version.rb
CHANGED
data/lib/k8s/stack.rb
CHANGED
data/lib/k8s/util.rb
CHANGED
@@ -25,6 +25,20 @@ module K8s
|
|
25
25
|
args.map{ |arg| value_map[arg] }
|
26
26
|
end
|
27
27
|
|
28
|
+
# Recursive compact for Hash/Array
|
29
|
+
#
|
30
|
+
# @param hash_or_array [Hash,Array]
|
31
|
+
# @return [Hash,Array]
|
32
|
+
def self.recursive_compact(hash_or_array)
|
33
|
+
p = proc do |*args|
|
34
|
+
v = args.last
|
35
|
+
v.delete_if(&p) if v.respond_to?(:delete_if) && !v.is_a?(Array)
|
36
|
+
v.nil? || v.respond_to?(:empty?) && (v.empty? && (v.is_a?(Hash) || v.is_a?(Array)))
|
37
|
+
end
|
38
|
+
|
39
|
+
hash_or_array.delete_if(&p)
|
40
|
+
end
|
41
|
+
|
28
42
|
# Produces a set of json-patch operations so that applying
|
29
43
|
# the operations on a, gives you the results of b
|
30
44
|
# Used in correctly patching the Kube resources on stack updates
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: k8s-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kontena, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|