kubecontrol 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/kubecontrol/client.rb +1 -1
- data/lib/kubecontrol/pod.rb +1 -1
- data/lib/kubecontrol/version.rb +1 -1
- data/spec/kubecontrol/pod_spec.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14b4e86b403c443d36e72fbca50d3cfeef2d52d10a6ac31ecb94fc2369f913bc
|
4
|
+
data.tar.gz: b182ddd30d09958107086280311400eed3defc49516af9679e402bd3c4c1694d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2287557dc4d48bda13f633667b6f27a8702cf55a27caf50e27ae480278c5dcef5c1f25fe32c41dcabe15a107dedb7ba37f5b94bf2cd3db738069c7f7b6d810de
|
7
|
+
data.tar.gz: b5d93d17773fa35b9225edbd395f1c2d97178bc78e6e52ce66b8e347b135ffccefa9d9c96e6c030018434b0227b7f0f34c64e10f9432140c40256f3ca71c34f4
|
data/Gemfile.lock
CHANGED
data/lib/kubecontrol/client.rb
CHANGED
@@ -18,7 +18,7 @@ module Kubecontrol
|
|
18
18
|
pods_array = get_pods_result.split
|
19
19
|
pods_array.shift 5 # remove output table headers
|
20
20
|
pods_array.each_slice(5).map do |pod_data|
|
21
|
-
Pod.new(*pod_data, namespace
|
21
|
+
Pod.new(*pod_data, namespace, self)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
data/lib/kubecontrol/pod.rb
CHANGED
@@ -4,7 +4,7 @@ module Kubecontrol
|
|
4
4
|
|
5
5
|
attr_reader :name, :ready, :status, :restarts, :age, :namespace, :client
|
6
6
|
|
7
|
-
def initialize(name, ready, status, restarts, age, namespace
|
7
|
+
def initialize(name, ready, status, restarts, age, namespace, client)
|
8
8
|
@name = name
|
9
9
|
@ready = ready
|
10
10
|
@status = status
|
data/lib/kubecontrol/version.rb
CHANGED
@@ -10,7 +10,7 @@ RSpec.describe Kubecontrol::Pod do
|
|
10
10
|
let(:client) { Kubecontrol::Client.new }
|
11
11
|
|
12
12
|
describe '#initialize' do
|
13
|
-
subject { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age, namespace
|
13
|
+
subject { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age, namespace, client) }
|
14
14
|
|
15
15
|
it 'sets the pod name field' do
|
16
16
|
expect(subject.name).to eq pod_name
|
@@ -42,7 +42,7 @@ RSpec.describe Kubecontrol::Pod do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
describe '#running?' do
|
45
|
-
subject { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age).running? }
|
45
|
+
subject { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age, namespace, client).running? }
|
46
46
|
|
47
47
|
context 'is running' do
|
48
48
|
it { is_expected.to eq true }
|
@@ -56,7 +56,7 @@ RSpec.describe Kubecontrol::Pod do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
describe '#stopped?' do
|
59
|
-
subject { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age).stopped? }
|
59
|
+
subject { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age, namespace, client).stopped? }
|
60
60
|
|
61
61
|
context 'is running' do
|
62
62
|
it { is_expected.to eq false }
|
@@ -76,7 +76,7 @@ RSpec.describe Kubecontrol::Pod do
|
|
76
76
|
let(:std_err) { '' }
|
77
77
|
let(:status_code) { 0 }
|
78
78
|
let(:kubectl_command_response) { [std_out, std_err, status_code] }
|
79
|
-
let(:pod) { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age, namespace
|
79
|
+
let(:pod) { Kubecontrol::Pod.new(pod_name, pod_ready, pod_status, pod_restarts, pod_age, namespace, client) }
|
80
80
|
|
81
81
|
subject { pod.exec(command) }
|
82
82
|
|