kube-dsl 0.5.0 → 0.5.1

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: 2b49cbbb2071a035cf03ba3b5a945ac776fb3df15573875f8d5790f25335aeae
4
- data.tar.gz: bc2c169581f445a84dd1104935b6a4b89273bd52d87e4091dd0d6fca884b2d0a
3
+ metadata.gz: 739db8c0f3054804ce25cb35ea42611f2f43eea31f8dea92997d1351311696fe
4
+ data.tar.gz: 361429db242279d9916f4f1759fa946f2be35c2d3d4a783e82f6640d098d7b7e
5
5
  SHA512:
6
- metadata.gz: faae392718b9cc76a9d699c77fed71764ef503918e75b3a83e9255259c4db7bb279c0d0db377e6913c78c623dc40d6f14c73921e7d0aa951c4a1a550dc9f5dd6
7
- data.tar.gz: 61be1d7e1693604c30d6189517e23d260f6c27bfb4926ba8070dd75cb0d8a487beb877a70158801595f2c86bcbeacf7806dc5829aabedf3396692a6168ab76c1
6
+ metadata.gz: d12777c4d88d675c3f152d8ecb3cfa62fd61e4161d14752b3784f1c543e1e985bf143934b0d778de070d246bb918d8439f8f40f74d0ccf2eeb309c0e476b4892
7
+ data.tar.gz: '096d6b76c15e982072f50f3207b990b60e61ecac9add7e55387974c9885afdca9f34b5369b1cb9081b364304e90bc29a876e5d2a543a1f4f8b21b405262841a5'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.5.1
2
+ * Support Ruby 2.7
3
+ - Stop using the `RubyToken` class from irb, which doesn't exist anymore.
4
+ * Fix bug causing `NoMethodError`s if the type field contains a single string and not an array.
5
+
1
6
  ## 0.5.0
2
7
  * Recursively validate.
3
8
  * Add README.
@@ -194,7 +194,7 @@ module KubeDSL
194
194
  res.fields[name] = DefaultFieldRes.new(name, res, enum)
195
195
  else
196
196
  res.fields[name] = FieldRes.new(
197
- name, prop['type'].first, required
197
+ name, Array(prop['type']).first, required
198
198
  )
199
199
  end
200
200
 
@@ -1,5 +1,3 @@
1
- require 'irb/ruby-token'
2
-
3
1
  module KubeDSL
4
2
  class FieldRes
5
3
  include StringHelpers
@@ -1,10 +1,10 @@
1
1
  module KubeDSL
2
2
  module StringHelpers
3
- RUBY_KEYWORDS = RubyToken::TokenDefinitions
4
- .select { |definition| definition[1] == RubyToken::TkId }
5
- .map { |definition| definition[2] }
6
- .compact
7
- .freeze
3
+ RUBY_KEYWORDS = %w(
4
+ BEGIN END alias and begin break case class def defined? do else elsif
5
+ end ensure false for if in module next nil not or redo rescue retry
6
+ return self super then true undef unless until when while yield
7
+ )
8
8
 
9
9
  def capitalize(str)
10
10
  str.sub(/\A(.)/) { $1.upcase }
@@ -1,3 +1,3 @@
1
1
  module KubeDSL
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-02 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-inflector