kettle-dev 2.0.1 → 2.0.2

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: 423e786ae241791214751d2cd3496033ba0986b4279d738d62feda1eb197837b
4
- data.tar.gz: 7c7436dcf0a65dea2d9241263bfd6d357c64a5f4a1a12432325fb5aecfe2cd38
3
+ metadata.gz: c3bad017c27149d9c7bf639bf70347f639d9301b3ce355c9a20eb7466f959df0
4
+ data.tar.gz: 8c96fb38ea79b64d55d2813725120518e1e3bcf2dda8396c8b2da1e3aa699d23
5
5
  SHA512:
6
- metadata.gz: 2f7e35c2eedd5a7f4b75bd9ce4bfb0e98e269a05694875a6c53311aaab885d5a3d8839283b3ca986cd3b694f1f48b3bc3ed0dc28171decb1e5391ef61b0df0c2
7
- data.tar.gz: abd66bf76d22b3d13303228bf46d22b4fbb7f69c26d0740e54ec6c693f3f31d10b34f9cc4491fb12be0e073777af8ca812d57eb740cd27af65b644bb445bba60
6
+ metadata.gz: 21ad36073bf15fd42f052958148f8129138e4ab79195d524457ba5c29e206fd261f283b9b6616e7a41cc46b6455c27e1d763167f8b8e75655acf2cdaa1a5c713
7
+ data.tar.gz: fcef88758871ad5eb760e0671972c6ef389dd3d9037f5006ddd65d2d07c651c7778a86dd344e86815b37b0451833544ba10ef895db28c6fa5dd0221502013d95
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -22,6 +22,23 @@ Please file a bug if you notice a violation of semantic versioning.
22
22
 
23
23
  ### Changed
24
24
 
25
+ ### Deprecated
26
+
27
+ ### Removed
28
+
29
+ ### Fixed
30
+
31
+ ### Security
32
+
33
+ ## [2.0.2] - 2026-05-27
34
+
35
+ - TAG: [v2.0.2][2.0.2t]
36
+ - COVERAGE: 94.71% -- 2937/3101 lines in 23 files
37
+ - BRANCH COVERAGE: 78.23% -- 1200/1534 branches in 23 files
38
+ - 76.40% documented
39
+
40
+ ### Changed
41
+
25
42
  - **BREAKING**: Raised the minimum Ruby version to 2.4.0, matching
26
43
  `kettle-test` 2.x and its runtime `turbo_tests2` dependency.
27
44
  - `kettle-test` is now declared as a runtime dependency because the shipped rake
@@ -29,14 +46,14 @@ Please file a bug if you notice a violation of semantic versioning.
29
46
  - Refreshed generated template output for README badge formatting and
30
47
  Ruby 2.4-targeted RuboCop LTS style dependencies.
31
48
 
32
- ### Deprecated
33
-
34
49
  ### Removed
35
50
 
36
51
  - Removed Ruby 2.3 and JRuby 9.1 CI workflows and appraisal gemfiles.
37
52
 
38
53
  ### Fixed
39
54
 
55
+ - `ci:act` and release CI monitoring now detect GitHub and GitLab repositories
56
+ when remotes use `git+ssh://` or `ssh://` URLs.
40
57
  - Appraisal-based CI gemfiles now load the version-appropriate VCR/WebMock
41
58
  recording dependencies required by the spec helper without falling back to the
42
59
  root Gemfile.
@@ -49,14 +66,15 @@ Please file a bug if you notice a violation of semantic versioning.
49
66
  poisoning the process exit status.
50
67
  - Coverage CI thresholds now match the repository `mise.toml` thresholds instead
51
68
  of requiring unreachable 100% line and branch coverage.
69
+ - `kettle-changelog` now fails closed when `kettle-test` does not produce the
70
+ expected collated `coverage/coverage.json`, instead of merging worker coverage
71
+ files itself and hiding a coverage integration failure.
52
72
  - Regenerated templating now keeps `kettle-test` as a runtime dependency only
53
73
  instead of duplicating it as both runtime and development dependency.
54
74
  - Replaced non-capturing `=~` checks with `Regexp#match?` so unlocked/style CI
55
75
  stays clean with newer RuboCop performance cops.
56
76
  - Cleared the remaining `rubocop_gradual` backlog and removed the lock file.
57
77
 
58
- ### Security
59
-
60
78
  ## [2.0.1] - 2026-05-25
61
79
 
62
80
  - TAG: [v2.0.1][2.0.1t]
@@ -1745,7 +1763,9 @@ Please file a bug if you notice a violation of semantic versioning.
1745
1763
  - Selecting will run the selected workflow via `act`
1746
1764
  - This may move to its own gem in the future.
1747
1765
 
1748
- [Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.1...HEAD
1766
+ [Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.2...HEAD
1767
+ [2.0.2]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.1...v2.0.2
1768
+ [2.0.2t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.2
1749
1769
  [2.0.1]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.0...v2.0.1
1750
1770
  [2.0.1t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.1
1751
1771
  [2.0.0]: https://github.com/kettle-rb/kettle-dev/compare/v1.2.5...v2.0.0
data/CONTRIBUTING.md CHANGED
@@ -107,6 +107,11 @@ For a quick starting point, this repository’s `mise.toml` defines the shared d
107
107
  ## Appraisals
108
108
 
109
109
  From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
110
+ Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
111
+ in `.kettle-jem.yml`; this project was templated with `ruby.test_minimum: 2.4`.
112
+ That value describes the lowest Ruby version expected to run the test/development
113
+ toolchain, and it may be higher than the gemspec runtime floor.
114
+
110
115
  They are created and updated with the commands:
111
116
 
112
117
  ```console
data/README.md CHANGED
@@ -228,6 +228,10 @@ tree_haver supports multiple parsing backends, but not all backends work on all
228
228
  ### Compatibility
229
229
 
230
230
  Compatible with MRI Ruby 2.4.0+, and concordant releases of JRuby, and TruffleRuby.
231
+ CI workflows and Appraisals are generated for MRI Ruby 2.4+.
232
+ This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
233
+ may be higher than the gem's runtime compatibility floor when legacy Rubies are
234
+ not practical for the current toolchain.
231
235
 
232
236
  | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
233
237
  |------------------------------------------------|--------------------------------------------------------|
@@ -1006,7 +1010,7 @@ Thanks for RTFM. ☺️
1006
1010
  [📌gitmoji]: https://gitmoji.dev
1007
1011
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
1008
1012
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
1009
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-3.068-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1013
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-3.101-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1010
1014
  [🔐security]: https://github.com/kettle-rb/kettle-dev/blob/main/SECURITY.md
1011
1015
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
1012
1016
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -1015,6 +1019,7 @@ Thanks for RTFM. ☺️
1015
1019
  [📄license-img]: https://img.shields.io/badge/License-AGPL--3.0--only-259D6C.svg
1016
1020
  [📄license-compat]: https://www.apache.org/legal/resolved.html#category-x
1017
1021
  [📄license-compat-img]: https://img.shields.io/badge/Apache_Incompatible:_Category_X-%E2%9C%97-C0392B.svg?style=flat&logo=Apache
1022
+
1018
1023
  [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
1019
1024
  [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
1020
1025
  [🚎yard-current]: http://rubydoc.info/gems/kettle-dev
@@ -4,6 +4,7 @@ require "open3"
4
4
  require "json"
5
5
  require "net/http"
6
6
  require "uri"
7
+ require "fileutils"
7
8
 
8
9
  module Kettle
9
10
  module Dev
@@ -525,14 +526,11 @@ module Kettle
525
526
 
526
527
  puts "Coverage generation complete."
527
528
 
528
- # Check if coverage.json was generated
529
- unless File.file?(@coverage_path)
530
- raise "Coverage JSON not found at #{Kettle::Dev.display_path(@coverage_path)} after running bundle exec kettle-test"
531
- end
529
+ ensure_changelog_coverage_json!
532
530
  else
533
531
  # Non-strict mode: check if coverage.json exists, warn if not
534
532
  unless File.file?(@coverage_path)
535
- warn("Coverage JSON not found at #{Kettle::Dev.display_path(@coverage_path)}.")
533
+ warn(coverage_json_missing_message)
536
534
  warn("Run: K_SOUP_COV_FORMATTERS=json bundle exec kettle-test to generate it")
537
535
  return [nil, nil]
538
536
  end
@@ -597,26 +595,43 @@ module Kettle
597
595
  }
598
596
  end
599
597
 
598
+ def ensure_changelog_coverage_json!
599
+ return if File.file?(@coverage_path)
600
+
601
+ raise coverage_json_missing_message
602
+ end
603
+
604
+ def coverage_json_missing_message
605
+ [
606
+ "Coverage JSON not found at #{Kettle::Dev.display_path(@coverage_path)} after running bundle exec kettle-test.",
607
+ "kettle-test runs specs in parallel and is expected to collate parallel SimpleCov results into this canonical file.",
608
+ "If it is missing, coverage was not enabled in ENV config or the rake/task hooks did not load the coverage integration.",
609
+ ].join(" ")
610
+ end
611
+
600
612
  def yard_percent_documented
601
- cmd = File.join(@root, "bin", "rake")
602
- unless File.executable?(cmd)
613
+ commands = yard_documentation_commands
614
+ if commands.empty?
603
615
  if @strict
604
- raise "bin/rake not found or not executable; ensure rake is installed via bundler"
616
+ raise "bin/rake and bin/yard not found or not executable; ensure rake and yard are installed via bundler"
605
617
  else
606
- warn("bin/rake not found or not executable; ensure rake is installed via bundler")
618
+ warn("bin/rake and bin/yard not found or not executable; ensure rake and yard are installed via bundler")
607
619
  return
608
620
  end
609
621
  end
610
622
 
611
623
  begin
612
624
  # Run the canonical docs task to get the documentation percentage.
613
- out, _ = Open3.capture2(cmd, "yard", {chdir: @root})
614
- # Look for a line containing e.g., "95.35% documented"
615
- line = out.lines.find { |l| /\d+(?:\.\d+)?%\s+documented/.match?(l) }
625
+ out = +""
626
+ commands.each do |command|
627
+ prepare_yard_fence_tmp_files if command == [File.join(@root, "bin", "yard")]
628
+ output, _status = Open3.capture2(*command, {chdir: @root})
629
+ out << output
630
+ line = documented_percent_line(output)
631
+ return line if line
632
+ end
616
633
 
617
- if line
618
- line.strip
619
- elsif @strict
634
+ if @strict
620
635
  raise "Could not find documented percentage in bin/rake yard output"
621
636
  else
622
637
  warn("Could not find documented percentage in bin/rake yard output.")
@@ -632,6 +647,38 @@ module Kettle
632
647
  end
633
648
  end
634
649
 
650
+ def yard_documentation_commands
651
+ commands = []
652
+ rake = File.join(@root, "bin", "rake")
653
+ commands << [rake, "yard"] if File.executable?(rake)
654
+ yard = File.join(@root, "bin", "yard")
655
+ commands << [yard] if File.executable?(yard)
656
+ commands
657
+ end
658
+
659
+ def prepare_yard_fence_tmp_files
660
+ yardopts = File.join(@root, ".yardopts")
661
+ return unless File.file?(yardopts)
662
+ return unless File.read(yardopts).include?("tmp/yard-fence")
663
+
664
+ require "yard/fence"
665
+ outdir = File.join(@root, "tmp", "yard-fence")
666
+ FileUtils.rm_rf(outdir)
667
+ FileUtils.mkdir_p(outdir)
668
+ Dir.glob(File.join(@root, Yard::Fence::GLOB_PATTERN)).each do |src|
669
+ next unless File.file?(src)
670
+
671
+ content = File.read(src)
672
+ sanitized = Yard::Fence.sanitize_text(content)
673
+ File.write(File.join(outdir, File.basename(src)), sanitized)
674
+ end
675
+ end
676
+
677
+ def documented_percent_line(output)
678
+ line = output.lines.find { |l| /\d+(?:\.\d+)?%\s+documented/.match?(l) }
679
+ line&.strip
680
+ end
681
+
635
682
  # Transform legacy release headings that include a tag suffix, e.g.:
636
683
  # "## [1.2.3] 2022-08-29 ([tag][1.2.3t])"
637
684
  # into a heading followed by a list item:
@@ -29,19 +29,13 @@ module Kettle
29
29
  end
30
30
 
31
31
  # Parse the GitHub owner/repo from the configured origin remote.
32
- # Supports SSH (git@github.com:owner/repo(.git)) and HTTPS
33
- # (https://github.com/owner/repo(.git)) forms.
32
+ # Supports SSH and HTTPS remote URL forms.
34
33
  # @return [Array(String, String), nil] [owner, repo] or nil when unavailable
35
34
  def repo_info
36
35
  out, status = Open3.capture2("git", "config", "--get", "remote.origin.url")
37
36
  return unless status.success?
38
37
 
39
- url = out.strip
40
- if url =~ %r{git@github.com:(.+?)/(.+?)(\.git)?$}
41
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
42
- elsif url =~ %r{https://github.com/(.+?)/(.+?)(\.git)?$}
43
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
44
- end
38
+ parse_hosted_repo(out.strip, "github.com")
45
39
  end
46
40
 
47
41
  # Current git branch name, or nil when not in a repository.
@@ -160,11 +154,7 @@ module Kettle
160
154
  url = origin_url
161
155
  return unless url
162
156
 
163
- if url =~ %r{git@gitlab.com:(.+?)/(.+?)(\.git)?$}
164
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
165
- elsif url =~ %r{https://gitlab.com/(.+?)/(.+?)(\.git)?$}
166
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
167
- end
157
+ parse_hosted_repo(url, "gitlab.com")
168
158
  end
169
159
 
170
160
  # Default GitLab token from environment
@@ -243,6 +233,29 @@ module Kettle
243
233
  def gitlab_failed?(pipeline)
244
234
  pipeline && pipeline["status"] == "failed"
245
235
  end
236
+
237
+ # Parse owner/repo from common hosted Git remote URL shapes.
238
+ # @param url [String, nil]
239
+ # @param host [String]
240
+ # @return [Array(String, String), nil]
241
+ def parse_hosted_repo(url, host)
242
+ return unless url
243
+
244
+ if url =~ %r{\Agit@#{Regexp.escape(host)}:(.+?)/(.+?)(?:\.git)?\z}
245
+ return [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
246
+ end
247
+
248
+ uri = URI.parse(url)
249
+ return unless uri.host == host
250
+
251
+ path = uri.path.to_s.sub(%r{\A/}, "")
252
+ owner, repo = path.split("/", 2)
253
+ return unless owner && repo && !owner.empty? && !repo.empty?
254
+
255
+ [owner, repo.sub(/\.git\z/, "")]
256
+ rescue URI::InvalidURIError
257
+ nil
258
+ end
246
259
  end
247
260
  end
248
261
  end
@@ -410,15 +410,7 @@ module Kettle
410
410
  module_function :preferred_github_remote
411
411
 
412
412
  def parse_github_owner_repo(url)
413
- return [nil, nil] unless url
414
-
415
- if url =~ %r{git@github.com:(.+?)/(.+?)(\.git)?$}
416
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
417
- elsif url =~ %r{https://github.com/(.+?)/(.+?)(\.git)?$}
418
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
419
- else
420
- [nil, nil]
421
- end
413
+ Kettle::Dev::CIHelpers.parse_hosted_repo(url, "github.com") || [nil, nil]
422
414
  end
423
415
  module_function :parse_github_owner_repo
424
416
  end
@@ -791,15 +791,7 @@ module Kettle
791
791
  end
792
792
 
793
793
  def parse_github_owner_repo(url)
794
- return [nil, nil] unless url
795
-
796
- if url =~ %r{git@github.com:(.+?)/(.+?)(\.git)?$}
797
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
798
- elsif url =~ %r{https://github.com/(.+?)/(.+?)(\.git)?$}
799
- [Regexp.last_match(1), Regexp.last_match(2).sub(/\.git\z/, "")]
800
- else
801
- [nil, nil]
802
- end
794
+ Kettle::Dev::CIHelpers.parse_hosted_repo(url, "github.com") || [nil, nil]
803
795
  end
804
796
 
805
797
  def has_remote?(name)
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Dev
5
5
  module Version
6
- VERSION = "2.0.1"
6
+ VERSION = "2.0.2"
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.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -185,20 +185,20 @@ dependencies:
185
185
  requirements:
186
186
  - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: '1.0'
188
+ version: '2.0'
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: 1.0.3
191
+ version: 2.0.0
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - "~>"
197
197
  - !ruby/object:Gem::Version
198
- version: '1.0'
198
+ version: '2.0'
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: 1.0.3
201
+ version: 2.0.0
202
202
  description: "\U0001F372 Kettle::Dev is a meta tool from kettle-rb to streamline development
203
203
  and testing. Acts as a shim dependency, pulling in many other dependencies, to give
204
204
  you OOTB productivity with a RubyGem, or Ruby app project. Configures a complete
@@ -312,10 +312,10 @@ licenses:
312
312
  - AGPL-3.0-only
313
313
  metadata:
314
314
  homepage_uri: https://kettle-dev.galtzo.com
315
- source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v2.0.1
316
- changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v2.0.1/CHANGELOG.md
315
+ source_code_uri: https://github.com/kettle-rb/kettle-dev/tree/v2.0.2
316
+ changelog_uri: https://github.com/kettle-rb/kettle-dev/blob/v2.0.2/CHANGELOG.md
317
317
  bug_tracker_uri: https://github.com/kettle-rb/kettle-dev/issues
318
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.0.1
318
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.0.2
319
319
  funding_uri: https://github.com/sponsors/pboling
320
320
  wiki_uri: https://github.com/kettle-rb/kettle-dev/wiki
321
321
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file