docker_rails_proxy 0.2.2 → 0.2.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5819c64cc069f6c72b3bc21c5aaeab20d328ff6d52fd55d4563f7ecb10ede4d
|
4
|
+
data.tar.gz: 5ca639cd06e1b88e618b2a877db695609e91aecfaecdb8dbc91e2ca2c735ed2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd69e7851a48e3b577a13f6514f41f750396370908118fe02f4e1fac613b6992d51c696e5dc32e7444f94cd5dc5188925b1618f078c408da7eb5611a1491f8d
|
7
|
+
data.tar.gz: 02da3a720928ffccb54bfc7331c27a72bed11c9e5c07c627ec701f08929e02c487871a2b91c0b5a7672261705271fb74d391788e766a6fae054fc160b855aa8d
|
@@ -4,6 +4,7 @@ module DockerRailsProxy
|
|
4
4
|
class Kubectl < Base
|
5
5
|
class Bash < self
|
6
6
|
UNNEEDED_ATTRIBUTES = %w[livenessProbe readinessProbe command lifecycle].freeze
|
7
|
+
ACCEPTED_STATUSES = %w[Running Failed].freeze
|
7
8
|
|
8
9
|
attr_accessor :data
|
9
10
|
|
@@ -65,12 +66,12 @@ module DockerRailsProxy
|
|
65
66
|
def cloned_pod_name
|
66
67
|
@cloned_pod_name ||= begin
|
67
68
|
pods = kubectl_output(<<-GET_PODS).split(" ")
|
68
|
-
get pods -o jsonpath='{range .items[*]}{.metadata.name},{.status.phase}{" "}{end}'
|
69
|
+
get pods -o jsonpath='{range .items[*]}{.metadata.name},{.status.phase}{" "}{end}'
|
69
70
|
GET_PODS
|
70
71
|
|
71
72
|
pods = pods.map do |values|
|
72
73
|
name, phase = values.split(',')
|
73
|
-
phase
|
74
|
+
ACCEPTED_STATUSES.include?(phase) ? name : nil
|
74
75
|
end.compact
|
75
76
|
|
76
77
|
until_get_option(pods, "Choose a pod and press [ENTER]")
|
@@ -59,12 +59,5 @@ module DockerRailsProxy
|
|
59
59
|
def secrets
|
60
60
|
execute "bash -c 'EDITOR=vim bin/rails secrets:edit'", tty: true
|
61
61
|
end
|
62
|
-
|
63
|
-
def credentials
|
64
|
-
# Temporary solution to use credentials in Rails 5.2
|
65
|
-
# Future version will use the --environment argument instead
|
66
|
-
command = "RAILS_ENV=#{args.first} EDITOR=vim bin/rails credentials:edit"
|
67
|
-
execute "bash -c '#{command}'", tty: true
|
68
|
-
end
|
69
62
|
end
|
70
63
|
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.2.
|
4
|
+
version: 0.2.3
|
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: 2021-
|
12
|
+
date: 2021-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Configures docker-compose and provides rails command helpers
|
15
15
|
email:
|