docker_rails_proxy 0.1.6 → 0.1.7
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/lib/docker_rails_proxy/commands/kubectl/bash.rb +11 -4
- data/lib/docker_rails_proxy/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: b9b3b25d46ab93efcfe8301c759bc45e0908183af40a8fa90c3f12fe7c5f889f
|
4
|
+
data.tar.gz: 1519b485518a1cf17b2f4dfe2fcc41ed243cca5ab2a1f4135a80a2514cf4862a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca599ca5b7afe6e5862e11e80244ca42900772eb7376b6bb600fc9f6018b3ce270076b9ef6209c05a8a5fba3f6647adfa9cfa3a4e7cddc5050d5d642eba47528
|
7
|
+
data.tar.gz: c306ef28db56be3fdd223b62b67affebe4a54e6be809ef6c8b4084c9a4689485edddccd2e16fd65eda32fadd2075fdef8704673057fcf68faad80750d12f34fd
|
@@ -7,7 +7,7 @@ module DockerRailsProxy
|
|
7
7
|
attr_accessor :data
|
8
8
|
|
9
9
|
before_process do
|
10
|
-
self.data = JSON.parse kubectl_output("get #{pod} -o json")
|
10
|
+
self.data = JSON.parse kubectl_output("get pod #{pod} -o json")
|
11
11
|
end
|
12
12
|
|
13
13
|
def process
|
@@ -15,7 +15,6 @@ module DockerRailsProxy
|
|
15
15
|
container.delete attr
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
18
|
overrides = {
|
20
19
|
metadata: {
|
21
20
|
annotations: {
|
@@ -45,7 +44,7 @@ module DockerRailsProxy
|
|
45
44
|
}
|
46
45
|
}
|
47
46
|
|
48
|
-
pod_name = "#{container['name']}-bash-#{Time.now.
|
47
|
+
pod_name = "#{container['name']}-bash-#{Time.now.strftime '%Y%m%d%H%M%S'}"
|
49
48
|
puts "Starting #{pod_name} pod ..."
|
50
49
|
|
51
50
|
kubectl <<-EOS
|
@@ -60,7 +59,15 @@ module DockerRailsProxy
|
|
60
59
|
|
61
60
|
def pod
|
62
61
|
@pod_name ||= begin
|
63
|
-
pods = kubectl_output(
|
62
|
+
pods = kubectl_output(<<-EOS).split(" ")
|
63
|
+
get pods -o jsonpath='{range .items[*]}{.metadata.name},{.status.phase}{" "}{end}'}
|
64
|
+
EOS
|
65
|
+
|
66
|
+
pods = pods.map do |values|
|
67
|
+
name, phase = values.split(',')
|
68
|
+
phase == 'Running' ? name : nil
|
69
|
+
end.compact
|
70
|
+
|
64
71
|
until_get_option pods, "Choose a pod and press [ENTER]"
|
65
72
|
end
|
66
73
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_rails_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jairo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Configures docker-compose and provides rails command helpers
|
15
15
|
email:
|