kuberun 0.3.0 → 0.3.2

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: a1c64caef5ffc4e1578751e44ca133f0f608d8f3a24ca93d0a864434e1cd0add
4
- data.tar.gz: f404f4e23c941d0aa992f1d10ba4e6a3dd38fa1285210bb71f4acdff0bd4e484
3
+ metadata.gz: 7508a69c4b462a86dd673e355d57ef5aa17718ce628776d6349e5d2aa6ae0d45
4
+ data.tar.gz: 83fb7c45b506a5d09f49f9e00fc2ccc40022d906e33252691cc71e2eeb20ddaf
5
5
  SHA512:
6
- metadata.gz: 9abde70e3c0a339c4d5c3ad94c9b242c64f88a3b73c220736da21d025c6fd0a5ee287a8248dc5bcd4a68a33f47e55ba22fb85d815371c8ffdc267ea947243286
7
- data.tar.gz: 434e29139e6da16f13202735c7fd647e2828dfb82bceebf12228f780588ea36479044fd37d43b1daa5418de3c82b13c3f153fefa18907abbc3486c2f29c14015
6
+ metadata.gz: 7cce21ebd7e37b9d9044d1716207077495f3f70ebb27a6cf4e15a352795ff42a4b5c0068d1b2b923140ab6841c0a4b5a16997bc25506c081f483a276984e779c
7
+ data.tar.gz: b4a286de27d7ee4a609ca2e8deeab8316ed821ccd0c9dd05b426190864f98c88ea94cb04046b0cee0bf33be1ac6a6c361e5e828740a8290a2475f7891df3dbbd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kuberun (0.3.0)
4
+ kuberun (0.3.2)
5
5
  pastel (~> 0.8.0)
6
6
  thor (~> 1.2.1)
7
7
  tty-command (~> 0.10.1)
@@ -15,13 +15,15 @@ module Kuberun
15
15
 
16
16
  def execute(input: $stdin, output: $stdout)
17
17
  if @options['perform-auth-check']
18
- output.puts(Kuberun::Pastel.yellow('Checking access to needed commands...'))
18
+ output.print(Kuberun::Pastel.yellow('Checking access to needed commands'))
19
19
  Kuberun::Kubectl.auth_check('create', resource: 'pods')
20
20
  Kuberun::Kubectl.auth_check('exec', resource: 'pods')
21
- output.puts(Kuberun::Pastel.green('You have all permissions needed.'))
21
+
22
+ output.puts
23
+ output.puts(Kuberun::Pastel.green('You have all permissions needed'))
22
24
  end
23
25
 
24
- output.puts(Kuberun::Pastel.yellow('Searching for existing pods'))
26
+ output.print(Kuberun::Pastel.yellow('Searching for existing pods'))
25
27
  existing_pods = Kuberun::Kubectl.get(resource: 'pods', options: "-l kuberun-provisioned=true,kuberun-source=#{@deployment_name}")
26
28
  if existing_pods['items'].size > 0
27
29
  if @options['use-first-pod']
@@ -30,6 +32,7 @@ module Kuberun
30
32
  select = existing_pods['items'].map { |item| item.dig('metadata', 'name') }
31
33
  select << NEW_POD
32
34
 
35
+ output.puts
33
36
  selection = prompt.select('I found some already running pods. Do you want to use one?', select)
34
37
 
35
38
  if selection == NEW_POD
@@ -49,7 +52,7 @@ module Kuberun
49
52
  Kuberun::Pastel.green("Pod #{generated_pod_name} has been deleted!")
50
53
  end
51
54
 
52
- output.puts(Kuberun::Pastel.green('Done!'))
55
+ output.puts
53
56
  end
54
57
 
55
58
  private
@@ -65,6 +68,7 @@ module Kuberun
65
68
  pod.dig('status', 'phase') == 'Running'
66
69
  end
67
70
 
71
+ output.puts
68
72
  output.puts(Kuberun::Pastel.green('Pod is running!'))
69
73
  end
70
74
 
@@ -26,7 +26,7 @@ class Kubectl
26
26
  'use-first-pod': { type: 'boolean', default: false, desc: 'Should first existing pod be used automatically?' },
27
27
  'cleanup-pod': { type: 'boolean', default: false, desc: 'Should pod be removed after finishing?' },
28
28
  'perform-auth-check': { type: 'boolean', default: true, desc: 'Should auth check be performed?' },
29
- 'pty': { type: 'boolean', default: true, desc: 'Should PTY be used?' },
29
+ 'pty': { type: 'boolean', default: false, desc: 'Should PTY be used?' },
30
30
  }.freeze
31
31
  OPTIONS = KUBECTL_OPTIONS.merge(SCRIPT_OPTIONS).freeze
32
32
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kuberun
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuberun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kruczjak