kube-dsl 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +1 -0
- data/Rakefile +3 -3
- data/lib/kube-dsl/dsl_object.rb +4 -4
- data/lib/kube-dsl/key_value_fields.rb +12 -12
- data/lib/kube-dsl/resource.rb +10 -10
- data/lib/kube-dsl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 317a95c1f49b4f9460c92621300cfb523182369c51f6b2dc049a9a3be5b5b71c
|
4
|
+
data.tar.gz: be508abd66a920df63db42e055da34ec9d43cceca82848dfb61e5af367ec8b1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 265b052d47f2b57acf953b28cabc544817d24f2786ac17c99fd18bbaf5eb9a3bfeaa880204a74d32602dcc086e9d702682c7240c1c373abf4f92aa4ddfe0ca09
|
7
|
+
data.tar.gz: 9af6ecdbfdff1d22b115f7fc42e000bdede2f69a8ceedeb88f3e7d5658dd937dcde6801675044b2c6a00a4b8668dff0fc31e59c0b3b944456544377b357ae00c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.7.4
|
2
|
+
* Strip type annotations during gem build using Curdle.
|
3
|
+
|
1
4
|
## 0.7.3
|
2
5
|
* Add feature to limit the length of filenames to 100 characters.
|
3
6
|
- Rubygems has a hard limit on the number of characters allowed in a filename, which I assume is actually a requirement of whatever archive format it uses.
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
require 'rspec/core/rake_task'
|
3
|
-
require '
|
3
|
+
require 'curdle'
|
4
|
+
|
5
|
+
Curdle::Tasks.install
|
4
6
|
|
5
7
|
require 'kube-dsl'
|
6
8
|
require 'pry-byebug'
|
7
9
|
|
8
|
-
Bundler::GemHelper.install_tasks
|
9
|
-
|
10
10
|
task default: :spec
|
11
11
|
|
12
12
|
desc 'Run specs'
|
data/lib/kube-dsl/dsl_object.rb
CHANGED
@@ -2,22 +2,22 @@
|
|
2
2
|
|
3
3
|
module KubeDSL
|
4
4
|
class DSLObject
|
5
|
-
extend T::Sig
|
5
|
+
# extend T::Sig
|
6
6
|
|
7
7
|
extend ::KubeDSL::ValueFields
|
8
8
|
extend ::KubeDSL::Validations
|
9
9
|
|
10
|
-
T::Sig::WithoutRuntime.sig { params(block: T.nilable(T.proc.void)).void }
|
10
|
+
# T::Sig::WithoutRuntime.sig { params(block: T.nilable(T.proc.void)).void }
|
11
11
|
def initialize(&block)
|
12
12
|
instance_eval(&block) if block
|
13
13
|
end
|
14
14
|
|
15
|
-
T::Sig::WithoutRuntime.sig { returns(::KubeDSL::Resource) }
|
15
|
+
# T::Sig::WithoutRuntime.sig { returns(::KubeDSL::Resource) }
|
16
16
|
def to_resource
|
17
17
|
::KubeDSL::Resource.new(serialize)
|
18
18
|
end
|
19
19
|
|
20
|
-
T::Sig::WithoutRuntime.sig { returns(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])) }
|
20
|
+
# T::Sig::WithoutRuntime.sig { returns(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])) }
|
21
21
|
def serialize
|
22
22
|
raise NotImplementedError, "#{__method__} must be defined in subclasses"
|
23
23
|
end
|
@@ -4,55 +4,55 @@ require 'base64'
|
|
4
4
|
|
5
5
|
module KubeDSL
|
6
6
|
class KeyValueFields
|
7
|
-
extend T::Sig
|
7
|
+
# extend T::Sig
|
8
8
|
|
9
|
-
T::Sig::WithoutRuntime.sig { returns(Symbol) }
|
9
|
+
# T::Sig::WithoutRuntime.sig { returns(Symbol) }
|
10
10
|
attr_reader :format
|
11
11
|
|
12
|
-
T::Sig::WithoutRuntime.sig { returns(T::Hash[Symbol, String]) }
|
12
|
+
# T::Sig::WithoutRuntime.sig { returns(T::Hash[Symbol, String]) }
|
13
13
|
attr_reader :kv_pairs
|
14
14
|
|
15
|
-
T::Sig::WithoutRuntime.sig { params(format: Symbol).void }
|
15
|
+
# T::Sig::WithoutRuntime.sig { params(format: Symbol).void }
|
16
16
|
def initialize(format: :string)
|
17
17
|
@format = format
|
18
|
-
@kv_pairs =
|
18
|
+
@kv_pairs = {}
|
19
19
|
end
|
20
20
|
|
21
|
-
T::Sig::WithoutRuntime.sig { params(key: Symbol, value: String).void }
|
21
|
+
# T::Sig::WithoutRuntime.sig { params(key: Symbol, value: String).void }
|
22
22
|
def add(key, value)
|
23
23
|
@kv_pairs[key] = value
|
24
24
|
end
|
25
25
|
|
26
|
-
T::Sig::WithoutRuntime.sig { params(key: Symbol).void }
|
26
|
+
# T::Sig::WithoutRuntime.sig { params(key: Symbol).void }
|
27
27
|
def remove(key)
|
28
28
|
@kv_pairs.delete(key)
|
29
29
|
end
|
30
30
|
|
31
|
-
T::Sig::WithoutRuntime.sig { params(key: Symbol).returns(T.nilable(String)) }
|
31
|
+
# T::Sig::WithoutRuntime.sig { params(key: Symbol).returns(T.nilable(String)) }
|
32
32
|
def get(key)
|
33
33
|
@kv_pairs[key]
|
34
34
|
end
|
35
35
|
|
36
|
-
T::Sig::WithoutRuntime.sig { params(key: Symbol, value: String).void }
|
36
|
+
# T::Sig::WithoutRuntime.sig { params(key: Symbol, value: String).void }
|
37
37
|
def set(key, value)
|
38
38
|
@kv_pairs[key] = value
|
39
39
|
end
|
40
40
|
|
41
|
-
T::Sig::WithoutRuntime.sig { returns(T::Hash[Symbol, String]) }
|
41
|
+
# T::Sig::WithoutRuntime.sig { returns(T::Hash[Symbol, String]) }
|
42
42
|
def serialize
|
43
43
|
@kv_pairs.each_with_object({}) do |(key, value), ret|
|
44
44
|
ret[key] = serialize_value(value)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
T::Sig::WithoutRuntime.sig { params(other: KeyValueFields).void }
|
48
|
+
# T::Sig::WithoutRuntime.sig { params(other: KeyValueFields).void }
|
49
49
|
def merge!(other)
|
50
50
|
@kv_pairs.merge!(other.instance_variable_get(:@kv_pairs))
|
51
51
|
end
|
52
52
|
|
53
53
|
private
|
54
54
|
|
55
|
-
T::Sig::WithoutRuntime.sig { params(data: String).returns(String) }
|
55
|
+
# T::Sig::WithoutRuntime.sig { params(data: String).returns(String) }
|
56
56
|
def serialize_value(data)
|
57
57
|
case format
|
58
58
|
when :byte
|
data/lib/kube-dsl/resource.rb
CHANGED
@@ -2,37 +2,37 @@
|
|
2
2
|
|
3
3
|
module KubeDSL
|
4
4
|
class Resource
|
5
|
-
extend T::Sig
|
5
|
+
# extend T::Sig
|
6
6
|
|
7
|
-
T::Sig::WithoutRuntime.sig { returns(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])) }
|
7
|
+
# T::Sig::WithoutRuntime.sig { returns(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])) }
|
8
8
|
attr_reader :contents
|
9
9
|
|
10
|
-
T::Sig::WithoutRuntime.sig { params(contents: T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])).void }
|
10
|
+
# T::Sig::WithoutRuntime.sig { params(contents: T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])).void }
|
11
11
|
def initialize(contents)
|
12
12
|
@contents = contents
|
13
13
|
end
|
14
14
|
|
15
|
-
T::Sig::WithoutRuntime.sig { returns(T.nilable(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped]))) }
|
15
|
+
# T::Sig::WithoutRuntime.sig { returns(T.nilable(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped]))) }
|
16
16
|
def serialize
|
17
17
|
cleanup(contents)
|
18
18
|
end
|
19
19
|
|
20
|
-
T::Sig::WithoutRuntime.sig { returns(String) }
|
20
|
+
# T::Sig::WithoutRuntime.sig { returns(String) }
|
21
21
|
def to_yaml
|
22
22
|
YAML.dump(serialize)
|
23
23
|
end
|
24
24
|
|
25
|
-
T::Sig::WithoutRuntime.sig { returns(KubeDSL::Resource) }
|
25
|
+
# T::Sig::WithoutRuntime.sig { returns(KubeDSL::Resource) }
|
26
26
|
def to_resource
|
27
27
|
self
|
28
28
|
end
|
29
29
|
|
30
30
|
private
|
31
31
|
|
32
|
-
T::Sig::WithoutRuntime.sig {
|
33
|
-
|
34
|
-
|
35
|
-
}
|
32
|
+
# T::Sig::WithoutRuntime.sig {
|
33
|
+
# params(obj: T.any(String, AllowBlank, T::Array[T.untyped], T::Hash[T.untyped, T.untyped]))
|
34
|
+
# .returns(T.nilable(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])))
|
35
|
+
# }
|
36
36
|
def cleanup(obj)
|
37
37
|
case obj
|
38
38
|
when Array
|
data/lib/kube-dsl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kube-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|