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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44f3e261b827758d975c3e51c00f9319ac280c25592fd50d5980418de7fc4a46
4
- data.tar.gz: ce69cc4e1c0a898e4baad326c14fd15baeebc18f39416157986a992a7e40596f
3
+ metadata.gz: 18cd82d1d943375c55cd910c5befc34fe42359b9c1eaa936f95a6050b7b8af28
4
+ data.tar.gz: 5d9d5add0ab841a94a0537bba416d84ac0522fa5276c5a94ab287823cc20e513
5
5
  SHA512:
6
- metadata.gz: 73a7bff727ab4a7f5b42c3b1f1b4d6fd95d2176667978fe454b308c8fc78219eacfeb451ec2bffc50b42f6e8d7d895656ab282c888b48bb9aa0c3ded65fa945d
7
- data.tar.gz: 931ebe19d76a237f4e357ec0cac817221a52ba96e53630bfd3f76c669096b50694a52dc27f70bcbc7404ece859249592b433169d795f21736970afa02c2dd3ea
6
+ metadata.gz: '049451cad4f6f9f933bdad21eb05e408755cf35e19c35351739652744b458646b123b55438b68f0eaf46e0a844a3f271727defaff68ec21176e016bc21dd379d'
7
+ data.tar.gz: 755c890d127dd491dd542ef88f67e709ff57cb30a15aa12c97f2a5f3e466a32b1cfce808eb16b68a1dd49fb9ac955508a738aa23c89b4d468ad52d79104f5b3c
@@ -1,3 +1,6 @@
1
+ ## 0.3.1
2
+ * Fix issue restricting Docker CLI output.
3
+
1
4
  ## 0.3.0
2
5
  * Add ability to redirect kubectl's stdout and stderr streams.
3
6
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  class KubernetesCLI
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2020-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kubectl-rb