kettle-gha-pins 0.3.6 → 0.3.7

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: b985aaa740f2f6f46ff9c0e71c7b51cc69cb23b2a1e8786258c46c34ee08be2e
4
- data.tar.gz: 5a9c0fe7c26efe095e2e138a15ab9233e513f3dfb514818642b8c148f623940f
3
+ metadata.gz: e55947f165ea60fdf05e34f18bbd7af157e37c2e0da0c975a721ca6672da0b9f
4
+ data.tar.gz: eaaa403c59388d699bc50d0108ff1211d6249933dfd0304a5cd896980a3b646f
5
5
  SHA512:
6
- metadata.gz: a06b224317f385390101c1b69648cc3a87345a016376643b8b17bd398823534e692942c57a12c6036665231e2233e00c85ce2374aa4c46df8e79467572480761
7
- data.tar.gz: a62ad7ef161155e77688213c211d69a5b283a7825f0aed524f8c0ac1dfcda67c489b36310ac6f27b9c68c9127b018eff63658648a8eb68d8690141ff65662629
6
+ metadata.gz: 24b75d7754e3617cee6eb4178495de33b813e940b65b3a83c64201ad539edcaeb9038cec38b25bafe4f7f9a2510771e4c34d24282043b737b412066580627641
7
+ data.tar.gz: afceb46d10b46e25d008a125d3d724f3aec05fc3f468aa388aa0cc899b1f5aae6b64c2271651c74b7fd22da364766740098ec037a385b490453c5cd3a082b06d
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,13 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [0.3.7] - 2026-08-05
34
+
35
+ - TAG: [v0.3.7][0.3.7t]
36
+ - COVERAGE: 98.94% -- 931/941 lines in 8 files
37
+ - BRANCH COVERAGE: 90.87% -- 378/416 branches in 8 files
38
+ - 25.96% documented
39
+
33
40
  ## [0.3.6] - 2026-08-03
34
41
 
35
42
  - TAG: [v0.3.6][0.3.6t]
@@ -253,7 +260,9 @@ Please file a bug if you notice a violation of semantic versioning.
253
260
  - kettle-jem-template-20260720-005 - Generated README Support & Community rows
254
261
  now include a RubyForum help badge.
255
262
 
256
- [Unreleased]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.6...HEAD
263
+ [Unreleased]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.7...HEAD
264
+ [0.3.7]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.6...v0.3.7
265
+ [0.3.7t]: https://github.com/kettle-dev/kettle-gha-pins/releases/tag/v0.3.7
257
266
  [0.3.6]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.5...v0.3.6
258
267
  [0.3.6t]: https://github.com/kettle-dev/kettle-gha-pins/releases/tag/v0.3.6
259
268
  [0.3.5]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.4...v0.3.5
data/README.md CHANGED
@@ -563,7 +563,7 @@ Thanks for RTFM. ☺️
563
563
  [📌gitmoji]: https://gitmoji.dev
564
564
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
565
565
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
566
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.945-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
566
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.941-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
567
567
  [🔐security]: https://github.com/kettle-dev/kettle-gha-pins/blob/main/SECURITY.md
568
568
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
569
569
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -6,7 +6,7 @@ module Kettle
6
6
  # Version namespace for this gem.
7
7
  module Version
8
8
  # Current gem version.
9
- VERSION = "0.3.6"
9
+ VERSION = "0.3.7"
10
10
  end
11
11
  # Current gem version exposed at the traditional constant location.
12
12
  VERSION = Version::VERSION # Traditional Constant Location
@@ -106,39 +106,39 @@ module Kettle
106
106
  end.max_by { |entry| sort_key(entry) }
107
107
  end
108
108
 
109
+ # The comment on `uses:` is a cached record that needs to do two things:
110
+ #
111
+ # 1. Track the currently resolved target (if the target changes, update
112
+ # the comment even when both values parse to version objects).
113
+ # 2. Normalize equivalent spellings (v2, v2.0, v2.0.0...) to the most
114
+ # specific canonical form available for that SHA in known_versions.
109
115
  def comment_update_version(comment_version, resolved_version, known_versions: [])
110
116
  comment = parse(comment_version)
111
117
  resolved = parse(resolved_version)
112
118
  return nil unless comment && resolved
113
119
 
114
- resolved_entry = exact_entry_for_version(known_versions, resolved_version)
115
- comment_entry = exact_entry_for_version(known_versions, comment_version)
120
+ canonical = canonical_version_for(resolved_version, known_versions)
121
+ return nil if comment_version.to_s == canonical
116
122
 
117
- if comment == resolved && resolved_entry && comment_entry
118
- preferred = entries_for_semantic_version(known_versions, comment).max_by { |known_entry| sort_key(known_entry) }
119
- preferred_version = preferred.fetch(:version)
120
- (preferred_version == comment_version.to_s) ? nil : preferred_version
121
- else
122
- return nil if comment_version.to_s == resolved_version.to_s
123
-
124
- resolved_version
125
- end
126
- end
127
-
128
- def exact_entry_for_version(versions, version)
129
- parsed = parse(version)
130
- return nil unless parsed
131
-
132
- versions.find do |entry|
133
- entry.fetch(:version_obj, nil) == parsed &&
134
- entry.fetch(:version, nil).to_s == parsed.to_s
135
- end
123
+ canonical
136
124
  end
137
125
 
138
126
  def entries_for_semantic_version(versions, version_obj)
139
127
  versions.select { |entry| entry.fetch(:version_obj, nil) == version_obj }
140
128
  end
141
129
 
130
+ # When multiple release spellings resolve to the same SHA, prefer the
131
+ # most specific equivalent tag. If there is no known equivalent, fall
132
+ # back to the plain resolved version string.
133
+ def canonical_version_for(resolved_version, known_versions)
134
+ resolved = parse(resolved_version)
135
+ return resolved_version.to_s unless resolved
136
+
137
+ equivalents = entries_for_semantic_version(known_versions, resolved)
138
+ preferred = equivalents.max_by { |entry| sort_key(entry) }
139
+ preferred ? preferred[:version] : resolved.to_s
140
+ end
141
+
142
142
  def normalize_upgrade_level(level)
143
143
  normalized = level.to_s.downcase
144
144
  VALID_UPGRADE_LEVELS.include?(normalized) ? normalized : DEFAULT_UPGRADE_LEVEL
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- @7��z�<�����)4����3PD�e{�a��ɖ
2
- ��p_s?�,�:�>��y><l��@�#y��(v����P�m����m�wH����^�`���ZI_���G���`�UmTt(CJ�럖��F$
3
- �I��(����Kǒ
1
+ O� G �G� F���Of�_2A��$R��pOvd��rپ6蘱_���J�F(�Z���A�+e[�2*����4@�{ˌǥ��;Z SaPY6G�/Y���2����2��p����NE�$�躧��Vb?Տ��
2
+ ��\���O��w�}���<��v/pn_�o�d��ع��t��qUy�=B�2s�������b��״Z����!��R�O�+�2z�!���/��X'�VB�>T�� �*��#0��m��h��>.o�������)D>��Đ��჋ �m��Mi3����x>^|������!d(�?�SZp��i>fu�~�5W7��~��
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-gha-pins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -301,10 +301,10 @@ licenses:
301
301
  - MIT
302
302
  metadata:
303
303
  homepage_uri: https://github.com/kettle-dev/kettle-gha-pins
304
- source_code_uri: https://github.com/kettle-dev/kettle-gha-pins/tree/v0.3.6
305
- changelog_uri: https://github.com/kettle-dev/kettle-gha-pins/blob/v0.3.6/CHANGELOG.md
304
+ source_code_uri: https://github.com/kettle-dev/kettle-gha-pins/tree/v0.3.7
305
+ changelog_uri: https://github.com/kettle-dev/kettle-gha-pins/blob/v0.3.7/CHANGELOG.md
306
306
  bug_tracker_uri: https://github.com/kettle-dev/kettle-gha-pins/issues
307
- documentation_uri: https://www.rubydoc.info/gems/kettle-gha-pins/0.3.6
307
+ documentation_uri: https://www.rubydoc.info/gems/kettle-gha-pins/0.3.7
308
308
  funding_uri: https://github.com/sponsors/pboling
309
309
  wiki_uri: https://github.com/kettle-dev/kettle-gha-pins/wiki
310
310
  news_uri: https://www.railsbling.com/tags/kettle-gha-pins
metadata.gz.sig CHANGED
Binary file