kettle-dev 2.2.2 → 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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +37 -1
- data/README.md +2 -2
- data/lib/kettle/dev/gha_sha_pins_cli.rb +66 -13
- data/lib/kettle/dev/pre_release_cli.rb +43 -8
- data/lib/kettle/dev/version.rb +1 -1
- data/sig/kettle/dev.rbs +0 -1
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e1c6a0d6e39d7d8fe607a9b19f147ef63a32a24bae13abfe0fe29e1d63d5850b
|
|
4
|
+
data.tar.gz: 6fbe922eb16885678ce44cbb55c6caef1c71cc3053a6e7d7624fa0b6c3ecd72a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31f868d8ea6bf2b83cc8aab8b56f52726dd96cea08ddf49d38aacab0ac6e7712e69a7d3f9944946ed575a9246c3e0c4b00756ed512dd5d124a0abfdff342f4de
|
|
7
|
+
data.tar.gz: a7a5d8b99c80b173e97f014029f1972ee74190d7fa4ae97a8bc468606e80d0e87625838312b62fa8a69f2d16ff373c11bb4bc10e73a5cf0872da3287bba69ad7
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,38 @@ 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
|
+
|
|
53
|
+
## [2.2.3] - 2026-06-09
|
|
54
|
+
|
|
55
|
+
- TAG: [v2.2.3][2.2.3t]
|
|
56
|
+
- COVERAGE: 91.76% -- 3762/4100 lines in 28 files
|
|
57
|
+
- BRANCH COVERAGE: 72.91% -- 1483/2034 branches in 28 files
|
|
58
|
+
- 67.00% documented
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- `kettle-pre-release` Markdown image checks now inspect project Markdown files
|
|
63
|
+
instead of recursive scratch output such as `tmp/template_test`.
|
|
64
|
+
|
|
33
65
|
## [2.2.2] - 2026-06-09
|
|
34
66
|
|
|
35
67
|
- TAG: [v2.2.2][2.2.2t]
|
|
@@ -2010,7 +2042,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
2010
2042
|
- Selecting will run the selected workflow via `act`
|
|
2011
2043
|
- This may move to its own gem in the future.
|
|
2012
2044
|
|
|
2013
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.
|
|
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
|
|
2048
|
+
[2.2.3]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.2...v2.2.3
|
|
2049
|
+
[2.2.3t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.3
|
|
2014
2050
|
[2.2.2]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.1...v2.2.2
|
|
2015
2051
|
[2.2.2t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.2
|
|
2016
2052
|
[2.2.1]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.0...v2.2.1
|
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.
|
|
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.
|
|
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
|
|
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 =
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
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
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "optparse"
|
|
4
|
+
require "English"
|
|
4
5
|
require "uri"
|
|
5
6
|
require "net/http"
|
|
6
7
|
require "openssl"
|
|
@@ -96,6 +97,11 @@ module Kettle
|
|
|
96
97
|
module Markdown
|
|
97
98
|
module_function
|
|
98
99
|
|
|
100
|
+
SCRATCH_PATH_PREFIXES = %w[
|
|
101
|
+
tmp/
|
|
102
|
+
.git/
|
|
103
|
+
].freeze
|
|
104
|
+
|
|
99
105
|
# Extract unique remote HTTP(S) image URLs from markdown or HTML images.
|
|
100
106
|
# @param text [String]
|
|
101
107
|
# @return [Array<String>]
|
|
@@ -125,11 +131,43 @@ module Kettle
|
|
|
125
131
|
urls.uniq
|
|
126
132
|
end
|
|
127
133
|
|
|
134
|
+
# Find Markdown files that are part of the releasable project.
|
|
135
|
+
# @return [Array<String>]
|
|
136
|
+
def project_markdown_files
|
|
137
|
+
files = tracked_markdown_files
|
|
138
|
+
return files unless files.empty?
|
|
139
|
+
|
|
140
|
+
Dir.glob(["**/*.md", "**/*.md.example"], File::FNM_DOTMATCH).reject { |path| scratch_path?(path) }.sort
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @return [Array<String>]
|
|
144
|
+
def tracked_markdown_files
|
|
145
|
+
output = IO.popen(["git", "ls-files", "-z", "--", "*.md", "*.md.example"], err: File::NULL, &:read)
|
|
146
|
+
return [] unless $CHILD_STATUS.success?
|
|
147
|
+
|
|
148
|
+
output.split("\0").reject { |path| scratch_path?(path) }.sort
|
|
149
|
+
rescue Errno::ENOENT
|
|
150
|
+
[]
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# @param path [String]
|
|
154
|
+
# @return [Boolean]
|
|
155
|
+
def scratch_path?(path)
|
|
156
|
+
SCRATCH_PATH_PREFIXES.any? { |prefix| path.start_with?(prefix) }
|
|
157
|
+
end
|
|
158
|
+
|
|
128
159
|
# Extract from files matching glob.
|
|
129
|
-
# @param glob_pattern [String]
|
|
160
|
+
# @param glob_pattern [String, Array<String>]
|
|
130
161
|
# @return [Array<String>]
|
|
131
|
-
def extract_image_urls_from_files(glob_pattern =
|
|
132
|
-
files =
|
|
162
|
+
def extract_image_urls_from_files(glob_pattern = nil)
|
|
163
|
+
files =
|
|
164
|
+
if glob_pattern.nil?
|
|
165
|
+
project_markdown_files
|
|
166
|
+
elsif glob_pattern.is_a?(String)
|
|
167
|
+
Dir.glob(glob_pattern)
|
|
168
|
+
else
|
|
169
|
+
Array(glob_pattern)
|
|
170
|
+
end
|
|
133
171
|
urls = files.flat_map do |f|
|
|
134
172
|
begin
|
|
135
173
|
extract_image_urls_from_text(File.read(f))
|
|
@@ -183,7 +221,7 @@ module Kettle
|
|
|
183
221
|
# @return [void]
|
|
184
222
|
def check_markdown_uri_normalization!
|
|
185
223
|
puts "[kettle-pre-release] Check 2: Normalize Markdown image URLs"
|
|
186
|
-
files =
|
|
224
|
+
files = Markdown.project_markdown_files
|
|
187
225
|
changed = []
|
|
188
226
|
total_candidates = 0
|
|
189
227
|
|
|
@@ -232,10 +270,7 @@ module Kettle
|
|
|
232
270
|
# @return [void]
|
|
233
271
|
def check_markdown_images_http!
|
|
234
272
|
puts "[kettle-pre-release] Check 3: Validate Markdown image links (HTTP HEAD)"
|
|
235
|
-
urls =
|
|
236
|
-
Markdown.extract_image_urls_from_files("**/*.md"),
|
|
237
|
-
Markdown.extract_image_urls_from_files("**/*.md.example")
|
|
238
|
-
].flatten.uniq
|
|
273
|
+
urls = Markdown.extract_image_urls_from_files
|
|
239
274
|
puts "[kettle-pre-release] Found #{urls.size} unique image URL(s)."
|
|
240
275
|
failures = []
|
|
241
276
|
urls.each do |url|
|
data/lib/kettle/dev/version.rb
CHANGED
data/sig/kettle/dev.rbs
CHANGED
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.
|
|
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.
|
|
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.
|
|
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.
|
|
342
|
-
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.
|
|
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.
|
|
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
|