kettle-dev 3.1.34 → 3.1.35
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 +22 -1
- data/README.md +1 -1
- data/lib/kettle/dev/ci_helpers.rb +10 -2
- data/lib/kettle/dev/kloc_badge.rb +192 -0
- data/lib/kettle/dev/release_cli.rb +32 -29
- data/lib/kettle/dev/version.rb +1 -1
- data/lib/kettle/dev.rb +1 -0
- data/sig/kettle/dev.rbs +19 -1
- data.tar.gz.sig +0 -0
- metadata +5 -4
- 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: 74266be9347a9ab1512fd327dc54146ceebe62d9a05d18764c9682880c35f516
|
|
4
|
+
data.tar.gz: 8ae6b67df2dabf0c0b4cc0efcea129bd3d962037798450f26a539e11349b5ed3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49deb4a4021a9c18dac62d5a4ba2d6035e802365dcd6f981555574ff13bf59752348a70f3deadd220e77edabdbbeb2e7001f6ac77f8a961a944cdb6835b0f2f0
|
|
7
|
+
data.tar.gz: 45539c4981d87460bacd4021ee7f77d63620ccf5fd668991e3931263dfbde91497213c079d59b7370d6bc1bbdf76453566b95f52c33e67aed9d4af6d6b940210
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,25 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [3.1.35] - 2026-11-28
|
|
34
|
+
|
|
35
|
+
- TAG: [v3.1.35][3.1.35t]
|
|
36
|
+
- COVERAGE: 91.69% -- 6322/6895 lines in 51 files
|
|
37
|
+
- BRANCH COVERAGE: 75.95% -- 2450/3226 branches in 51 files
|
|
38
|
+
- 57.40% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- `Kettle::Dev::KlocBadge` helper for computing and updating README KLOC badges from CHANGELOG coverage sections or member-scoped SimpleCov `coverage/coverage.json` files
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- `spec_helper`: clear all ambient `KETTLE_RELEASE_*`, `K_RELEASE_*`, `GITHUB_TOKEN`, and `GH_TOKEN` env vars before each example so running `kettle-dev`'s test suite inside a `kettle-family` publish (which exports `KETTLE_RELEASE_REQUIRE_GITHUB_RELEASE=true`) cannot trigger real GitHub release checks in `ReleaseCLI#run` specs
|
|
47
|
+
|
|
48
|
+
- `kettle-release`: guard README KLOC badge updates against `0/0` coverage denominators (preventing badges from being overwritten with `0.000`) and resolve member-scoped `coverage/coverage.json` instead of aggregate root `CHANGELOG.md` totals in shared-changelog monorepos
|
|
49
|
+
|
|
50
|
+
- `CIHelpers#claim_ci_rate_slot`: use `Process.clock_gettime(Process::CLOCK_REALTIME)` instead of `Time.now` so Timecop-warped examples cannot compute multi-minute waits against real-clock timestamps written by background threads or peer workers, and preserve `K_RELEASE_CI_RATE_STATE_FILE` while stubbing `CIHelpers.sleep` in `spec_helper`
|
|
51
|
+
|
|
33
52
|
## [3.1.34] - 2026-11-27
|
|
34
53
|
|
|
35
54
|
- TAG: [v3.1.34][3.1.34t]
|
|
@@ -4429,7 +4448,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
4429
4448
|
- Selecting will run the selected workflow via `act`
|
|
4430
4449
|
- This may move to its own gem in the future.
|
|
4431
4450
|
|
|
4432
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.
|
|
4451
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.35...HEAD
|
|
4452
|
+
[3.1.35]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.34...v3.1.35
|
|
4453
|
+
[3.1.35t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.1.35
|
|
4433
4454
|
[3.1.34]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.33...v3.1.34
|
|
4434
4455
|
[3.1.34t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.1.34
|
|
4435
4456
|
[3.1.33]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.32...v3.1.33
|
data/README.md
CHANGED
|
@@ -1034,7 +1034,7 @@ Thanks for RTFM. ☺️
|
|
|
1034
1034
|
[📌gitmoji]: https://gitmoji.dev
|
|
1035
1035
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1036
1036
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1037
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-6.
|
|
1037
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-6.895-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1038
1038
|
[🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
|
|
1039
1039
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1040
1040
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -242,6 +242,14 @@ module Kettle
|
|
|
242
242
|
sleep(wait) if wait.positive?
|
|
243
243
|
end
|
|
244
244
|
|
|
245
|
+
# Un-mocked wall-clock seconds for cross-process rate-limit coordination.
|
|
246
|
+
# Must not use Time.now: Timecop in test suites shifts Time.now relative
|
|
247
|
+
# to background threads and other OS processes, turning slot - now into
|
|
248
|
+
# multi-minute real sleep() calls when CI runs near midnight UTC.
|
|
249
|
+
def ci_rate_now
|
|
250
|
+
Process.clock_gettime(Process::CLOCK_REALTIME)
|
|
251
|
+
end
|
|
252
|
+
|
|
245
253
|
# Returns how long the caller must wait before its request (0.0 when the
|
|
246
254
|
# budget is unspent). Never sleeps itself. Lock hold time is bounded by
|
|
247
255
|
# the file IO only.
|
|
@@ -261,7 +269,7 @@ module Kettle
|
|
|
261
269
|
f.flock(File::LOCK_EX)
|
|
262
270
|
payload = f.size.zero? ? {} : JSON.parse(f.read)
|
|
263
271
|
last = payload["next_slot"] || payload["last_request"] || 0.0
|
|
264
|
-
now =
|
|
272
|
+
now = ci_rate_now
|
|
265
273
|
# Absurdly future (clock skew) or ancient entries start fresh.
|
|
266
274
|
last = 0.0 if !last.is_a?(Numeric) || (last - now).abs > 3600
|
|
267
275
|
slot = [last + CI_RATE_MIN_INTERVAL, now].max
|
|
@@ -285,7 +293,7 @@ module Kettle
|
|
|
285
293
|
# rubocop:disable ThreadSafety/ClassInstanceVariable -- callers hold @ci_rate_lock, so this state has no concurrent writers; the degradation path is intentionally module-scoped.
|
|
286
294
|
def ci_rate_claim_in_process
|
|
287
295
|
@ci_rate_inproc_last = 0.0 unless defined?(@ci_rate_inproc_last)
|
|
288
|
-
now =
|
|
296
|
+
now = ci_rate_now
|
|
289
297
|
slot = [@ci_rate_inproc_last + CI_RATE_MIN_INTERVAL, now].max
|
|
290
298
|
@ci_rate_inproc_last = slot
|
|
291
299
|
wait = slot - now
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Kettle
|
|
6
|
+
module Dev
|
|
7
|
+
# Computes and updates the README KLOC badge from CHANGELOG coverage
|
|
8
|
+
# summaries or SimpleCov JSON coverage reports.
|
|
9
|
+
#
|
|
10
|
+
# Shared by standalone releases (kettle-release) and monorepo family
|
|
11
|
+
# releases (kettle-family). Guards against zero-line counts so a broken
|
|
12
|
+
# coverage run (0/0 lines) never overwrites a real KLOC badge with 0.000.
|
|
13
|
+
module KlocBadge
|
|
14
|
+
BADGE_PATTERN = /(\[🧮kloc-img\]:\s*https?:\/\/img\.shields\.io\/badge\/KLOC-)(\d+(?:\.\d+)?)(-[^\s]*)/
|
|
15
|
+
CHANGELOG_COVERAGE_PATTERN = /-\s*COVERAGE:\s*.+--\s*\d+\/(\d+)\s+lines/i
|
|
16
|
+
|
|
17
|
+
module_function
|
|
18
|
+
|
|
19
|
+
# Format a positive line count as a 3-decimal KLOC string (e.g. "2.175").
|
|
20
|
+
# Returns nil when line_count is nil or <= 0.
|
|
21
|
+
#
|
|
22
|
+
# @param line_count [Integer, nil]
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
def format_kloc(line_count)
|
|
25
|
+
count = line_count.to_i
|
|
26
|
+
return nil unless count > 0
|
|
27
|
+
|
|
28
|
+
format("%.3f", count.to_f / 1000.0)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Extract a formatted KLOC string from a CHANGELOG version section's
|
|
32
|
+
# COVERAGE line. Returns nil when absent or when the denominator is 0.
|
|
33
|
+
#
|
|
34
|
+
# @param section [String, nil]
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
def kloc_from_changelog_section(section)
|
|
37
|
+
return nil if section.to_s.empty?
|
|
38
|
+
|
|
39
|
+
match = section.to_s.match(CHANGELOG_COVERAGE_PATTERN)
|
|
40
|
+
return nil unless match
|
|
41
|
+
|
|
42
|
+
format_kloc(match[1].to_i)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Parse a SimpleCov coverage.json file once and return its coverage file
|
|
46
|
+
# map alongside the inferred project root directory, or nil on error.
|
|
47
|
+
#
|
|
48
|
+
# @param coverage_path [String, nil]
|
|
49
|
+
# @return [Array(Hash, String), nil]
|
|
50
|
+
def parse_coverage_json(coverage_path)
|
|
51
|
+
return nil if coverage_path.to_s.empty? || !File.file?(coverage_path)
|
|
52
|
+
|
|
53
|
+
data = JSON.parse(File.read(coverage_path))
|
|
54
|
+
return nil unless data.is_a?(Hash)
|
|
55
|
+
|
|
56
|
+
files = data["coverage"]
|
|
57
|
+
return nil unless files.is_a?(Hash)
|
|
58
|
+
|
|
59
|
+
coverage_root = File.dirname(File.dirname(File.expand_path(coverage_path)))
|
|
60
|
+
[files, coverage_root]
|
|
61
|
+
rescue JSON::ParserError, SystemCallError
|
|
62
|
+
nil
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Count total relevant (trackable) lines from an already-parsed coverage
|
|
66
|
+
# file map, optionally restricted to files within scope_root.
|
|
67
|
+
#
|
|
68
|
+
# @param files [Hash]
|
|
69
|
+
# @param scope_root [String, nil]
|
|
70
|
+
# @param coverage_root [String, nil]
|
|
71
|
+
# @return [Integer]
|
|
72
|
+
def lines_from_coverage_data(files, scope_root: nil, coverage_root: nil, **_options)
|
|
73
|
+
scoped_root = scope_root.to_s.empty? ? nil : Paths.canonical(scope_root)
|
|
74
|
+
|
|
75
|
+
total_lines = 0
|
|
76
|
+
files.each do |file_path, entry|
|
|
77
|
+
next unless entry.is_a?(Hash)
|
|
78
|
+
if scoped_root
|
|
79
|
+
next unless Paths.within?(file_path.to_s, scoped_root, base: coverage_root)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
lines = entry["lines"]
|
|
83
|
+
next unless lines.is_a?(Array)
|
|
84
|
+
|
|
85
|
+
total_lines += lines.count { |value| value.is_a?(Integer) }
|
|
86
|
+
end
|
|
87
|
+
total_lines
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Count total relevant (trackable) lines in a SimpleCov coverage.json
|
|
91
|
+
# file, optionally restricted to files within scope_root.
|
|
92
|
+
# Returns nil when coverage_path does not exist or cannot be parsed.
|
|
93
|
+
#
|
|
94
|
+
# @param coverage_path [String, nil]
|
|
95
|
+
# @param scope_root [String, nil]
|
|
96
|
+
# @return [Integer, nil]
|
|
97
|
+
def lines_from_coverage_json(coverage_path, scope_root: nil, **options)
|
|
98
|
+
parsed = parse_coverage_json(coverage_path)
|
|
99
|
+
return nil unless parsed
|
|
100
|
+
|
|
101
|
+
files, coverage_root = parsed
|
|
102
|
+
lines_from_coverage_data(files, scope_root: scope_root, coverage_root: coverage_root, **options)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Compute a formatted KLOC string from a SimpleCov coverage.json file,
|
|
106
|
+
# optionally scoped to files under scope_root. Returns nil when missing,
|
|
107
|
+
# invalid, or 0 lines.
|
|
108
|
+
#
|
|
109
|
+
# @param coverage_path [String, nil]
|
|
110
|
+
# @param scope_root [String, nil]
|
|
111
|
+
# @return [String, nil]
|
|
112
|
+
def kloc_from_coverage_json(coverage_path, scope_root: nil, **options)
|
|
113
|
+
lines = lines_from_coverage_json(coverage_path, scope_root: scope_root, **options)
|
|
114
|
+
return nil unless lines
|
|
115
|
+
|
|
116
|
+
format_kloc(lines)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Rewrite the [🧮kloc-img] badge number in a single file.
|
|
120
|
+
# Returns true when the file was modified, false otherwise.
|
|
121
|
+
#
|
|
122
|
+
# @param path [String, nil]
|
|
123
|
+
# @param kloc_str [String, nil]
|
|
124
|
+
# @return [Boolean]
|
|
125
|
+
def update_file(path, kloc_str)
|
|
126
|
+
return false if path.to_s.empty? || kloc_str.to_s.empty? || !File.file?(path)
|
|
127
|
+
|
|
128
|
+
content = File.read(path)
|
|
129
|
+
new_content = content.gsub(BADGE_PATTERN, "\\1#{kloc_str}\\3")
|
|
130
|
+
return false if new_content == content
|
|
131
|
+
|
|
132
|
+
File.write(path, new_content)
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Update README.md (and README.md.example when present) under project_root.
|
|
137
|
+
# Returns the list of modified file paths.
|
|
138
|
+
#
|
|
139
|
+
# @param project_root [String]
|
|
140
|
+
# @param kloc_str [String, nil]
|
|
141
|
+
# @return [Array<String>]
|
|
142
|
+
def update_project_readmes(project_root, kloc_str, **_options)
|
|
143
|
+
return [] if project_root.to_s.empty? || kloc_str.to_s.empty?
|
|
144
|
+
|
|
145
|
+
updated = []
|
|
146
|
+
[
|
|
147
|
+
File.join(project_root, "README.md"),
|
|
148
|
+
File.join(project_root, "README.md.example")
|
|
149
|
+
].each do |path|
|
|
150
|
+
updated << path if update_file(path, kloc_str)
|
|
151
|
+
end
|
|
152
|
+
updated
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Compute member-scoped KLOC from coverage_path and update README files
|
|
156
|
+
# under project_root. Returns the list of modified file paths.
|
|
157
|
+
#
|
|
158
|
+
# @param project_root [String]
|
|
159
|
+
# @param coverage_path [String]
|
|
160
|
+
# @param scope_root [String, nil]
|
|
161
|
+
# @return [Array<String>]
|
|
162
|
+
def update_from_coverage_json(project_root:, coverage_path:, scope_root: project_root, **options)
|
|
163
|
+
kloc_str = kloc_from_coverage_json(coverage_path, scope_root: scope_root, **options)
|
|
164
|
+
return [] unless kloc_str
|
|
165
|
+
|
|
166
|
+
update_project_readmes(project_root, kloc_str, **options)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Parse coverage_path once and update README KLOC badges for each
|
|
170
|
+
# member root in member_roots. Returns the list of modified file paths.
|
|
171
|
+
#
|
|
172
|
+
# @param member_roots [Array<String>]
|
|
173
|
+
# @param coverage_path [String]
|
|
174
|
+
# @return [Array<String>]
|
|
175
|
+
def update_members_from_coverage_json(member_roots:, coverage_path:, **options)
|
|
176
|
+
parsed = parse_coverage_json(coverage_path)
|
|
177
|
+
return [] unless parsed
|
|
178
|
+
|
|
179
|
+
files, coverage_root = parsed
|
|
180
|
+
updated = []
|
|
181
|
+
Array(member_roots).each do |member_root|
|
|
182
|
+
lines = lines_from_coverage_data(files, scope_root: member_root, coverage_root: coverage_root, **options)
|
|
183
|
+
kloc_str = format_kloc(lines)
|
|
184
|
+
next unless kloc_str
|
|
185
|
+
|
|
186
|
+
updated.concat(update_project_readmes(member_root, kloc_str, **options))
|
|
187
|
+
end
|
|
188
|
+
updated
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
@@ -1367,44 +1367,47 @@ module Kettle
|
|
|
1367
1367
|
ENV.fetch("K_CHANGELOG_COVERAGE_HARD", "true").downcase != "false"
|
|
1368
1368
|
end
|
|
1369
1369
|
|
|
1370
|
-
# Update the README KLOC badge number based on the
|
|
1371
|
-
#
|
|
1372
|
-
#
|
|
1373
|
-
#
|
|
1374
|
-
# - Formats with three decimals (e.g., 0.076, 2.175, 10.123)
|
|
1375
|
-
# - Rewrites the [🧮kloc-img] badge line in README.md (and README.md.example when present)
|
|
1376
|
-
# replacing only the numeric portion after "KLOC-" while preserving other URL params.
|
|
1370
|
+
# Update the README KLOC badge number based on the current version's
|
|
1371
|
+
# COVERAGE line in a project-local CHANGELOG.md, or a member-scoped
|
|
1372
|
+
# SimpleCov coverage.json when sharing a monorepo root CHANGELOG.md.
|
|
1373
|
+
# Never overwrites the badge when the line count is 0.
|
|
1377
1374
|
def update_readme_kloc_badge!
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1375
|
+
kloc_str = resolved_readme_kloc
|
|
1376
|
+
return unless kloc_str
|
|
1377
|
+
|
|
1378
|
+
KlocBadge.update_project_readmes(@root, kloc_str)
|
|
1379
|
+
end
|
|
1382
1380
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1381
|
+
def resolved_readme_kloc
|
|
1382
|
+
changelog_path = resolved_changelog_path
|
|
1383
|
+
if Paths.within?(changelog_path, @root)
|
|
1384
|
+
version = detect_version
|
|
1385
|
+
section, _compare_ref, _tag_ref = extract_changelog_for_version(version)
|
|
1386
|
+
kloc_str = KlocBadge.kloc_from_changelog_section(section)
|
|
1387
|
+
return kloc_str if kloc_str
|
|
1388
|
+
end
|
|
1386
1389
|
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
+
coverage_json_kloc_candidates(changelog_path).each do |coverage_path|
|
|
1391
|
+
kloc_str = KlocBadge.kloc_from_coverage_json(coverage_path, scope_root: @root)
|
|
1392
|
+
return kloc_str if kloc_str
|
|
1393
|
+
end
|
|
1394
|
+
nil
|
|
1395
|
+
end
|
|
1390
1396
|
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1397
|
+
def coverage_json_kloc_candidates(changelog_path)
|
|
1398
|
+
candidates = [File.join(@root, "coverage", "coverage.json")]
|
|
1399
|
+
coverage_root = ENV["K_CHANGELOG_COVERAGE_ROOT"].to_s.strip
|
|
1400
|
+
candidates << File.join(File.expand_path(coverage_root, @root), "coverage", "coverage.json") unless coverage_root.empty?
|
|
1401
|
+
unless Paths.within?(changelog_path, @root)
|
|
1402
|
+
candidates << File.join(File.dirname(changelog_path), "coverage", "coverage.json")
|
|
1403
|
+
end
|
|
1404
|
+
candidates.uniq
|
|
1394
1405
|
end
|
|
1395
1406
|
|
|
1396
1407
|
# Helper to update the [🧮kloc-img] badge in the given file path.
|
|
1397
1408
|
# Replaces only the numeric portion after "KLOC-" keeping other URL parts intact.
|
|
1398
1409
|
def update_badge_number_in_file(path, kloc_str)
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
content = File.read(path)
|
|
1402
|
-
# Match the specific reference line, capture groups around the number
|
|
1403
|
-
# Example: [🧮kloc-img]: https://img.shields.io/badge/KLOC-2.175-FFDD67.svg?style=...
|
|
1404
|
-
new_content = content.gsub(/(\[🧮kloc-img\]:\s*https?:\/\/img\.shields\.io\/badge\/KLOC-)(\d+(?:\.\d+)?)(-[^\s]*)/, "\\1#{kloc_str}\\3")
|
|
1405
|
-
if new_content != content
|
|
1406
|
-
File.write(path, new_content)
|
|
1407
|
-
end
|
|
1410
|
+
KlocBadge.update_file(path, kloc_str)
|
|
1408
1411
|
end
|
|
1409
1412
|
|
|
1410
1413
|
# Update Rakefile.example banner to include current gem version and current date.
|
data/lib/kettle/dev/version.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Kettle
|
|
|
5
5
|
# Version namespace for this gem.
|
|
6
6
|
module Version
|
|
7
7
|
# Current gem version.
|
|
8
|
-
VERSION = "3.1.
|
|
8
|
+
VERSION = "3.1.35"
|
|
9
9
|
end
|
|
10
10
|
# Current gem version exposed at the traditional constant location.
|
|
11
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
data/lib/kettle/dev.rb
CHANGED
|
@@ -44,6 +44,7 @@ module Kettle
|
|
|
44
44
|
autoload :GhaShaPinsCLI, "kettle/dev/gha_sha_pins_cli"
|
|
45
45
|
autoload :InputAdapter, "kettle/dev/input_adapter"
|
|
46
46
|
autoload :InteractiveReleaseCommand, "kettle/dev/interactive_release_command"
|
|
47
|
+
autoload :KlocBadge, "kettle/dev/kloc_badge"
|
|
47
48
|
autoload :LockfileReset, "kettle/dev/lockfile_reset"
|
|
48
49
|
autoload :MarkdownReferenceValidator, "kettle/dev/markdown_reference_validator"
|
|
49
50
|
autoload :ReadmeBackers, "kettle/dev/readme_backers"
|
data/sig/kettle/dev.rbs
CHANGED
|
@@ -362,6 +362,22 @@ module Kettle
|
|
|
362
362
|
def self.block_call_to?: (Prism::Node node, Symbol method_name) -> bool
|
|
363
363
|
end
|
|
364
364
|
|
|
365
|
+
module KlocBadge
|
|
366
|
+
BADGE_PATTERN: Regexp
|
|
367
|
+
CHANGELOG_COVERAGE_PATTERN: Regexp
|
|
368
|
+
|
|
369
|
+
def self.format_kloc: (Integer? line_count) -> String?
|
|
370
|
+
def self.kloc_from_changelog_section: (String? section) -> String?
|
|
371
|
+
def self.parse_coverage_json: (String? coverage_path) -> [Hash[String, untyped], String]?
|
|
372
|
+
def self.lines_from_coverage_data: (Hash[String, untyped] files, ?scope_root: String?, ?coverage_root: String?, **untyped) -> Integer
|
|
373
|
+
def self.lines_from_coverage_json: (String? coverage_path, ?scope_root: String?, **untyped) -> Integer?
|
|
374
|
+
def self.kloc_from_coverage_json: (String? coverage_path, ?scope_root: String?, **untyped) -> String?
|
|
375
|
+
def self.update_file: (String? path, String? kloc_str) -> bool
|
|
376
|
+
def self.update_project_readmes: (String project_root, String? kloc_str, **untyped) -> Array[String]
|
|
377
|
+
def self.update_from_coverage_json: (project_root: String, coverage_path: String, ?scope_root: String?, **untyped) -> Array[String]
|
|
378
|
+
def self.update_members_from_coverage_json: (member_roots: Array[String], coverage_path: String, **untyped) -> Array[String]
|
|
379
|
+
end
|
|
380
|
+
|
|
365
381
|
class ReadmeBackers
|
|
366
382
|
def initialize: (
|
|
367
383
|
handle: String?,
|
|
@@ -387,7 +403,9 @@ module Kettle
|
|
|
387
403
|
private
|
|
388
404
|
|
|
389
405
|
def update_readme_kloc_badge!: () -> void
|
|
390
|
-
def
|
|
406
|
+
def resolved_readme_kloc: () -> String?
|
|
407
|
+
def coverage_json_kloc_candidates: (String changelog_path) -> Array[String]
|
|
408
|
+
def update_badge_number_in_file: (String path, String kloc_str) -> bool
|
|
391
409
|
def update_rakefile_example_header!: (String version) -> void
|
|
392
410
|
def validate_copyright_years!: () -> void
|
|
393
411
|
def extract_years_from_file: (String path) -> ::Set[Integer]
|
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: 3.1.
|
|
4
|
+
version: 3.1.35
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -439,6 +439,7 @@ files:
|
|
|
439
439
|
- lib/kettle/dev/git_commit_footer.rb
|
|
440
440
|
- lib/kettle/dev/input_adapter.rb
|
|
441
441
|
- lib/kettle/dev/interactive_release_command.rb
|
|
442
|
+
- lib/kettle/dev/kloc_badge.rb
|
|
442
443
|
- lib/kettle/dev/lockfile_reset.rb
|
|
443
444
|
- lib/kettle/dev/markdown_reference_validator.rb
|
|
444
445
|
- lib/kettle/dev/open_collective_config.rb
|
|
@@ -476,10 +477,10 @@ licenses:
|
|
|
476
477
|
- AGPL-3.0-only
|
|
477
478
|
metadata:
|
|
478
479
|
homepage_uri: "https://kettle-dev.galtzo.com"
|
|
479
|
-
source_code_uri: "https://github.com/kettle-dev/kettle-dev/tree/v3.1.
|
|
480
|
-
changelog_uri: "https://github.com/kettle-dev/kettle-dev/blob/v3.1.
|
|
480
|
+
source_code_uri: "https://github.com/kettle-dev/kettle-dev/tree/v3.1.35"
|
|
481
|
+
changelog_uri: "https://github.com/kettle-dev/kettle-dev/blob/v3.1.35/CHANGELOG.md"
|
|
481
482
|
bug_tracker_uri: "https://github.com/kettle-dev/kettle-dev/issues"
|
|
482
|
-
documentation_uri: "https://www.rubydoc.info/gems/kettle-dev/3.1.
|
|
483
|
+
documentation_uri: "https://www.rubydoc.info/gems/kettle-dev/3.1.35"
|
|
483
484
|
funding_uri: "https://github.com/sponsors/pboling"
|
|
484
485
|
wiki_uri: "https://github.com/kettle-dev/kettle-dev/wiki"
|
|
485
486
|
news_uri: "https://www.railsbling.com/tags/kettle-dev"
|
metadata.gz.sig
CHANGED
|
Binary file
|