kettle-gha-pins 0.3.1 → 0.3.3

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: 1c4e8941fcf7fadb5c7867e427f4c000436c9284abd219fa7b0dd3145b1809fa
4
- data.tar.gz: ecb48ef8ffed69aac211e173eafa9876b85762278d3e81c270b66ccc1e6c1f6a
3
+ metadata.gz: ace9741a6103bddad79df3803ccc35153af81161b7c21c1615f08a10604e6c92
4
+ data.tar.gz: 8f212c66b4cbb24a32491dfb8c9ede3477492daa20449e9eaa2d3278a2859818
5
5
  SHA512:
6
- metadata.gz: 14da867044c3e10ce5a9e3259d2b3b0f4759425449a8806c55cbd7f777c264d359cf09792dba534ed206e0f30e47bd353cf3fbb087c4b0077d62d3451cc9e5b7
7
- data.tar.gz: 32f3e435aa5d9cedb4de296cb68c2329097b17eb0a4dcfbc3f9dc224614028ec1815d655618adb3758e5ab184b42f1de35e3f9705925f3b3b3de14fac6d9e6f3
6
+ metadata.gz: e411ca542ea1db8da7c50018698d07958d06da43ec83259ae9b98d5bec7c3417c3d5b42ef49bf58fc48ab082088277bc63832e633038720304e59a18a0c6bece
7
+ data.tar.gz: e9ee10f5a5a2d517b1579c14dc7f6369c043d74ba568bf3d4cff79996cec4386b032c0c9d1d442362be66fa89cf072524daf83157ad2272a746e54b68375747a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,68 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [0.3.3] - 2026-07-28
34
+
35
+ - TAG: [v0.3.3][0.3.3t]
36
+ - COVERAGE: 98.94% -- 935/945 lines in 8 files
37
+ - BRANCH COVERAGE: 90.91% -- 380/418 branches in 8 files
38
+ - 24.04% documented
39
+
40
+ ### Fixed
41
+
42
+ - Version comment normalization now rewrites equivalent comments to a real
43
+ action tag, preferring the most specific version spelling when both equivalent
44
+ tags exist.
45
+ - Two-segment version comments like `v2.0` are now parsed when deciding whether
46
+ an adjacent SHA-pin comment needs normalization.
47
+
48
+ ## [0.3.2] - 2026-07-27
49
+
50
+ - TAG: [v0.3.2][0.3.2t]
51
+ - COVERAGE: 98.92% -- 915/925 lines in 8 files
52
+ - BRANCH COVERAGE: 90.93% -- 371/408 branches in 8 files
53
+ - 24.75% documented
54
+
55
+ ### Added
56
+
57
+ - kettle-jem-template-20260726-001 - Projects now include YARD lint
58
+ configuration and documentation dependencies so documentation issues fail
59
+ before generated docs are refreshed.
60
+
61
+ - kettle-jem-template-20260727-001 - Spec harness documentation now lists the
62
+ RSpec helpers provided by `kettle-test`.
63
+
64
+ ### Changed
65
+
66
+ - The `kettle-gha-pins` executable startup header is now shown only when
67
+ `--verbose` is passed; `-v` and `--version` still print just the executable
68
+ version and exit.
69
+
70
+ - kettle-jem-template-20260725-001 - Release pull request branches beginning
71
+ with `feature/release` now run JRuby and TruffleRuby workflows.
72
+ - kettle-jem-template-20260725-002 - Version specs now use `anonymous_loader` to
73
+ cover `version.rb` without redefining constants, or are removed when version
74
+ specs are not managed for the project.
75
+
76
+ - kettle-jem-template-20260728-001 - Generated Ruby workflows now use clearer
77
+ setup-ruby-flash planning and can prepare appraisal-only jobs without
78
+ installing the main Gemfile bundle.
79
+
80
+ ### Fixed
81
+
82
+ - Two-segment GitHub Action releases like `v2.0` are now recognized as
83
+ versioned action tags, so SHA pin updaters do not collapse them to evergreen
84
+ major tags like `v2`.
85
+ - kettle-jem-template-20260726-002 - Generated version files now document their
86
+ version namespace and constants, reducing warning-only YARD lint output.
87
+
88
+ - kettle-jem-template-20260726-003 - Coverage upload steps now treat Coveralls,
89
+ QLTY, and Codecov as optional, so provider outages do not fail CI when local
90
+ coverage thresholds still pass.
91
+ - kettle-jem-template-20260728-002 - Generated RuboCop configs now ignore the
92
+ same `gemfiles/vendor/bundle` tree as `.gitignore`, so vendored dependency
93
+ installs are not reported as project lint debt.
94
+
33
95
  ## [0.3.1] - 2026-07-23
34
96
 
35
97
  - TAG: [v0.3.1][0.3.1t]
@@ -134,7 +196,11 @@ Please file a bug if you notice a violation of semantic versioning.
134
196
  - kettle-jem-template-20260720-005 - Generated README Support & Community rows
135
197
  now include a RubyForum help badge.
136
198
 
137
- [Unreleased]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.1...HEAD
199
+ [Unreleased]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.3...HEAD
200
+ [0.3.3]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.2...v0.3.3
201
+ [0.3.3t]: https://github.com/kettle-dev/kettle-gha-pins/releases/tag/v0.3.3
202
+ [0.3.2]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.1...v0.3.2
203
+ [0.3.2t]: https://github.com/kettle-dev/kettle-gha-pins/releases/tag/v0.3.2
138
204
  [0.3.1]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.3.0...v0.3.1
139
205
  [0.3.1t]: https://github.com/kettle-dev/kettle-gha-pins/releases/tag/v0.3.1
140
206
  [0.3.0]: https://github.com/kettle-dev/kettle-gha-pins/compare/v0.2.1...v0.3.0
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.925-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
566
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.945-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
data/exe/kettle-gha-pins CHANGED
@@ -28,7 +28,7 @@ rescue LoadError
28
28
  end
29
29
 
30
30
  begin
31
- puts "== #{script_basename} v#{Kettle::Gha::Pins::Version::VERSION} =="
31
+ puts "== #{script_basename} v#{Kettle::Gha::Pins::Version::VERSION} ==" if ARGV.delete("--verbose")
32
32
 
33
33
  status = Kettle::Gha::Pins::CLI.new(ARGV).run!
34
34
  exit(status)
@@ -27,9 +27,9 @@ module Kettle
27
27
  level = VersionRubric.normalize_upgrade_level(upgrade_level)
28
28
 
29
29
  current_ref = old_ref.to_s.strip
30
- return {is_outdated: false, updates: nil, reason: nil, current_version: nil} if current_ref.empty?
31
-
32
30
  available_versions = versions || []
31
+ return {is_outdated: false, updates: nil, reason: nil, current_version: nil, versions: available_versions} if current_ref.empty?
32
+
33
33
  latest = available_versions.first
34
34
 
35
35
  current_sha = if SHA_RE.match?(current_ref) || WEAK_SHA_RE.match?(current_ref)
@@ -114,6 +114,7 @@ module Kettle
114
114
  updates: updates,
115
115
  reason: reason,
116
116
  current_version: current_version,
117
+ versions: available_versions,
117
118
  latest_outdated: latest_outdated
118
119
  }
119
120
  end
@@ -34,8 +34,8 @@ module Kettle
34
34
  VALID_UPGRADE_LEVELS = Kettle::Gha::Pins::VALID_UPGRADE_LEVELS
35
35
  PersistentActionCache = Kettle::Gha::Pins::PersistentActionCache
36
36
  GitHubClient = Kettle::Gha::Pins::GitHubClient
37
- VERSION_COMMENT_SUFFIX_RE = /\A\s+#\s*v?(?<version>\d+(?:\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?)?)/
38
- VERSION_COMMENT_REPLACEMENT_RE = /\A(?<prefix>\s+#\s*)v?\d+(?:\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?)?/
37
+ VERSION_COMMENT_SUFFIX_RE = /\A\s+#\s*v?(?<version>\d+(?:\.\d+){0,2}(?:[-.]?[0-9A-Za-z.-]+)?)/
38
+ VERSION_COMMENT_REPLACEMENT_RE = /\A(?<prefix>\s+#\s*)v?\d+(?:\.\d+){0,2}(?:[-.]?[0-9A-Za-z.-]+)?/
39
39
 
40
40
  def self.release_version_sort_key(entry)
41
41
  Kettle::Gha::Pins::VersionRubric.sort_key(entry)
@@ -151,10 +151,15 @@ module Kettle
151
151
  end
152
152
  if updates.nil? && upgrade_plan[:current_version]
153
153
  comment_version = version_comment_from_line(text, node[:line], node[:col], parsed_ref[:value])
154
- if comment_version && comment_version != upgrade_plan[:current_version]
154
+ comment_update_version = VersionRubric.comment_update_version(
155
+ comment_version,
156
+ upgrade_plan[:current_version],
157
+ known_versions: upgrade_plan.fetch(:versions, [])
158
+ )
159
+ if comment_update_version
155
160
  updates = {
156
161
  new_ref: old_ref,
157
- new_version: upgrade_plan[:current_version],
162
+ new_version: comment_update_version,
158
163
  old_version: comment_version,
159
164
  reason: COMMENT_REASON,
160
165
  action: repo_ref
@@ -3,9 +3,12 @@
3
3
  module Kettle
4
4
  module Gha
5
5
  module Pins
6
+ # Version namespace for this gem.
6
7
  module Version
7
- VERSION = "0.3.1"
8
+ # Current gem version.
9
+ VERSION = "0.3.3"
8
10
  end
11
+ # Current gem version exposed at the traditional constant location.
9
12
  VERSION = Version::VERSION # Traditional Constant Location
10
13
  end
11
14
  end
@@ -7,7 +7,7 @@ module Kettle
7
7
  module VersionRubric
8
8
  VALID_UPGRADE_LEVELS = %w[major minor patch].freeze
9
9
  DEFAULT_UPGRADE_LEVEL = "major"
10
- RELEASE_TAG_RE = /\A(?:\d+|\d+\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?)\z/
10
+ RELEASE_TAG_RE = /\A(?:\d+|\d+\.\d+(?:\.\d+)?(?:[-.]?[0-9A-Za-z.-]+)?)\z/
11
11
 
12
12
  module_function
13
13
 
@@ -106,6 +106,39 @@ module Kettle
106
106
  end.max_by { |entry| sort_key(entry) }
107
107
  end
108
108
 
109
+ def comment_update_version(comment_version, resolved_version, known_versions: [])
110
+ comment = parse(comment_version)
111
+ resolved = parse(resolved_version)
112
+ return nil unless comment && resolved
113
+
114
+ resolved_entry = exact_entry_for_version(known_versions, resolved_version)
115
+ comment_entry = exact_entry_for_version(known_versions, comment_version)
116
+
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
136
+ end
137
+
138
+ def entries_for_semantic_version(versions, version_obj)
139
+ versions.select { |entry| entry.fetch(:version_obj, nil) == version_obj }
140
+ end
141
+
109
142
  def normalize_upgrade_level(level)
110
143
  normalized = level.to_s.downcase
111
144
  VALID_UPGRADE_LEVELS.include?(normalized) ? normalized : DEFAULT_UPGRADE_LEVEL
data.tar.gz.sig CHANGED
Binary file
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.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -153,6 +153,26 @@ dependencies:
153
153
  - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: 1.0.4
156
+ - !ruby/object:Gem::Dependency
157
+ name: anonymous_loader
158
+ requirement: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - "~>"
161
+ - !ruby/object:Gem::Version
162
+ version: '0.1'
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: 0.1.3
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.1'
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: 0.1.3
156
176
  - !ruby/object:Gem::Dependency
157
177
  name: appraisal2
158
178
  requirement: !ruby/object:Gem::Requirement
@@ -182,7 +202,7 @@ dependencies:
182
202
  version: '2.0'
183
203
  - - ">="
184
204
  - !ruby/object:Gem::Version
185
- version: 2.0.14
205
+ version: 2.0.15
186
206
  type: :development
187
207
  prerelease: false
188
208
  version_requirements: !ruby/object:Gem::Requirement
@@ -192,7 +212,7 @@ dependencies:
192
212
  version: '2.0'
193
213
  - - ">="
194
214
  - !ruby/object:Gem::Version
195
- version: 2.0.14
215
+ version: 2.0.15
196
216
  - !ruby/object:Gem::Dependency
197
217
  name: turbo_tests2
198
218
  requirement: !ruby/object:Gem::Requirement
@@ -202,7 +222,7 @@ dependencies:
202
222
  version: '3.2'
203
223
  - - ">="
204
224
  - !ruby/object:Gem::Version
205
- version: 3.2.0
225
+ version: 3.2.3
206
226
  type: :development
207
227
  prerelease: false
208
228
  version_requirements: !ruby/object:Gem::Requirement
@@ -212,7 +232,7 @@ dependencies:
212
232
  version: '3.2'
213
233
  - - ">="
214
234
  - !ruby/object:Gem::Version
215
- version: 3.2.0
235
+ version: 3.2.3
216
236
  - !ruby/object:Gem::Dependency
217
237
  name: stone_checksums
218
238
  requirement: !ruby/object:Gem::Requirement
@@ -222,7 +242,7 @@ dependencies:
222
242
  version: '1.0'
223
243
  - - ">="
224
244
  - !ruby/object:Gem::Version
225
- version: 1.0.6
245
+ version: 1.0.7
226
246
  type: :development
227
247
  prerelease: false
228
248
  version_requirements: !ruby/object:Gem::Requirement
@@ -232,7 +252,7 @@ dependencies:
232
252
  version: '1.0'
233
253
  - - ">="
234
254
  - !ruby/object:Gem::Version
235
- version: 1.0.6
255
+ version: 1.0.7
236
256
  - !ruby/object:Gem::Dependency
237
257
  name: gitmoji-regex
238
258
  requirement: !ruby/object:Gem::Requirement
@@ -242,7 +262,7 @@ dependencies:
242
262
  version: '2.0'
243
263
  - - ">="
244
264
  - !ruby/object:Gem::Version
245
- version: 2.0.4
265
+ version: 2.0.6
246
266
  type: :development
247
267
  prerelease: false
248
268
  version_requirements: !ruby/object:Gem::Requirement
@@ -252,7 +272,7 @@ dependencies:
252
272
  version: '2.0'
253
273
  - - ">="
254
274
  - !ruby/object:Gem::Version
255
- version: 2.0.4
275
+ version: 2.0.6
256
276
  description: "\U0001F4CC GitHub Actions workflow SHA pin maintenance, including deterministic
257
277
  release-tag parsing, canonicalization, cache-backed GitHub ref resolution, and upgrade
258
278
  planning."
@@ -281,10 +301,10 @@ licenses:
281
301
  - MIT
282
302
  metadata:
283
303
  homepage_uri: https://github.com/kettle-dev/kettle-gha-pins
284
- source_code_uri: https://github.com/kettle-dev/kettle-gha-pins/tree/v0.3.1
285
- changelog_uri: https://github.com/kettle-dev/kettle-gha-pins/blob/v0.3.1/CHANGELOG.md
304
+ source_code_uri: https://github.com/kettle-dev/kettle-gha-pins/tree/v0.3.3
305
+ changelog_uri: https://github.com/kettle-dev/kettle-gha-pins/blob/v0.3.3/CHANGELOG.md
286
306
  bug_tracker_uri: https://github.com/kettle-dev/kettle-gha-pins/issues
287
- documentation_uri: https://www.rubydoc.info/gems/kettle-gha-pins/0.3.1
307
+ documentation_uri: https://www.rubydoc.info/gems/kettle-gha-pins/0.3.3
288
308
  funding_uri: https://github.com/sponsors/pboling
289
309
  wiki_uri: https://github.com/kettle-dev/kettle-gha-pins/wiki
290
310
  news_uri: https://www.railsbling.com/tags/kettle-gha-pins
metadata.gz.sig CHANGED
Binary file