kube_cluster 0.5.0 → 0.5.1

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: 44ea57ea29499e0584389ac63985e948c5262430977d99abd9b8430a3165ed54
4
- data.tar.gz: a54f7491c772fceec66d557eba3317552930bca5b28f496a56e5cbd8aeefe995
3
+ metadata.gz: 98ac582a4bf128ea0f7e7274e7028552bb7bf787a989a89c9ac268c0078699f6
4
+ data.tar.gz: 1c4cd97acaef723f64e72cc4310a01300b10c764c94ba6e8a78ed1303d954c73
5
5
  SHA512:
6
- metadata.gz: d82ab28af2191fee24dc2ee6974e627fa56ce62f2dc8b1451b9e71508b2d0aebfdd65321b4102a79928c91e6a4dac3a83a81362a408d418b9cc8f199908eab01
7
- data.tar.gz: 3a9302e78a0b77acc4b8da60254d8155538624174b7a63c3e8d8ca65d14c32d7576e82eeedd8a30b4d21e162b85d7fa66e96488c7cf647a7bc85b655e888bb22
6
+ metadata.gz: ec98051bd7d01cfe1444e9b1c792736a6d009c3a63576738d3ed12b33bb7bfab0644e89570c79f5e6db366c45a7fe06d8df9a1b46b4fa8e588681581ccdfce2e
7
+ data.tar.gz: ff2c9ebf92b18291ef4f6250304d14a570f4cbf9ec4f1fce59e7a7e8e42721c7454bcfdcfff80929bd153d58f5f9a6640012dcc152c1521bc771c729a1afc535
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kube_cluster (0.5.0)
4
+ kube_cluster (0.5.1)
5
5
  kube_kubectl (~> 2.0)
6
6
  kube_schema (~> 1.4.8)
7
7
  scampi (~> 0.1)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kube
4
+ module Cluster
5
+ module ScriptCommands
6
+ def BashScript(*strings) = ['bash', '-exc', *strings]
7
+ def PythonScript(*strings) = ['python3', '-c', *strings]
8
+ def RubyScript(*strings) = ['ruby', '-e', *strings]
9
+ def ShScript(*strings) = ['sh', '-exc', *strings]
10
+ end
11
+
12
+ include ScriptCommands
13
+ module_function :BashScript, :PythonScript, :RubyScript, :ShScript
14
+ end
15
+ end
16
+
17
+ # Make script helpers available inside instance_exec blocks on Hashes.
18
+ # Without this, Hash#method_missing (autovivification) silently swallows
19
+ # calls like ShScript(...) and returns {} instead of an array.
20
+ Hash.include(Kube::Cluster::ScriptCommands)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kube
4
4
  module Cluster
5
- VERSION = "0.5.0"
5
+ VERSION = "0.5.1"
6
6
  end
7
7
  end
data/lib/kube/cluster.rb CHANGED
@@ -6,6 +6,7 @@ require "kube/schema"
6
6
 
7
7
  require_relative "../kube/errors"
8
8
  require_relative "cluster/version"
9
+ require_relative "cluster/script_commands"
9
10
  require 'kube/ctl'
10
11
  require_relative 'helm/repo'
11
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kube_cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan K
@@ -194,6 +194,7 @@ files:
194
194
  - lib/kube/cluster/resource/extensions/README.md
195
195
  - lib/kube/cluster/resource/extensions/custom_resource_definition.rb
196
196
  - lib/kube/cluster/resource/persistence.rb
197
+ - lib/kube/cluster/script_command.rb
197
198
  - lib/kube/cluster/version.rb
198
199
  - lib/kube/cluster/version.rb.erb
199
200
  - lib/kube/errors.rb