kube-dsl 0.7.3 → 0.7.4

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: cb88313ad58e1c157f40b21c8c6ee88b6ed522fd781f3a4565e6a9d75b4d59c0
4
- data.tar.gz: 2d6f7e9ed3506746869b31463a1cf5c1647762e47c0e16cb6d354e668dc935ef
3
+ metadata.gz: 317a95c1f49b4f9460c92621300cfb523182369c51f6b2dc049a9a3be5b5b71c
4
+ data.tar.gz: be508abd66a920df63db42e055da34ec9d43cceca82848dfb61e5af367ec8b1f
5
5
  SHA512:
6
- metadata.gz: dd4fa0c8998d5d519c6dd7989c230f8d57f6fe0bb213e8efd54c7379498f84760fa5478e51d3a796f3a241edfe4847f8b680506359227f186c2ddd713cf90673
7
- data.tar.gz: b11c7054dc2a394e13994ab0749b839927ac59d486c4e991d136adb82ec11f57392bbbc054756e7cdfbb40f8d20012ac7ce9316a67bc614d094bccc6407834c6
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
@@ -12,6 +12,7 @@ group :development do
12
12
  gem 'sorbet'
13
13
  gem 'tapioca', '~> 0.7'
14
14
  gem 'parlour', github: 'camertron/parlour', branch: 'initialize_void' # '~> 7.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 'rubygems/package_task'
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'
@@ -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 = T.let({}, T::Hash[Symbol, String])
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
@@ -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
- 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
- }
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
@@ -1,5 +1,5 @@
1
1
  # typed: strict
2
2
 
3
3
  module KubeDSL
4
- VERSION = '0.7.3'
4
+ VERSION = '0.7.4'
5
5
  end
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.3
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-06 00:00:00.000000000 Z
11
+ date: 2022-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-inflector