kubernetes-cli 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kubernetes-cli.rb +34 -0
- data/lib/kubernetes-cli/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: 18cd82d1d943375c55cd910c5befc34fe42359b9c1eaa936f95a6050b7b8af28
|
4
|
+
data.tar.gz: 5d9d5add0ab841a94a0537bba416d84ac0522fa5276c5a94ab287823cc20e513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '049451cad4f6f9f933bdad21eb05e408755cf35e19c35351739652744b458646b123b55438b68f0eaf46e0a844a3f271727defaff68ec21176e016bc21dd379d'
|
7
|
+
data.tar.gz: 755c890d127dd491dd542ef88f67e709ff57cb30a15aa12c97f2a5f3e466a32b1cfce808eb16b68a1dd49fb9ac955508a738aa23c89b4d468ad52d79104f5b3c
|
data/CHANGELOG.md
CHANGED
data/lib/kubernetes-cli.rb
CHANGED
@@ -242,6 +242,23 @@ class KubernetesCLI
|
|
242
242
|
end
|
243
243
|
|
244
244
|
def systemm(cmd)
|
245
|
+
if stdout == STDOUT && stderr == STDERR
|
246
|
+
systemm_default(cmd)
|
247
|
+
else
|
248
|
+
systemm_open3(cmd)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
def systemm_default(cmd)
|
253
|
+
run_before_callbacks(cmd)
|
254
|
+
cmd_s = cmd.join(' ')
|
255
|
+
system(cmd_s).tap do
|
256
|
+
self.last_status = $?
|
257
|
+
run_after_callbacks(cmd)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
def systemm_open3(cmd)
|
245
262
|
run_before_callbacks(cmd)
|
246
263
|
cmd_s = cmd.join(' ')
|
247
264
|
|
@@ -268,6 +285,23 @@ class KubernetesCLI
|
|
268
285
|
end
|
269
286
|
|
270
287
|
def backticks(cmd)
|
288
|
+
if stdout == STDOUT && stderr == STDERR
|
289
|
+
backticks_default(cmd)
|
290
|
+
else
|
291
|
+
backticks_open3(cmd)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
def backticks_default(cmd)
|
296
|
+
run_before_callbacks(cmd)
|
297
|
+
cmd_s = cmd.join(' ')
|
298
|
+
`#{cmd_s}`.tap do
|
299
|
+
self.last_status = $?
|
300
|
+
run_after_callbacks(cmd)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
def backticks_open3(cmd)
|
271
305
|
run_before_callbacks(cmd)
|
272
306
|
cmd_s = cmd.join(' ')
|
273
307
|
result = StringIO.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubernetes-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kubectl-rb
|