kubernetes-cli 0.3.2 → 0.5.0

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: e2b3ae42d2a905be32a61c55740bff526f43874dfd9c194391814fea0bb4d8a5
4
- data.tar.gz: 624b91b4024dbed3b29ccdd8b2537b4e5a2f65d4df72d6a05f6e5141f7bb3c1c
3
+ metadata.gz: 0707011c2436682540842704a82abf87ab93497f7195ca11603ecdd78216d2a9
4
+ data.tar.gz: 29af2ba1be9b5c483817e91b10ed410103a96bf59f32d9f03e8056d37e06e55d
5
5
  SHA512:
6
- metadata.gz: 892beee416b11f888cb91fa454bbfde2d4d9464cad77de079a9c1ccbe3c3c05ce285c24fb1e0036a00c999fb344101013cfb10e14a8aadaea95e4ca336bd0351
7
- data.tar.gz: ffbf3c1358d19e589b5763c3dbe51de8e622d1dccf9dfda05727cefc0ef3fc8fed4a037ff664a3f7e42e9a6052559e2d9f6a4dd8ca5cba8c4bf74e6e465fbe77
6
+ metadata.gz: 6d2702486be69a391fdabfd0cf1d3acce0034b5f7e59006145d4987b42699a425a6a08eae66af6abc538dc55c00d984003c4a903c96ea01a49eecf5c37e1e829
7
+ data.tar.gz: ff00655941c13e125b838c4aac18008b11b58883b204eede1e9660f25e6f7e0749a8cf063f20fe79e11fd24bf86151546d9b687bd1d81d4b879ab00ac2d989a4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.5.0
2
+ * Pass environment variables to every command.
3
+
4
+ ## 0.4.0
5
+ * Add `#version` method to get k8s client/server version info.
6
+ * Add Sorbet type definitions.
7
+ * Add tests.
8
+
1
9
  ## 0.3.2
2
10
  * Add missing require statement.
3
11
 
data/Gemfile CHANGED
@@ -6,10 +6,22 @@ gemspec
6
6
  # See: https://github.com/rubygems/rubygems/issues/3646
7
7
  gem 'kubectl-rb'
8
8
 
9
+ group :test do
10
+ gem 'rspec'
11
+ gem 'kind-rb', '~> 0.1'
12
+ gem 'kube-dsl', '~> 0.6'
13
+ end
14
+
9
15
  group :development do
10
- gem 'rake'
16
+ gem 'curdle', '~> 1.0'
17
+
18
+ # lock to same version as kuby-core
19
+ gem 'sorbet', '= 0.5.10851'
20
+ gem 'parlour', '~> 7.0'
21
+ gem 'tapioca', '~> 0.11'
11
22
  end
12
23
 
13
- group :test do
14
- gem 'rspec'
24
+ group :development, :test do
25
+ gem 'pry-byebug'
26
+ gem 'rake'
15
27
  end
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ ## kubernetes-cli
2
+
3
+ ![Unit Tests](https://github.com/getkuby/kuby-core/actions/workflows/unit_tests.yml/badge.svg?branch=master)
4
+ ![Integration Tests](https://github.com/getkuby/kuby-core/actions/workflows/integration_tests.yml/badge.svg?branch=master)
5
+
6
+ A Ruby wrapper around the Kubernetes CLI.
7
+
8
+ ### Usage
9
+
10
+ Create a new instance by passing the path to your Kube config (usually ~/.kube/config) and optionally the path to the kubectl executable (by default, the executable path comes from the [kubectl-rb gem](https://github.com/getkuby/kubectl-rb)).
11
+
12
+ ```ruby
13
+ cli = KubernetesCLI(File.join(ENV['HOME'], '.kube', 'config'))
14
+ ```
15
+
16
+ ### Available Methods
17
+
18
+ - `annotate`
19
+ - `api_resources`
20
+ - `apply`
21
+ - `apply_uri`
22
+ - `current_context`
23
+ - `delete_object`
24
+ - `delete_objects`
25
+ - `exec_cmd`
26
+ - `executable`
27
+ - `get_object`
28
+ - `get_objects`
29
+ - `kubeconfig_path`
30
+ - `last_status`
31
+ - `logtail`
32
+ - `patch_object`
33
+ - `restart_deployment`
34
+ - `run_cmd`
35
+ - `system_cmd`
36
+
37
+ Please see the source code for available options.
38
+
39
+ ## Running Tests
40
+
41
+ `bundle exec rspec` should do the trick. Requires that you have Docker installed.
42
+
43
+ ## License
44
+
45
+ Licensed under the MIT license. See LICENSE for details.
46
+
47
+ ## Authors
48
+
49
+ * Cameron C. Dutro: http://github.com/camertron
data/Rakefile CHANGED
@@ -2,9 +2,11 @@ require 'bundler'
2
2
  require 'rspec/core/rake_task'
3
3
  require 'rubygems/package_task'
4
4
 
5
+ require 'sorbet-runtime'
5
6
  require 'kubernetes-cli'
7
+ require 'curdle'
6
8
 
7
- Bundler::GemHelper.install_tasks
9
+ Curdle::Tasks.install
8
10
 
9
11
  task default: :spec
10
12
 
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
 
12
12
  s.description = s.summary = 'Ruby wrapper around the Kubernetes CLI.'
13
13
 
14
- s.add_dependency 'kubectl-rb', '~> 0.1'
14
+ s.add_dependency 'kubectl-rb', '~> 0.2'
15
15
 
16
16
  s.require_path = 'lib'
17
- s.files = Dir['{lib,spec,vendor}/**/*', 'Gemfile', 'LICENSE', 'CHANGELOG.md', 'README.md', 'Rakefile', 'kubernetes-cli.gemspec']
17
+ s.files = Dir['{lib,spec,rbi}/**/*', 'Gemfile', 'LICENSE', 'CHANGELOG.md', 'README.md', 'Rakefile', 'kubernetes-cli.gemspec']
18
18
  end
@@ -1,3 +1,5 @@
1
+ # typed: ignore
2
+
1
3
  class KubernetesCLI
2
- VERSION = '0.3.2'
4
+ VERSION = '0.5.0'.freeze
3
5
  end