kbe 0.1.1 → 0.1.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: 9d021ed8644e29e9842d26d583b46266ee266fa669f16d6246e6551ca1825ece
4
- data.tar.gz: bef4c9899262b810c71e7e2355e72cf1ebf73c96643b2e49c87e5d577d0bb886
3
+ metadata.gz: b41c564b2cef9fbb854e0b6eb939e09a3b0b1f5338bab512edc6277b43e63a4a
4
+ data.tar.gz: 51c0936286402e79052652894ef66063c4566fc9fcc567523e6c3f1d9c313a1f
5
5
  SHA512:
6
- metadata.gz: 0e2faf39aeac63d21106069cbf9742b16bad2cada3fb46c07edfde7bf9d61285f0613b5124a08ebc0abc0cb7e570f97fcfdb3bd915b71ec323f60ac6ae37c356
7
- data.tar.gz: 80b7aa71b4a4cf1b58b8e34f5d7f8dac3198776194d8af7595aa39a377142d5596901a604c406d61627423e19ad9f7b8a4e32e7ba2d1390dd889b82256578b7e
6
+ metadata.gz: 9b71725f1da13f026212f06d70be2d3944c637035ea16dd5f2ed3b39c923bd536e3e3545920ae96b2ab07b8b241721553cba9f5e0ba0d94e229f823b6a5ac8c7
7
+ data.tar.gz: 21fc9cf08ce12599a5fb748c88013b193bf0a6a2fbb9c2fa70ab5b6e53bcba2918938cb029fc2bf7924d265906dc50e1239dd87d31c97f170cd4ac6215c664d3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kbe (0.1.1)
4
+ kbe (0.1.2)
5
5
  clamp
6
6
  colorize (~> 0.8, >= 0.8.1)
7
7
 
@@ -1,15 +1,26 @@
1
1
  # frozen_string_literal: true
2
+ require "json"
2
3
 
3
4
  module KBE
4
5
  module CLI
5
6
  class ListCommand < Clamp::Command
6
7
  option ['-h', '--help'], :flag, "help" do
7
8
  puts "kbe list"
9
+ puts "kbe list pod"
8
10
  exit 0
9
11
  end
10
12
 
13
+ parameter "[POD]", "pod"
14
+
11
15
  def execute
12
- KBE.kubectl ["get pod"]
16
+ if pod
17
+ json = JSON.parse(`kubectl get pod #{pod} -o json`)
18
+ for container in json["spec"]["containers"]
19
+ puts container["name"]
20
+ end
21
+ else
22
+ KBE.kubectl ["get pod"]
23
+ end
13
24
  end
14
25
  end
15
26
  end
data/lib/kbe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module KBE
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kbe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula