kettle-dev 2.2.3 → 2.2.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: fa3fa8282c2b534ba8d14a5ff998db809e15c577e3e7b65bd7592c7bd8e568d7
4
- data.tar.gz: ffa804162693d265c3a250d39f37324806d00a44676c50ca35c0a12cbecce771
3
+ metadata.gz: e1c6a0d6e39d7d8fe607a9b19f147ef63a32a24bae13abfe0fe29e1d63d5850b
4
+ data.tar.gz: 6fbe922eb16885678ce44cbb55c6caef1c71cc3053a6e7d7624fa0b6c3ecd72a
5
5
  SHA512:
6
- metadata.gz: cfffdbc293252d77553ba59d5e9179121c7b537ae676a1380c38a8a7af30b85266e1f07487f0368fd61671cee3a0324b2889537fbe89780225a54c8c6287c10e
7
- data.tar.gz: 9e59b4fc95c59873b928adaa4a4ff75bab63247e60e5fbb8c39b8f6ef9cb7aad0f433efaa957dab32ec8c18a64cab5be63a7cd697566ef93590859821cb81b63
6
+ metadata.gz: 31f868d8ea6bf2b83cc8aab8b56f52726dd96cea08ddf49d38aacab0ac6e7712e69a7d3f9944946ed575a9246c3e0c4b00756ed512dd5d124a0abfdff342f4de
7
+ data.tar.gz: a7a5d8b99c80b173e97f014029f1972ee74190d7fa4ae97a8bc468606e80d0e87625838312b62fa8a69f2d16ff373c11bb4bc10e73a5cf0872da3287bba69ad7
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,26 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.2.4] - 2026-06-12
34
+
35
+ - TAG: [v2.2.4][2.2.4t]
36
+ - COVERAGE: 92.18% -- 3806/4129 lines in 28 files
37
+ - BRANCH COVERAGE: 73.26% -- 1507/2057 branches in 28 files
38
+ - 67.00% documented
39
+
40
+ ### Changed
41
+
42
+ - Retemplated generated project files with the current `kettle-jem` template,
43
+ refreshing development dependency floors, binstubs, README metadata, and RBS
44
+ validation workflow output.
45
+
46
+ ### Fixed
47
+
48
+ - `kettle-gha-sha-pins --upgrade` no longer downgrades action pins when the
49
+ current SHA matches a newer version-like tag that is a prerelease or lacks a
50
+ GitHub Release, including transferred action repositories that require GitHub
51
+ API redirects.
52
+
33
53
  ## [2.2.3] - 2026-06-09
34
54
 
35
55
  - TAG: [v2.2.3][2.2.3t]
@@ -2022,7 +2042,9 @@ Please file a bug if you notice a violation of semantic versioning.
2022
2042
  - Selecting will run the selected workflow via `act`
2023
2043
  - This may move to its own gem in the future.
2024
2044
 
2025
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.3...HEAD
2045
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.4...HEAD
2046
+ [2.2.4]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.3...v2.2.4
2047
+ [2.2.4t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.4
2026
2048
  [2.2.3]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.2...v2.2.3
2027
2049
  [2.2.3t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.3
2028
2050
  [2.2.2]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.1...v2.2.2
data/README.md CHANGED
@@ -854,7 +854,7 @@ Thanks for RTFM. ☺️
854
854
  [📌gitmoji]: https://gitmoji.dev
855
855
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
856
856
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
857
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.100-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
857
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.129-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
858
858
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
859
859
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
860
860
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -882,7 +882,7 @@ Thanks for RTFM. ☺️
882
882
  | Package | kettle-dev |
883
883
  | Description | 🍲 Kettle::Dev is a meta tool from kettle-rb to streamline development and testing. Acts as a shim dependency, pulling in many other dependencies, to give you OOTB productivity with a RubyGem, or Ruby app project. Configures a complete set of Rake tasks, for all the libraries is brings in, so they arrive ready to go. Fund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev |
884
884
  | Homepage | https://github.com/kettle-dev/kettle-dev |
885
- | Source | https://github.com/kettle-dev/kettle-dev/tree/v2.2.1 |
885
+ | Source | https://github.com/kettle-dev/kettle-dev/tree/v2.2.3 |
886
886
  | License | `AGPL-3.0-only` |
887
887
  | Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/kettle-dev, https://opencollective.com/kettle-rb, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/kettle-dev, https://www.buymeacoffee.com/pboling |
888
888
  <!-- kettle-jem:metadata:end -->
@@ -508,6 +508,7 @@ module Kettle
508
508
  candidates = versions.select do |entry|
509
509
  next false unless entry[:version_obj].is_a?(Gem::Version)
510
510
  next false unless entry[:version_obj] > current
511
+ next false if entry[:version_obj].prerelease? && !current.prerelease?
511
512
 
512
513
  case level
513
514
  when "patch"
@@ -527,7 +528,11 @@ module Kettle
527
528
  return nil if current.nil?
528
529
 
529
530
  versions
530
- .select { |entry| entry[:version_obj].is_a?(Gem::Version) && entry[:version_obj] > current }
531
+ .select do |entry|
532
+ entry[:version_obj].is_a?(Gem::Version) &&
533
+ entry[:version_obj] > current &&
534
+ (!entry[:version_obj].prerelease? || current.prerelease?)
535
+ end
531
536
  .max_by { |entry| entry[:version_obj] }
532
537
  end
533
538
 
@@ -902,7 +907,7 @@ module Kettle
902
907
 
903
908
  # Persistent cache of GitHub Action release versions and target SHAs.
904
909
  class PersistentActionCache
905
- VERSION = 1
910
+ VERSION = 2
906
911
 
907
912
  def self.default_path
908
913
  state_home = ENV["XDG_STATE_HOME"]
@@ -1008,6 +1013,7 @@ module Kettle
1008
1013
  JSON.parse(File.read(@path))
1009
1014
  end
1010
1015
  return empty_data unless parsed.is_a?(Hash)
1016
+ return empty_data unless parsed["version"].to_i == VERSION
1011
1017
 
1012
1018
  parsed["version"] ||= VERSION
1013
1019
  parsed["actions"] = {} unless parsed["actions"].is_a?(Hash)
@@ -1113,7 +1119,6 @@ module Kettle
1113
1119
  tag_shas = tag_ref_shas(repo_ref)
1114
1120
  releases = data.filter_map do |release|
1115
1121
  next unless release.is_a?(Hash)
1116
- next if release["prerelease"] == true
1117
1122
 
1118
1123
  tag = release["tag_name"].to_s
1119
1124
  parsed = parse_release_version_text(tag)
@@ -1126,6 +1131,21 @@ module Kettle
1126
1131
  sha: tag_shas[tag]
1127
1132
  }
1128
1133
  end
1134
+ released_tags = releases.each_with_object({}) { |release, memo| memo[release[:tag]] = true }
1135
+ tag_versions = tag_shas.filter_map do |tag, sha|
1136
+ next if released_tags[tag]
1137
+
1138
+ parsed = parse_release_version_text(tag)
1139
+ next unless parsed
1140
+
1141
+ {
1142
+ tag: tag,
1143
+ version_obj: parsed,
1144
+ version: parsed.to_s,
1145
+ sha: sha
1146
+ }
1147
+ end
1148
+ releases.concat(tag_versions)
1129
1149
 
1130
1150
  releases.sort_by! { |release| release[:version_obj] }
1131
1151
  releases.reverse!
@@ -1190,20 +1210,53 @@ module Kettle
1190
1210
  object = entry["object"]
1191
1211
  next unless object.is_a?(Hash)
1192
1212
 
1193
- memo[tag] = object["sha"].to_s[0, 40] if object["type"] == "commit"
1213
+ sha = object["sha"].to_s[0, 40]
1214
+ case object["type"]
1215
+ when "commit"
1216
+ memo[tag] = sha
1217
+ when "tag"
1218
+ dereferenced_sha = annotated_tag_commit_sha(repo_ref, sha)
1219
+ memo[tag] = dereferenced_sha if dereferenced_sha
1220
+ end
1194
1221
  end
1195
1222
  end
1196
1223
 
1197
- def request_json(path)
1224
+ def annotated_tag_commit_sha(repo_ref, tag_sha)
1225
+ return nil if tag_sha.to_s.empty?
1226
+
1227
+ data = request_json("/repos/#{repo_ref}/git/tags/#{tag_sha}")
1228
+ return nil unless data.is_a?(Hash)
1229
+
1230
+ object = data["object"]
1231
+ return nil unless object.is_a?(Hash)
1232
+ return nil unless object["type"] == "commit"
1233
+
1234
+ object["sha"].to_s[0, 40]
1235
+ end
1236
+
1237
+ def request_json(path, redirects: 3)
1198
1238
  uri = URI.join(@api_base + "/", path)
1199
- request = Net::HTTP::Get.new(uri)
1200
- request["Accept"] = "application/vnd.github+json"
1201
- request["User-Agent"] = @user_agent
1202
- request["X-GitHub-Api-Version"] = "2022-11-28"
1203
- request["Authorization"] = "Bearer #{@token}" if @token && !@token.empty?
1204
-
1205
- response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
1206
- http.request(request)
1239
+
1240
+ response = nil
1241
+ loop do
1242
+ request = Net::HTTP::Get.new(uri)
1243
+ request["Accept"] = "application/vnd.github+json"
1244
+ request["User-Agent"] = @user_agent
1245
+ request["X-GitHub-Api-Version"] = "2022-11-28"
1246
+ request["Authorization"] = "Bearer #{@token}" if @token && !@token.empty?
1247
+
1248
+ response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
1249
+ http.request(request)
1250
+ end
1251
+
1252
+ break unless response.code.to_i.between?(300, 399)
1253
+ redirects -= 1
1254
+ return nil if redirects.negative?
1255
+
1256
+ location = response["location"].to_s
1257
+ return nil if location.empty?
1258
+
1259
+ uri = URI.join(uri.to_s, location)
1207
1260
  end
1208
1261
 
1209
1262
  return nil unless response.code.to_i == 200
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Dev
5
5
  module Version
6
- VERSION = "2.2.3"
6
+ VERSION = "2.2.4"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
data/sig/kettle/dev.rbs CHANGED
@@ -1,7 +1,6 @@
1
1
  module Kettle
2
2
  module Dev
3
3
  module Version
4
- VERSION: String
5
4
  end
6
5
 
7
6
  class Error < ::StandardError
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: '3.1'
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: 3.1.1
137
+ version: 3.1.2
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
@@ -144,7 +144,7 @@ dependencies:
144
144
  version: '3.1'
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: 3.1.1
147
+ version: 3.1.2
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: turbo_tests2
150
150
  requirement: !ruby/object:Gem::Requirement
@@ -338,10 +338,10 @@ licenses:
338
338
  - AGPL-3.0-only
339
339
  metadata:
340
340
  homepage_uri: https://kettle-dev.galtzo.com
341
- source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.3
342
- changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.3/CHANGELOG.md
341
+ source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.4
342
+ changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.4/CHANGELOG.md
343
343
  bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
344
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.3
344
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.4
345
345
  funding_uri: https://github.com/sponsors/pboling
346
346
  wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
347
347
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file