kettle-dev 1.1.47 → 1.1.48
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/.envrc +2 -2
- data/.github/workflows/coverage.yml +3 -4
- data/Appraisals +2 -0
- data/CHANGELOG.md +15 -1
- data/README.md +2 -2
- data/README.md.example +2 -2
- data/README.md.no-osc.example +1 -1
- data/Rakefile.example +1 -1
- data/lib/kettle/dev/template_helpers.rb +86 -6
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -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: 81727729ce153f3e6b055ffc4ec51edb98ac88948e721672ba594d7922073603
|
|
4
|
+
data.tar.gz: 18deca20469a370c4532b82d2f19536807218e31cf52838a96872c5896bc2c23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1f3dfe80ca9936aee99f3d300c9eaef1a3e9c3c2eb871af63574b130d6a5b2de5c33d083745e50f352e6cfc532c8495c57ae0201cd92c9ed68a74de215befb2
|
|
7
|
+
data.tar.gz: b0396f0e7e0f975ef32256c276bd0fbe7e9026eba2c8685a33c942b480561277c0a9330868b5472a4e2c82d6b37de05d03c5f2eae604c3e933ba8bd6b0728d52
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/.envrc
CHANGED
|
@@ -21,8 +21,8 @@ export K_SOUP_COV_DO=true # Means you want code coverage
|
|
|
21
21
|
export K_SOUP_COV_COMMAND_NAME="Test Coverage"
|
|
22
22
|
# Available formats are html, xml, rcov, lcov, json, tty
|
|
23
23
|
export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
|
|
24
|
-
export K_SOUP_COV_MIN_BRANCH=
|
|
25
|
-
export K_SOUP_COV_MIN_LINE=
|
|
24
|
+
export K_SOUP_COV_MIN_BRANCH=77 # Means you want to enforce X% branch coverage
|
|
25
|
+
export K_SOUP_COV_MIN_LINE=92 # Means you want to enforce X% line coverage
|
|
26
26
|
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
|
|
27
27
|
export K_SOUP_COV_MULTI_FORMATTERS=true
|
|
28
28
|
export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
|
|
@@ -6,9 +6,8 @@ permissions:
|
|
|
6
6
|
id-token: write
|
|
7
7
|
|
|
8
8
|
env:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
K_SOUP_COV_MIN_LINE: 93
|
|
9
|
+
K_SOUP_COV_MIN_BRANCH: 77
|
|
10
|
+
K_SOUP_COV_MIN_LINE: 92
|
|
12
11
|
K_SOUP_COV_MIN_HARD: true
|
|
13
12
|
K_SOUP_COV_FORMATTERS: "xml,rcov,lcov,tty"
|
|
14
13
|
K_SOUP_COV_DO: true
|
|
@@ -116,7 +115,7 @@ jobs:
|
|
|
116
115
|
hide_complexity: true
|
|
117
116
|
indicators: true
|
|
118
117
|
output: both
|
|
119
|
-
thresholds: '
|
|
118
|
+
thresholds: '92 77'
|
|
120
119
|
continue-on-error: ${{ matrix.experimental != 'false' }}
|
|
121
120
|
|
|
122
121
|
- name: Add Coverage PR Comment
|
data/Appraisals
CHANGED
|
@@ -136,6 +136,8 @@ appraise "coverage" do
|
|
|
136
136
|
eval_gemfile "modular/optional.gemfile"
|
|
137
137
|
eval_gemfile "modular/recording/r3/recording.gemfile"
|
|
138
138
|
eval_gemfile "modular/x_std_libs.gemfile"
|
|
139
|
+
# Normally style is included in coverage runs only, but we need it for the test suite to get full coverage
|
|
140
|
+
eval_gemfile "modular/style.gemfile"
|
|
139
141
|
# Dependencies injected by the kettle-dev-setup script & kettle:dev:install rake task
|
|
140
142
|
# eval_gemfile "modular/injected.gemfile"
|
|
141
143
|
end
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,18 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [1.1.48] - 2025-11-06
|
|
34
|
+
|
|
35
|
+
- TAG: [v1.1.48][1.1.48t]
|
|
36
|
+
- COVERAGE: 94.39% -- 4038/4278 lines in 26 files
|
|
37
|
+
- BRANCH COVERAGE: 78.93% -- 1663/2107 branches in 26 files
|
|
38
|
+
- 79.89% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Typo in markdown link
|
|
43
|
+
- Handling of pre-existing gemfile
|
|
44
|
+
|
|
33
45
|
## [1.1.47] - 2025-11-06
|
|
34
46
|
|
|
35
47
|
- TAG: [v1.1.47][1.1.47t]
|
|
@@ -1283,7 +1295,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1283
1295
|
- Selecting will run the selected workflow via `act`
|
|
1284
1296
|
- This may move to its own gem in the future.
|
|
1285
1297
|
|
|
1286
|
-
[Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v1.1.
|
|
1298
|
+
[Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v1.1.48...HEAD
|
|
1299
|
+
[1.1.48]: https://github.com/kettle-rb/kettle-dev/compare/v1.1.47...v1.1.48
|
|
1300
|
+
[1.1.48t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v1.1.48
|
|
1287
1301
|
[1.1.47]: https://github.com/kettle-rb/kettle-dev/compare/v1.1.46...v1.1.47
|
|
1288
1302
|
[1.1.47t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v1.1.47
|
|
1289
1303
|
[1.1.46]: https://github.com/kettle-rb/kettle-dev/compare/v1.1.45...v1.1.46
|
data/README.md
CHANGED
|
@@ -964,10 +964,10 @@ Thanks for RTFM. ☺️
|
|
|
964
964
|
[📌changelog]: CHANGELOG.md
|
|
965
965
|
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
|
966
966
|
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
|
|
967
|
-
[📌gitmoji]:https://gitmoji.dev
|
|
967
|
+
[📌gitmoji]: https://gitmoji.dev
|
|
968
968
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
969
969
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
970
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.
|
|
970
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.278-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
971
971
|
[🔐security]: SECURITY.md
|
|
972
972
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
973
973
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/README.md.example
CHANGED
|
@@ -542,10 +542,10 @@ Thanks for RTFM. ☺️
|
|
|
542
542
|
[📌changelog]: CHANGELOG.md
|
|
543
543
|
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
|
544
544
|
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
|
|
545
|
-
[📌gitmoji]:https://gitmoji.dev
|
|
545
|
+
[📌gitmoji]: https://gitmoji.dev
|
|
546
546
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
547
547
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
548
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.
|
|
548
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.278-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
549
549
|
[🔐security]: SECURITY.md
|
|
550
550
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
551
551
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/README.md.no-osc.example
CHANGED
|
@@ -508,7 +508,7 @@ Thanks for RTFM. ☺️
|
|
|
508
508
|
[📌changelog]: CHANGELOG.md
|
|
509
509
|
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
|
510
510
|
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
|
|
511
|
-
[📌gitmoji]:https://gitmoji.dev
|
|
511
|
+
[📌gitmoji]: https://gitmoji.dev
|
|
512
512
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
513
513
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
514
514
|
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.076-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
data/Rakefile.example
CHANGED
|
@@ -353,9 +353,84 @@ module Kettle
|
|
|
353
353
|
end
|
|
354
354
|
end
|
|
355
355
|
|
|
356
|
-
#
|
|
356
|
+
# --- Handle `source` replacement/insertion ---
|
|
357
|
+
src_source_line = nil
|
|
358
|
+
src_content.each_line do |ln|
|
|
359
|
+
next if ln.strip.start_with?("#")
|
|
360
|
+
if ln =~ /^\s*source\s+['"][^'"]+['"]\s*$/
|
|
361
|
+
src_source_line = ln.rstrip + "\n"
|
|
362
|
+
break
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
dest_lines = dest_content.lines.dup
|
|
367
|
+
|
|
368
|
+
if src_source_line
|
|
369
|
+
dest_source_idx = dest_lines.index do |ln|
|
|
370
|
+
!ln.strip.start_with?("#") && ln =~ /^\s*source\s+['"][^'"]+['"]\s*$/
|
|
371
|
+
end
|
|
372
|
+
if dest_source_idx
|
|
373
|
+
dest_lines[dest_source_idx] = src_source_line
|
|
374
|
+
else
|
|
375
|
+
# Insert after any leading contiguous comment/blank block at top of file
|
|
376
|
+
insert_idx = 0
|
|
377
|
+
while insert_idx < dest_lines.length && (dest_lines[insert_idx].strip.empty? || dest_lines[insert_idx].lstrip.start_with?("#"))
|
|
378
|
+
insert_idx += 1
|
|
379
|
+
end
|
|
380
|
+
dest_lines.insert(insert_idx, src_source_line)
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# --- Handle `git_source` replacement/insertion ---
|
|
385
|
+
# Collect non-comment git_source lines from source (preserve order)
|
|
386
|
+
src_git_lines = src_content.each_line.select { |ln| !ln.strip.start_with?("#") && ln =~ /^\s*git_source\s*\(/ }
|
|
387
|
+
if src_git_lines.any?
|
|
388
|
+
# Insert new git_source lines in the same order as they appear in the source
|
|
389
|
+
# When inserting (not replacing), place them immediately after the source line if present
|
|
390
|
+
insert_after_source_idx = dest_lines.index { |ln| !ln.strip.start_with?("#") && ln =~ /^\s*source\s+['"][^'"]+['"]\s*$/ }
|
|
391
|
+
|
|
392
|
+
# Iterate source git lines in reverse for insertion so order is preserved when inserting at same index
|
|
393
|
+
src_git_lines.reverse_each do |gln|
|
|
394
|
+
# Attempt to extract the git_source "name" (handles forms like git_source(:github) or git_source :github)
|
|
395
|
+
name_match = gln.match(/^\s*git_source\s*\(?\s*:?(\w+)\b/)
|
|
396
|
+
name = name_match ? name_match[1].to_s : nil
|
|
397
|
+
|
|
398
|
+
replaced = false
|
|
399
|
+
if name
|
|
400
|
+
# Try to find a git_source in destination with the same name
|
|
401
|
+
dest_same_idx = dest_lines.index do |dln|
|
|
402
|
+
!dln.strip.start_with?("#") && dln =~ /^\s*git_source\s*\(?\s*:?#{Regexp.escape(name)}\b/
|
|
403
|
+
end
|
|
404
|
+
if dest_same_idx
|
|
405
|
+
dest_lines[dest_same_idx] = gln.rstrip + "\n"
|
|
406
|
+
replaced = true
|
|
407
|
+
end
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
unless replaced
|
|
411
|
+
# If destination has a github git_source, replace that
|
|
412
|
+
dest_github_idx = dest_lines.index do |dln|
|
|
413
|
+
!dln.strip.start_with?("#") && dln =~ /^\s*git_source\s*\(?\s*:?github\b/
|
|
414
|
+
end
|
|
415
|
+
if dest_github_idx
|
|
416
|
+
dest_lines[dest_github_idx] = gln.rstrip + "\n"
|
|
417
|
+
else
|
|
418
|
+
# Insert below the source line if present, otherwise at top (after comments)
|
|
419
|
+
insert_idx =
|
|
420
|
+
if insert_after_source_idx
|
|
421
|
+
insert_after_source_idx + 1
|
|
422
|
+
else
|
|
423
|
+
0
|
|
424
|
+
end
|
|
425
|
+
dest_lines.insert(insert_idx, gln.rstrip + "\n")
|
|
426
|
+
end
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# Index existing gems in destination (after potential source/git_source changes)
|
|
357
432
|
dest_gems = {}
|
|
358
|
-
|
|
433
|
+
dest_lines.join.each_line do |ln|
|
|
359
434
|
next if ln.strip.start_with?("#")
|
|
360
435
|
if (m = ln.match(gem_re))
|
|
361
436
|
dest_gems[m[1]] = true
|
|
@@ -363,12 +438,17 @@ module Kettle
|
|
|
363
438
|
end
|
|
364
439
|
|
|
365
440
|
missing = src_gems.keys.reject { |n| dest_gems.key?(n) }
|
|
366
|
-
return
|
|
441
|
+
# If nothing to change, return original destination content
|
|
442
|
+
if missing.empty? && src_source_line.nil? && src_git_lines.empty?
|
|
443
|
+
return dest_content
|
|
444
|
+
end
|
|
367
445
|
|
|
368
|
-
out =
|
|
446
|
+
out = dest_lines.join
|
|
369
447
|
out << "\n" unless out.end_with?("\n") || out.empty?
|
|
370
|
-
|
|
371
|
-
|
|
448
|
+
if missing.any?
|
|
449
|
+
out << missing.map { |n| src_gems[n] }.join("\n")
|
|
450
|
+
out << "\n"
|
|
451
|
+
end
|
|
372
452
|
out
|
|
373
453
|
rescue StandardError => e
|
|
374
454
|
Kettle::Dev.debug_error(e, __method__)
|
data/lib/kettle/dev/version.rb
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: 1.1.
|
|
4
|
+
version: 1.1.48
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -396,10 +396,10 @@ licenses:
|
|
|
396
396
|
- MIT
|
|
397
397
|
metadata:
|
|
398
398
|
homepage_uri: https://kettle-dev.galtzo.com/
|
|
399
|
-
source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v1.1.
|
|
400
|
-
changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v1.1.
|
|
399
|
+
source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v1.1.48
|
|
400
|
+
changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v1.1.48/CHANGELOG.md
|
|
401
401
|
bug_tracker_uri: https://github.com/kettle-rb/kettle-dev/issues
|
|
402
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/1.1.
|
|
402
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/1.1.48
|
|
403
403
|
funding_uri: https://github.com/sponsors/pboling
|
|
404
404
|
wiki_uri: https://github.com/kettle-rb/kettle-dev/wiki
|
|
405
405
|
news_uri: https://www.railsbling.com/tags/kettle-dev
|
metadata.gz.sig
CHANGED
|
Binary file
|