kruby 1.35.0.3 → 1.35.0.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 +4 -4
- data/README.md +16 -6
- data/lib/kubernetes/api_client.rb +15 -2
- data/lib/kubernetes/release/changelog.rb +86 -0
- data/lib/kubernetes/version.rb +1 -1
- metadata +20 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3cdd7db944280966e22d2be3322abbfe98981fb18351266c16ab4c327e9afc74
|
|
4
|
+
data.tar.gz: 9923f2a3752d27a87968c409bd16247ab58ae885f594febcc4b99bd03e5b1884
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52a3459ee9ae1d8f914f57e1beceb1597cc54d32c409afaa6c474cdcbc5d8346042279ac3a721459db6f243a37ea934319381e5fe2395a4c89122d45db10e907
|
|
7
|
+
data.tar.gz: d8b4048dad3e851ca12332b53aa925dc0dfce5bd45d143615d9ce76b6b10defec8dda971f6e3371d9b8612d7c32022617cb47b4bcf9522b43a9c193c2a30c56d
|
data/README.md
CHANGED
|
@@ -7,9 +7,19 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: release-1.35
|
|
10
|
-
- Package version: 1.35.0.
|
|
10
|
+
- Package version: 1.35.0.4
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
|
|
13
|
+
## Project Origin
|
|
14
|
+
|
|
15
|
+
- Fork source: [kubernetes-client/ruby](https://github.com/kubernetes-client/ruby).
|
|
16
|
+
- This repository is a community-maintained fork and includes modifications beyond generated code (packaging, compatibility updates, and maintenance fixes).
|
|
17
|
+
|
|
18
|
+
## Release History
|
|
19
|
+
|
|
20
|
+
- User-visible release notes are tracked in the repository [CHANGELOG.md](https://github.com/doridoridoriand/kruby/blob/master/CHANGELOG.md).
|
|
21
|
+
- Release tags use the format `vX.Y.Z`, and matching GitHub Releases are published at [github.com/doridoridoriand/kruby/releases](https://github.com/doridoridoriand/kruby/releases).
|
|
22
|
+
|
|
13
23
|
## Installation
|
|
14
24
|
|
|
15
25
|
### Build a gem
|
|
@@ -23,24 +33,24 @@ gem build kubernetes.gemspec
|
|
|
23
33
|
Then either install the gem locally:
|
|
24
34
|
|
|
25
35
|
```shell
|
|
26
|
-
gem install ./kruby-1.35.0.
|
|
36
|
+
gem install ./kruby-1.35.0.4.gem
|
|
27
37
|
```
|
|
28
38
|
|
|
29
|
-
(for development, run `gem install --dev ./kruby-1.35.0.
|
|
39
|
+
(for development, run `gem install --dev ./kruby-1.35.0.4.gem` to install the development dependencies)
|
|
30
40
|
|
|
31
41
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
32
42
|
|
|
33
43
|
Finally add this to the Gemfile:
|
|
34
44
|
|
|
35
45
|
```ruby
|
|
36
|
-
gem 'kruby', '~> 1.35.0.
|
|
46
|
+
gem 'kruby', '~> 1.35.0.4'
|
|
37
47
|
```
|
|
38
48
|
|
|
39
49
|
### Install from Git
|
|
40
50
|
|
|
41
|
-
If the Ruby gem is hosted at a git repository: https://github.com/doridoridoriand/
|
|
51
|
+
If the Ruby gem is hosted at a git repository: https://github.com/doridoridoriand/kruby, then add the following in the Gemfile:
|
|
42
52
|
|
|
43
|
-
gem 'kruby', :git => 'https://github.com/doridoridoriand/
|
|
53
|
+
gem 'kruby', :git => 'https://github.com/doridoridoriand/kruby.git'
|
|
44
54
|
|
|
45
55
|
### Include the Ruby code directly
|
|
46
56
|
|
|
@@ -360,9 +360,22 @@ module Kubernetes
|
|
|
360
360
|
# @param [Object] obj object to be converted into JSON string
|
|
361
361
|
# @return [String] JSON string representation of the object
|
|
362
362
|
def object_to_hash(obj)
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
sanitize_for_serialization(obj)
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
def sanitize_for_serialization(obj)
|
|
367
|
+
case obj
|
|
368
|
+
when Array
|
|
369
|
+
obj.map { |item| sanitize_for_serialization(item) }
|
|
370
|
+
when Hash
|
|
371
|
+
obj.each_with_object({}) do |(key, value), result|
|
|
372
|
+
result[key] = sanitize_for_serialization(value)
|
|
373
|
+
end
|
|
374
|
+
when Time, Date, DateTime
|
|
375
|
+
obj.iso8601
|
|
365
376
|
else
|
|
377
|
+
return sanitize_for_serialization(obj.to_hash) if obj.respond_to?(:to_hash)
|
|
378
|
+
|
|
366
379
|
obj
|
|
367
380
|
end
|
|
368
381
|
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Kubernetes
|
|
4
|
+
module Release
|
|
5
|
+
class Changelog
|
|
6
|
+
Error = Class.new(StandardError)
|
|
7
|
+
|
|
8
|
+
SECTION_HEADER = /^## \[(?<name>[^\]]+)\](?: - (?<label>[^\n]+))?$/.freeze
|
|
9
|
+
EMPTY_UNRELEASED_PLACEHOLDER = "- Nothing yet."
|
|
10
|
+
|
|
11
|
+
attr_reader :path
|
|
12
|
+
|
|
13
|
+
def initialize(path)
|
|
14
|
+
@path = File.expand_path(path)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def include?(name)
|
|
18
|
+
entries.key?(name)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def release_notes(name)
|
|
22
|
+
entry(name).fetch(:body)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def unreleased_empty?
|
|
26
|
+
return false unless include?("Unreleased")
|
|
27
|
+
|
|
28
|
+
body = release_notes("Unreleased").strip
|
|
29
|
+
body.empty? || body == EMPTY_UNRELEASED_PLACEHOLDER
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def validate_release!(version:, tag: nil, require_empty_unreleased: false)
|
|
33
|
+
errors = []
|
|
34
|
+
|
|
35
|
+
errors << "missing Unreleased section in #{path}" unless include?("Unreleased")
|
|
36
|
+
errors << "missing CHANGELOG entry for #{version} in #{path}" unless include?(version)
|
|
37
|
+
|
|
38
|
+
expected_tag = "v#{version}"
|
|
39
|
+
if tag && tag != expected_tag
|
|
40
|
+
errors << "release tag #{tag} does not match version #{version} (expected #{expected_tag})"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
if require_empty_unreleased && !unreleased_empty?
|
|
44
|
+
errors << "Unreleased section must be empty before cutting #{expected_tag}"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
raise Error, errors.join("\n") unless errors.empty?
|
|
48
|
+
|
|
49
|
+
true
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
def entry(name)
|
|
55
|
+
entries.fetch(name) do
|
|
56
|
+
raise Error, "missing CHANGELOG entry for #{name} in #{path}"
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def entries
|
|
61
|
+
@entries ||= parse_entries
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def parse_entries
|
|
65
|
+
content = File.read(path)
|
|
66
|
+
matches = content.to_enum(:scan, SECTION_HEADER).map { Regexp.last_match }
|
|
67
|
+
|
|
68
|
+
raise Error, "no CHANGELOG sections found in #{path}" if matches.empty?
|
|
69
|
+
|
|
70
|
+
matches.each_with_index.each_with_object({}) do |(match, index), parsed|
|
|
71
|
+
name = match[:name]
|
|
72
|
+
raise Error, "duplicate CHANGELOG section #{name} in #{path}" if parsed.key?(name)
|
|
73
|
+
|
|
74
|
+
body_start = match.end(0)
|
|
75
|
+
body_end = index + 1 < matches.length ? matches[index + 1].begin(0) : content.length
|
|
76
|
+
parsed[name] = {
|
|
77
|
+
label: match[:label],
|
|
78
|
+
body: content[body_start...body_end].to_s.strip
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
rescue Errno::ENOENT => e
|
|
82
|
+
raise Error, e.message
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
data/lib/kubernetes/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.35.0.
|
|
4
|
+
version: 1.35.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- doridoridoriand
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -48,25 +48,25 @@ dependencies:
|
|
|
48
48
|
name: rspec
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
|
-
- - "~>"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '3.6'
|
|
54
51
|
- - ">="
|
|
55
52
|
- !ruby/object:Gem::Version
|
|
56
53
|
version: 3.6.0
|
|
54
|
+
- - "~>"
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '3.6'
|
|
57
57
|
type: :development
|
|
58
58
|
prerelease: false
|
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
|
-
- - "~>"
|
|
62
|
-
- !ruby/object:Gem::Version
|
|
63
|
-
version: '3.6'
|
|
64
61
|
- - ">="
|
|
65
62
|
- !ruby/object:Gem::Version
|
|
66
63
|
version: 3.6.0
|
|
64
|
+
- - "~>"
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '3.6'
|
|
67
67
|
description: Kruby is a community-maintained Ruby client generated from Kubernetes
|
|
68
68
|
OpenAPI.
|
|
69
|
-
email:
|
|
69
|
+
email:
|
|
70
70
|
executables: []
|
|
71
71
|
extensions: []
|
|
72
72
|
extra_rdoc_files: []
|
|
@@ -878,21 +878,22 @@ files:
|
|
|
878
878
|
- lib/kubernetes/models/v2beta1_api_subresource_discovery.rb
|
|
879
879
|
- lib/kubernetes/models/v2beta1_api_version_discovery.rb
|
|
880
880
|
- lib/kubernetes/models/version_info.rb
|
|
881
|
+
- lib/kubernetes/release/changelog.rb
|
|
881
882
|
- lib/kubernetes/utils.rb
|
|
882
883
|
- lib/kubernetes/version.rb
|
|
883
884
|
- lib/kubernetes/watch.rb
|
|
884
|
-
homepage: https://github.com/doridoridoriand/
|
|
885
|
+
homepage: https://github.com/doridoridoriand/kruby
|
|
885
886
|
licenses:
|
|
886
887
|
- Apache-2.0
|
|
887
888
|
metadata:
|
|
888
|
-
homepage_uri: https://github.com/doridoridoriand/
|
|
889
|
-
source_code_uri: https://github.com/doridoridoriand/
|
|
890
|
-
documentation_uri: https://github.com/doridoridoriand/
|
|
891
|
-
changelog_uri: https://github.com/doridoridoriand/
|
|
892
|
-
bug_tracker_uri: https://github.com/doridoridoriand/
|
|
889
|
+
homepage_uri: https://github.com/doridoridoriand/kruby
|
|
890
|
+
source_code_uri: https://github.com/doridoridoriand/kruby
|
|
891
|
+
documentation_uri: https://github.com/doridoridoriand/kruby#readme
|
|
892
|
+
changelog_uri: https://github.com/doridoridoriand/kruby/blob/master/CHANGELOG.md
|
|
893
|
+
bug_tracker_uri: https://github.com/doridoridoriand/kruby/issues
|
|
893
894
|
allowed_push_host: https://rubygems.org
|
|
894
895
|
rubygems_mfa_required: 'true'
|
|
895
|
-
post_install_message:
|
|
896
|
+
post_install_message:
|
|
896
897
|
rdoc_options: []
|
|
897
898
|
require_paths:
|
|
898
899
|
- lib
|
|
@@ -907,8 +908,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
907
908
|
- !ruby/object:Gem::Version
|
|
908
909
|
version: '0'
|
|
909
910
|
requirements: []
|
|
910
|
-
rubygems_version: 3.
|
|
911
|
-
signing_key:
|
|
911
|
+
rubygems_version: 3.0.3.1
|
|
912
|
+
signing_key:
|
|
912
913
|
specification_version: 4
|
|
913
914
|
summary: Kruby community client for Kubernetes API.
|
|
914
915
|
test_files: []
|