kube-dsl 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2932064fb6c82c612248313f1fd0c24cf878e8e85d54f14e19d64aa2c1a51ae1
4
- data.tar.gz: 417677a4fa12b37099a1fe650f0abf2b6a01330f09526c39a68e52bdccf06935
3
+ metadata.gz: cb88313ad58e1c157f40b21c8c6ee88b6ed522fd781f3a4565e6a9d75b4d59c0
4
+ data.tar.gz: 2d6f7e9ed3506746869b31463a1cf5c1647762e47c0e16cb6d354e668dc935ef
5
5
  SHA512:
6
- metadata.gz: 7cb08079dccbf9bd1744e535ab5db716052048a0d89b7e56986a1f5eec32a48832da9271747d6af21ed56667304f6f3258ad1f70387fee67b53ff4db48104bad
7
- data.tar.gz: 8eb398de8117dc33fe5cde6333056eda4c18f1cf0b53dd19f9face1a26c452561755327d34e0f30404d8fb1d5027938b7d92c8cbb0ae7e443bd2ce15d0bc9ffa
6
+ metadata.gz: dd4fa0c8998d5d519c6dd7989c230f8d57f6fe0bb213e8efd54c7379498f84760fa5478e51d3a796f3a241edfe4847f8b680506359227f186c2ddd713cf90673
7
+ data.tar.gz: b11c7054dc2a394e13994ab0749b839927ac59d486c4e991d136adb82ec11f57392bbbc054756e7cdfbb40f8d20012ac7ce9316a67bc614d094bccc6407834c6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.7.3
2
+ * Add feature to limit the length of filenames to 100 characters.
3
+ - 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.
4
+
5
+ ## 0.7.2
6
+ * Use tapioca for type annotations.
7
+ * Fix a couple of type annotations.
8
+
1
9
  ## 0.7.1
2
10
  * Remove dependency on the defunct sorbet-runtime-stub gem.
3
11
 
@@ -49,9 +49,18 @@ module KubeDSL
49
49
  [autoload_prefix].tap do |path|
50
50
  path << underscore(namespace) if namespace
51
51
  path << underscore(version) if version
52
- path << "#{underscore(kind)}.rb"
52
+ path << shorten("#{underscore(kind)}.rb")
53
53
  end
54
54
  )
55
55
  end
56
+
57
+ def shorten(filename)
58
+ return filename if filename.size <= 100
59
+
60
+ digest = Digest::MD5.hexdigest(filename)[0...8]
61
+ extname = File.extname(filename)
62
+
63
+ "#{filename.chomp(extname)[0...(100 - extname.size - digest.size - 1)]}_#{digest}#{extname}"
64
+ end
56
65
  end
57
66
  end
@@ -1,5 +1,5 @@
1
1
  # typed: strict
2
2
 
3
3
  module KubeDSL
4
- VERSION = '0.7.2'
4
+ VERSION = '0.7.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kube-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro