mina-kubernetes 3.1.0 → 3.1.2

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: e4803de1f3f3decf1da5772d6ac1a9cbaa20810e722fc273e981071f57b219b7
4
- data.tar.gz: 5b011e4604e76d94866888c5ab3676b740237d4cb5becf04e2a24f857c144960
3
+ metadata.gz: 988d02853b622363b05dafe78b55d4e1426d2c1be6230db242f2d673502cfe47
4
+ data.tar.gz: 3f735b23268764fb8543d88f0e7d6f2a35038dcf6415d5ded7b005ff17b6f100
5
5
  SHA512:
6
- metadata.gz: 32284456c631a418eae7c04feca2d3ce5b059095012af00c90e5fd291002844f68aafdf919a6c435afb7c29ddc05c7f0c0f6527e71de0bfc945c43c13cf32bc6
7
- data.tar.gz: c468d84b45f08bddad72937500f8e7054c87b5ee1d14dbc8b7d7ae903c96ae900330e6063b3f8250ba2bb1849bbe8debde463565d741db5bd31c155ad33b43b5
6
+ metadata.gz: f1a73d1104ed840f91f20f78ad17d0a25aaf67abb4dcc33592fca0f9fcbe315b864c57541a4bc498519c7c4eae17169ab27d6803d0d56b92e49a9ef82d9c7f5f
7
+ data.tar.gz: 752b9921c9aa90bdf4b2d53a01ee30c5c6fa3ceca0e071df90154e00910106d048ef5380168e283fb7291774796dc862820f50a473533bc28541e2c5ddceec96
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Kubernetes
3
- VERSION = "3.1.0"
3
+ VERSION = "3.1.2"
4
4
  end
5
5
  end
@@ -93,11 +93,15 @@ def run_command(command, env_hash = {})
93
93
  env = env_hash.collect{|k,v| "--env #{k}=#{v}" }.join(" ")
94
94
  proxy_env = "HTTPS_PROXY=#{fetch(:proxy)}" if fetch(:proxy)
95
95
 
96
- default_pod_name = "#{`whoami`.strip}-#{command}-#{fetch(:branch)}".downcase.gsub(" ", "-").gsub(":", "-")
96
+ default_pod_name =
97
+ "#{`whoami`.strip}-#{command}-#{fetch(:branch)}"
98
+ .downcase
99
+ .gsub(/[ :.]/, "-")
100
+
97
101
  pod_name = TTY::Prompt.new.ask("What name for the pod?", :value => default_pod_name)
98
102
 
99
103
  run :local do
100
- comment "Lauching pod #{color(pod_name, 36)} to run #{color(command, 36)}"
104
+ comment "Launching pod #{color(pod_name, 36)} to run #{color(command, 36)}"
101
105
  end
102
106
 
103
107
  pod_run_command = "#{proxy_env} kubectl run #{pod_name} --rm -i --tty --restart=Never --overrides='#{fetch(:kubectl_pod_overrides)}' --context=#{fetch(:kubernetes_context)} --namespace=#{fetch(:namespace)} --image #{fetch(:image_repo)}:#{fetch(:image_tag)} #{env}"
@@ -115,12 +119,12 @@ def run_command(command, env_hash = {})
115
119
  "Keep it and start one with a different name" => :other,
116
120
  }
117
121
  )
118
-
122
+
119
123
  delete_command = "#{proxy_env} kubectl delete pod #{pod_name} --context=#{fetch(:kubernetes_context)} --namespace=#{fetch(:namespace)}"
120
-
124
+
121
125
  case choice
122
126
  when :attach
123
- attach_command = "#{proxy_env} kubectl attach #{pod_name} -i --tty -c #{pod_name} --context=#{fetch(:kubernetes_context)} --namespace=#{fetch(:namespace)}"
127
+ attach_command = "#{proxy_env} kubectl attach #{pod_name} -i --tty -c console --context=#{fetch(:kubernetes_context)} --namespace=#{fetch(:namespace)}"
124
128
  system "#{attach_command} && #{delete_command}"
125
129
  when :replace
126
130
  system delete_command
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-kubernetes
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Sabourin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2025-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.2.15
144
+ rubygems_version: 3.5.11
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Mina plugin to streamline deployment of resources to Kubernetes cluster