kube-dsl 0.7.3 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -3
- 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
- data/rbi/kube-dsl.rbi +2 -2
- 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: c07145a85d3b5554f469688421d56fc64cf97a4ac9b05ee75b707abbd6ddffeb
|
4
|
+
data.tar.gz: 1cddc65cbda068182755c1259b00ea25f31a1a8409a68466ad6ff491009f9083
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f7fe3ab71ddcc48e5ae26bfa9d02244831420a70dc02f88253517cd6c7d0d242f72ea00bf9073af210dd791405bbe946fd56f5dc11b598701454efaef660192
|
7
|
+
data.tar.gz: c39e8ea014235f101d0247329a8eaf09c051e5d92a9f860b29488f9f490237ad91cb525877b60c3b1e0e4b56d33352deabfe81d0da59606796ffe008257a5f25
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.7.5
|
2
|
+
|
3
|
+
* Fix RBIs for new version of Sorbet.
|
4
|
+
|
5
|
+
## 0.7.4
|
6
|
+
* Strip type annotations during gem build using Curdle.
|
7
|
+
|
1
8
|
## 0.7.3
|
2
9
|
* Add feature to limit the length of filenames to 100 characters.
|
3
10
|
- 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
@@ -9,9 +9,10 @@ end
|
|
9
9
|
|
10
10
|
group :development do
|
11
11
|
# lock to a specific version to prevent breaking CI when new versions come out
|
12
|
-
gem 'sorbet'
|
13
|
-
gem 'tapioca', '~> 0.
|
14
|
-
gem 'parlour',
|
12
|
+
gem 'sorbet', '= 0.5.10851'
|
13
|
+
gem 'tapioca', '~> 0.11'
|
14
|
+
gem 'parlour', '~> 8.0'
|
15
|
+
gem 'curdle', '~> 1.2'
|
15
16
|
end
|
16
17
|
|
17
18
|
group :test do
|
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: KubeDSL::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, KubeDSL::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
data/rbi/kube-dsl.rbi
CHANGED
@@ -42,7 +42,7 @@ module KubeDSL
|
|
42
42
|
sig { returns(T::Hash[Symbol, String]) }
|
43
43
|
def serialize; end
|
44
44
|
|
45
|
-
sig { params(other: KeyValueFields).void }
|
45
|
+
sig { params(other: KubeDSL::KeyValueFields).void }
|
46
46
|
def merge!(other); end
|
47
47
|
|
48
48
|
sig { params(data: String).returns(String) }
|
@@ -67,7 +67,7 @@ module KubeDSL
|
|
67
67
|
sig { returns(KubeDSL::Resource) }
|
68
68
|
def to_resource; end
|
69
69
|
|
70
|
-
sig { params(obj: T.any(String, AllowBlank, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])).returns(T.nilable(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped]))) }
|
70
|
+
sig { params(obj: T.any(String, KubeDSL::AllowBlank, T::Array[T.untyped], T::Hash[T.untyped, T.untyped])).returns(T.nilable(T.any(String, T::Array[T.untyped], T::Hash[T.untyped, T.untyped]))) }
|
71
71
|
def cleanup(obj); end
|
72
72
|
end
|
73
73
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|