kuber_kit 1.3.5 → 1.3.7

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: 5a002f10a60a0112f9f4e38458ad2cb740099b20bc150da35b0769079ed3ab82
4
- data.tar.gz: 7be920f4ac8c9990b2dba1376aadf6c9a740fe0f8ddad62e0fdabb7b7bf2d6b7
3
+ metadata.gz: c4b02c89909346111464af2025036789495c72da6fbe747a62c62573e0c32a58
4
+ data.tar.gz: 4ed5a201645906459a1b0a1e1bfae4761dd86448dfb7d289627635e976d60de2
5
5
  SHA512:
6
- metadata.gz: c20f225ecc8a220641a6cba7e590a446a6443675ae5802267fb035bc7c33e5f220d03b029610770d93b9214544297930d7efa5bb8dc14fb4c1a6d83bae2a3c3d
7
- data.tar.gz: 9d836b6d6240d727fb707c803a75f1350073c5b0cd423e177d3bb3fe72a4057603addcf5a26f765c148fb5660269864bbbd6714c6229eb3357082c400f98cee0
6
+ metadata.gz: c96f2d4f89480337c9792fb31fd90564eaba03dac943173bc015f7af6f344342424020d252a250ee086bf38447a9288329c57dee99c972dd2b19cf0c6a015b07
7
+ data.tar.gz: 7fda80d8191c0b8eef45ffcf955750678819607a9884e8d4ad9e92b15fce386304b28532f08b332b332817169323e47d0623df12d1733c09ab18fbff970567a1
@@ -19,7 +19,7 @@ jobs:
19
19
  runs-on: ubuntu-latest
20
20
  strategy:
21
21
  matrix:
22
- ruby-version: ['3.0', '3.1', '3.2']
22
+ ruby-version: ['3.0', '3.1', '3.2', '3.3']
23
23
 
24
24
  steps:
25
25
  - uses: actions/checkout@v2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ **1.3.7**
2
+ - Monkeypatch for TTY::Prompt so that we can sanitize the filter value
3
+ - Add ruby 3.3 support in specs
4
+ - Update helm deploy command to wait for service restart
5
+
6
+ **1.3.6**
7
+ - Remove dependency on ed25519 gem since it makes installation too complex
8
+
1
9
  **1.3.5**
2
10
  - Update git force_pull_repo command to improve performance
3
11
 
data/README.md CHANGED
@@ -19,8 +19,8 @@ Please install specific kuber_kit version, depending on Ruby version.
19
19
  | Ruby Version | KuberKit Version |
20
20
  | ------------ | ------------ |
21
21
  | 2.6 | 1.0.1 |
22
- | 2.7 | 1.1.6 |
23
- | > 3.0 | 1.3.3 |
22
+ | 2.7 | 1.1.8 |
23
+ | > 3.0 | 1.3.6 |
24
24
 
25
25
  ## Usage
26
26
 
data/kuber_kit.gemspec CHANGED
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency "cli-ui", '2.1.0'
37
37
  spec.add_dependency "net-ssh"
38
38
  spec.add_dependency "tty-prompt"
39
- spec.add_dependency 'ed25519'
40
39
 
41
40
  spec.add_development_dependency "bundler", "~> 2.2"
42
41
  spec.add_development_dependency "rake", "~> 10.0"
@@ -0,0 +1,30 @@
1
+ require "tty-prompt"
2
+
3
+ # Monkeypatch for TTY::Prompt so that we can sanitize the filter value
4
+ module TTY
5
+ class Prompt
6
+ class List
7
+ def choices(values = (not_set = true))
8
+ if not_set
9
+ if !filterable? || @filter.empty?
10
+ @choices
11
+ else
12
+ filter_value = sanitize_for_filter(@filter.join)
13
+ @filter_cache[filter_value] ||= @choices.enabled.select do |choice|
14
+ sanitize_for_filter(choice.name.to_s).include?(filter_value)
15
+ end
16
+ end
17
+ else
18
+ @filter_cache = {}
19
+ values.each { |val| @choices << val }
20
+ end
21
+ end
22
+
23
+ def sanitize_for_filter(value)
24
+ value
25
+ .downcase
26
+ .gsub(/[-_]/, '')
27
+ end
28
+ end
29
+ end
30
+ end
@@ -36,7 +36,12 @@ class KuberKit::Shell::Commands::HelmCommands
36
36
  helm_run(shell, "install #{release_name} #{chart_path}", kubeconfig_path: kubeconfig_path, namespace: namespace)
37
37
  end
38
38
 
39
- def upgrade(shell, release_name, chart_path, kubeconfig_path: nil, namespace: nil)
40
- helm_run(shell, "upgrade #{release_name} #{chart_path} --install", kubeconfig_path: kubeconfig_path, namespace: namespace)
39
+ def upgrade(shell, release_name, chart_path, kubeconfig_path: nil, namespace: nil, wait: true)
40
+ command_parts = [
41
+ "upgrade #{release_name} #{chart_path}",
42
+ "--install"
43
+ ]
44
+ command_parts << "--wait" if wait
45
+ helm_run(shell, command_parts, kubeconfig_path: kubeconfig_path, namespace: namespace)
41
46
  end
42
47
  end
@@ -1,3 +1,3 @@
1
1
  module KuberKit
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.7"
3
3
  end
data/lib/kuber_kit.rb CHANGED
@@ -4,6 +4,7 @@ require 'contracts'
4
4
  require 'dry-auto_inject'
5
5
  require 'kuber_kit/extensions/colored_string'
6
6
  require 'kuber_kit/extensions/contracts'
7
+ require 'kuber_kit/extensions/tty_prompt'
7
8
 
8
9
  $LOAD_PATH << File.join(__dir__, 'kuber_kit')
9
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuber_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Khaziev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-21 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: ed25519
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: bundler
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -339,6 +325,7 @@ files:
339
325
  - lib/kuber_kit/extensions/contracts.rb
340
326
  - lib/kuber_kit/extensions/indocker_compat.rb
341
327
  - lib/kuber_kit/extensions/inspectable.rb
328
+ - lib/kuber_kit/extensions/tty_prompt.rb
342
329
  - lib/kuber_kit/image_compiler/action_handler.rb
343
330
  - lib/kuber_kit/image_compiler/build_server_pool.rb
344
331
  - lib/kuber_kit/image_compiler/build_server_pool_factory.rb