docker_rails_proxy 0.2.2 → 0.2.3

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: ae5d5d91a039ef092adc00a8db6eb756fcbd78aea7611e196756e65b380afbbf
4
- data.tar.gz: 663176e65bb9191158d0d5f7e14a093ff84b4488b320e4288f84f64f9590f477
3
+ metadata.gz: a5819c64cc069f6c72b3bc21c5aaeab20d328ff6d52fd55d4563f7ecb10ede4d
4
+ data.tar.gz: 5ca639cd06e1b88e618b2a877db695609e91aecfaecdb8dbc91e2ca2c735ed2e
5
5
  SHA512:
6
- metadata.gz: ec0de94902d179d64600aa9fc9b85dbcdfc90bb83723aeda234097a52807618d20ce8f5cd2f14f489e061e3d6af5d3ef769ccc6afa1ef08e80579e2399129f41
7
- data.tar.gz: e6980a241df9128b95d7cd1822a4c239763512806e98a6180c82227b5adc4e5de6e6fcc11bd9ca449566d11f144418f52b83deebd532689f865fef03a7ce9798
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 == 'Running' ? name : nil
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
@@ -1,3 +1,3 @@
1
1
  module DockerRailsProxy
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  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.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-08-24 00:00:00.000000000 Z
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: