kettle-dev 2.2.0 → 2.2.1

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: e8a1375214aa3c53580a46da791cc0813ab2303a56bf08d32c3928bb6773425a
4
- data.tar.gz: 293ad0c152819ca21f1bf9a63cbf4f21078cff641d680ce7b955608c309d5d24
3
+ metadata.gz: dd2279063bbe1a554b16f415cbbb7c2e4ac97bb9db82b7637366a0c0e312173f
4
+ data.tar.gz: f2f7bc08a41e7082079977c49ca9a61e4053613fae9bf5dcc75aaa44dbb2ddfc
5
5
  SHA512:
6
- metadata.gz: 24dce616ec2536f3f3afd7dc6b16cffe9442aa7d81f86a25dcc2867166a10c55cc6e1285ea1e91261f4f176fc309435cd8240dca7e8eaf94bbff6efdaa0ea4c2
7
- data.tar.gz: b4fe9b7736463c18bb8e97f2c91d55257c281502b6ccfb40e51e698b5616141dac2c48d6513262b97ee810fcec1e267c31908a0d02bfbe606d21427a0684cd0e
6
+ metadata.gz: c03b4ee501ed0fc662aab42cc267cd6346b2a959cd38079a63fb81d0d0b088732d22d1376c0cf69d1899c9bde39892f35c0447ee97cea3d2972b5a2dd434845b
7
+ data.tar.gz: 71ccc03797bbd38212044c7a2a9a06af28b2e09970531741ded9c36b1c48f99510ec65113c336cdf3fe9bd8c280b32988d1b6766590dde70cf87d207509a89f0
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,20 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.2.1] - 2026-06-09
34
+
35
+ - TAG: [v2.2.1][2.2.1t]
36
+ - COVERAGE: 91.61% -- 3736/4078 lines in 28 files
37
+ - BRANCH COVERAGE: 72.78% -- 1473/2024 branches in 28 files
38
+ - 66.83% documented
39
+
40
+ ### Fixed
41
+
42
+ - `Kettle::Dev::GemSpecReader` now falls back to the migrated `kettle-dev`
43
+ GitHub organization when no forge org can be derived.
44
+ - `kettle-gha-sha-pins` now persists live ref-to-SHA lookup results in its action
45
+ cache so a dry run followed by `--write` does not repeat the same API calls.
46
+
33
47
  ## [2.2.0] - 2026-06-08
34
48
 
35
49
  - TAG: [v2.2.0][2.2.0t]
@@ -1977,7 +1991,9 @@ Please file a bug if you notice a violation of semantic versioning.
1977
1991
  - Selecting will run the selected workflow via `act`
1978
1992
  - This may move to its own gem in the future.
1979
1993
 
1980
- [Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.2.0...HEAD
1994
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.1...HEAD
1995
+ [2.2.1]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.0...v2.2.1
1996
+ [2.2.1t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.1
1981
1997
  [2.2.0]: https://github.com/kettle-rb/kettle-dev/compare/v2.1.1...v2.2.0
1982
1998
  [2.2.0t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.2.0
1983
1999
  [2.1.1]: https://github.com/kettle-rb/kettle-dev/compare/v2.1.0...v2.1.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.054-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
857
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.078-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
858
858
  [🔐security]: https://github.com/kettle-rb/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
@@ -25,7 +25,7 @@ module Kettle
25
25
  # @option return [String] :gem_name gem name ("" when not derivable)
26
26
  # @option return [Gem::Version] :min_ruby minimum Ruby version derived or DEFAULT_MINIMUM_RUBY
27
27
  # @option return [String] :homepage homepage string (may be "")
28
- # @option return [String] :gh_org GitHub org (falls back to "kettle-rb")
28
+ # @option return [String] :gh_org GitHub org (falls back to "kettle-dev")
29
29
  # @option return [String] :forge_org primary forge org (currently same as gh_org)
30
30
  # @option return [String, nil] :funding_org OpenCollective/org handle or nil when not discovered
31
31
  # @option return [String, nil] :gh_repo GitHub repo name, if discoverable
@@ -107,8 +107,8 @@ module Kettle
107
107
  forge_org = explicit_forge_org || forge_info[:forge_org]
108
108
  gh_repo = forge_info[:origin_repo]
109
109
  if forge_org.to_s.empty?
110
- Kernel.warn("kettle-dev: Could not determine forge org from spec.homepage or git remote.\n - Ensure gemspec.homepage is set to a GitHub URL or that the git remote 'origin' points to GitHub.\n - Example homepage: https://github.com/<org>/<repo>\n - Proceeding with default org: kettle-rb.")
111
- forge_org = "kettle-rb"
110
+ Kernel.warn("kettle-dev: Could not determine forge org from spec.homepage or git remote.\n - Ensure gemspec.homepage is set to a GitHub URL or that the git remote 'origin' points to GitHub.\n - Example homepage: https://github.com/<org>/<repo>\n - Proceeding with default org: kettle-dev.")
111
+ forge_org = "kettle-dev"
112
112
  end
113
113
 
114
114
  camel = lambda do |s|
@@ -957,6 +957,32 @@ module Kettle
957
957
  save!
958
958
  end
959
959
 
960
+ def ref_sha(repo_ref, ref, fresh: true)
961
+ action = action_data(repo_ref)
962
+ return nil unless action
963
+
964
+ refs = action.fetch("refs", {})
965
+ entry = refs[ref.to_s]
966
+ return nil unless entry
967
+ return nil if fresh && !fresh_entry?(entry)
968
+
969
+ sha = entry["sha"].to_s
970
+ sha.empty? ? nil : sha
971
+ end
972
+
973
+ def write_ref_sha(repo_ref, ref, sha)
974
+ return if @path.to_s.empty?
975
+ return if repo_ref.to_s.empty? || ref.to_s.empty? || sha.to_s.empty?
976
+
977
+ action = data.fetch("actions")[repo_ref] ||= {}
978
+ refs = action["refs"] ||= {}
979
+ refs[ref.to_s] = {
980
+ "sha" => sha.to_s[0, 40],
981
+ "cached_at" => @clock.call.utc.iso8601
982
+ }
983
+ save!
984
+ end
985
+
960
986
  def to_h
961
987
  data
962
988
  end
@@ -1108,10 +1134,23 @@ module Kettle
1108
1134
  cache_key = "commit:#{repo_ref}:#{ref}"
1109
1135
  return @commit_cache[cache_key] if @commit_cache.key?(cache_key)
1110
1136
 
1137
+ unless @refresh_cache
1138
+ cached = @persistent_cache&.ref_sha(repo_ref, ref, fresh: true)
1139
+ if cached
1140
+ @commit_cache[cache_key] = cached
1141
+ return cached
1142
+ end
1143
+ end
1144
+
1111
1145
  data = request_json("/repos/#{repo_ref}/commits/#{uri_encode(ref)}")
1112
1146
  sha = if data.is_a?(Hash)
1113
1147
  data.fetch("sha", "")[0, 40]
1114
1148
  end
1149
+ if sha.to_s.empty?
1150
+ sha = @persistent_cache&.ref_sha(repo_ref, ref, fresh: false)
1151
+ else
1152
+ @persistent_cache&.write_ref_sha(repo_ref, ref, sha)
1153
+ end
1115
1154
  @commit_cache[cache_key] = sha
1116
1155
  sha
1117
1156
  end
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Dev
5
5
  module Version
6
- VERSION = "2.2.0"
6
+ VERSION = "2.2.1"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
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.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -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-rb/kettle-dev/tree/v2.2.0
342
- changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v2.2.0/CHANGELOG.md
341
+ source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v2.2.1
342
+ changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v2.2.1/CHANGELOG.md
343
343
  bug_tracker_uri: https://github.com/kettle-rb/kettle-dev/issues
344
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.0
344
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.1
345
345
  funding_uri: https://github.com/sponsors/pboling
346
346
  wiki_uri: https://github.com/kettle-rb/kettle-dev/wiki
347
347
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file