kettle-test 2.0.0 → 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: cbe1eaa80cb9dd058c0a15bc97eea4001724c2394f0de93861b91cdc84418db7
4
- data.tar.gz: d28455bcee4ebf4d7cd9ab938486fc25a9da69c77951e7c5fd46aa5702c95375
3
+ metadata.gz: 6e49bb99b463b7e54e6dfb292a94651737aa8fab7bea6ae8c944d0bde946f68f
4
+ data.tar.gz: '0860f573c33a3a576c9bdb75d63c71ed76efe1183ab749f4c66d5798ad325208'
5
5
  SHA512:
6
- metadata.gz: 3656368bcccf8c36c9471c91e76c4efeb53cd6fdc730f1f29b41ad2459a234da79994d83e214b22c25b76876e4666df75d37ee739135c0f2a74ef43a55501813
7
- data.tar.gz: 74e563353e366a54a7963487f30e2fc7ff63f0361ac301c7cca8e3846988e8fc4debe464225df8297f5a8e651d658284ffc497e3c9f9fbb9eba865ac3ad9ccf3
6
+ metadata.gz: 807c6a6eeb21e7ff5a6c8cdd5314bcb4a33cc1dd16e0071f6104e435bb19b189af1f17243533255b12ed7a1ba90f17a513c5935a0be39235f5ba294f0d7c14ff
7
+ data.tar.gz: 7c54752858ec41862fd60d1f743e0cd905c38158faf17ffc0da58a2a422b36be001904da92d4756e07eab9e0db3e63bfe419ea787790b2c276c0d78a7896a3f3
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -22,9 +22,6 @@ Please file a bug if you notice a violation of semantic versioning.
22
22
 
23
23
  ### Changed
24
24
 
25
- - Dropped support for Ruby 2.3 because `turbo_tests2` is now a runtime
26
- dependency and requires Ruby 2.4 or newer.
27
-
28
25
  ### Deprecated
29
26
 
30
27
  ### Removed
@@ -33,6 +30,51 @@ Please file a bug if you notice a violation of semantic versioning.
33
30
 
34
31
  ### Security
35
32
 
33
+ ## [2.0.2] - 2026-06-01
34
+
35
+ - TAG: [v2.0.2][2.0.2t]
36
+ - COVERAGE: 100.00% -- 91/91 lines in 15 files
37
+ - BRANCH COVERAGE: 100.00% -- 2/2 branches in 15 files
38
+ - 90.00% documented
39
+
40
+ ### Changed
41
+
42
+ - Retemplated project files with the current kettle-jem template, including the
43
+ StructuredMerge config migration, generated workflow updates, README logo
44
+ refresh, and updated development dependency floors.
45
+ - Updated the runtime `turbo_tests2` dependency to require v3.1.0 or newer.
46
+
47
+ ### Fixed
48
+
49
+ - `kettle-test` now resolves Appraisal gemfiles under `gemfiles/` back to the
50
+ project root before running specs, so coverage and log artifacts stay under
51
+ root-level `coverage/` and `tmp/` instead of being written inside `gemfiles/`.
52
+
53
+ ## [2.0.1] - 2026-05-25
54
+
55
+ - TAG: [v2.0.1][2.0.1t]
56
+ - COVERAGE: 100.00% -- 91/91 lines in 15 files
57
+ - BRANCH COVERAGE: 100.00% -- 2/2 branches in 15 files
58
+ - 90.00% documented
59
+
60
+ ### Changed
61
+
62
+ - Refreshed generated project templates and CI workflows.
63
+ - Refreshed project templating and generated documentation after the 2.0.0
64
+ release.
65
+ - Pruned generated binstubs to the current curated kettle-jem set.
66
+ - Updated local modular Gemfile sibling wiring for coverage, documentation, and templating.
67
+ - Updated the coverage bundle to require `kettle-soup-cover` 1.1.3 or newer.
68
+
69
+ ### Fixed
70
+
71
+ - `kettle-test` now invokes `kettle-soup-cover`'s turbo coverage setup and
72
+ cleanup APIs directly around the default `turbo_tests2` runner, so collated
73
+ coverage artifacts are published even when the host Rakefile does not load the
74
+ optional turbo coverage rake tasks.
75
+ - `kettle-test --help` now prints usage and exits without creating
76
+ `tmp/kettle-test` logs or invoking the configured test runner.
77
+
36
78
  ## [2.0.0] - 2026-05-23
37
79
 
38
80
  - TAG: [v2.0.0][2.0.0t]
@@ -61,6 +103,8 @@ Please file a bug if you notice a violation of semantic versioning.
61
103
  current kettle-jem full template.
62
104
  - Changed the project license metadata and generated license files to
63
105
  `AGPL-3.0-only`.
106
+ - Dropped support for Ruby 2.3 because `turbo_tests2` is now a runtime
107
+ dependency and requires Ruby 2.4 or newer.
64
108
 
65
109
  ## [1.0.10] - 2026-02-06
66
110
 
@@ -232,7 +276,11 @@ Please file a bug if you notice a violation of semantic versioning.
232
276
  - silent_stream
233
277
  - timecop-rspec
234
278
 
235
- [Unreleased]: https://github.com/kettle-rb/kettle-test/compare/v2.0.0...HEAD
279
+ [Unreleased]: https://github.com/kettle-rb/kettle-test/compare/v2.0.2...HEAD
280
+ [2.0.2]: https://github.com/kettle-rb/kettle-test/compare/v2.0.1...v2.0.2
281
+ [2.0.2t]: https://github.com/kettle-rb/kettle-test/releases/tag/v2.0.2
282
+ [2.0.1]: https://github.com/kettle-rb/kettle-test/compare/v2.0.0...v2.0.1
283
+ [2.0.1t]: https://github.com/kettle-rb/kettle-test/releases/tag/v2.0.1
236
284
  [2.0.0]: https://github.com/kettle-rb/kettle-test/compare/v1.0.10...v2.0.0
237
285
  [2.0.0t]: https://github.com/kettle-rb/kettle-test/releases/tag/v2.0.0
238
286
  [1.0.10]: https://github.com/kettle-rb/kettle-test/compare/v1.0.9...v1.0.10
data/CONTRIBUTING.md CHANGED
@@ -50,6 +50,22 @@ There are many Rake tasks available as well. You can see them by running:
50
50
  bin/rake -T
51
51
  ```
52
52
 
53
+ ## Code quality checks
54
+
55
+ Run the Reek task when you want a smell check that fails on current findings:
56
+
57
+ ```shell
58
+ bin/rake reek
59
+ ```
60
+
61
+ Refresh the checked-in `REEK` backlog through the rake task, not by redirecting
62
+ the raw `reek` executable output. The rake task uses the project bundle and
63
+ avoids stale generated binstubs shadowing the Reek gem executable:
64
+
65
+ ```shell
66
+ bin/rake reek:update
67
+ ```
68
+
53
69
  ## Environment Variables for Local Development
54
70
 
55
71
  Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
@@ -86,11 +102,32 @@ Git hooks and commit message helpers (exe/kettle-commit-msg)
86
102
  - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
87
103
  - GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
88
104
 
105
+ Git diff driver setup
106
+ - Local setup writes repository `.gitattributes` entries and local Git `diff.smorg-*` command config so this checkout uses StructuredMerge semantic diffs.
107
+ - Global setup registers `diff.smorg-*` commands once in the user Git config; use it when you work across several StructuredMerge-enabled repositories.
108
+ - Include-file setup writes `.git/smorg/config` and includes it from local Git config, keeping command registrations out of the repository files.
109
+ - Git hosting forges generally ignore external diff drivers, so pull request views may still show raw textual diffs even when local `git diff` uses semantic drivers.
110
+
111
+ ```console
112
+ K_JEM_TEMPLATING=true bundle exec kettle-jem install
113
+ ```
114
+
115
+ Troubleshooting Git diffs
116
+ - Use `git diff --no-ext-diff` to compare against Git's built-in diff output.
117
+ - Use `git diff --no-textconv` when a textconv projection obscures the raw file bytes you need to inspect.
118
+ - If Git reports a missing `smorg-*` executable, rerun `bundle install` and the setup command above, then check `git config --local --get-regexp '^diff\.smorg-'`.
119
+ - To remove managed local entries, run `K_JEM_TEMPLATING=true bundle exec kettle-jem install --undo`; remove global command registrations with `git config --global --unset-all diff.smorg-ruby.command`.
120
+
89
121
  For a quick starting point, this repository’s `mise.toml` defines the shared defaults, and `.env.local` can override them locally. Copy `.env.local.example` to `.env.local`, use `KEY=value` lines, and either activate `mise` in your shell or run commands through `mise exec -C /path/to/project -- ...`.
90
122
 
91
123
  ## Appraisals
92
124
 
93
125
  From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
126
+ Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
127
+ in `.structuredmerge/kettle-jem.yml`; this project was templated with `ruby.test_minimum: 2.4`.
128
+ That value describes the lowest Ruby version expected to run the test/development
129
+ toolchain, and it may be higher than the gemspec runtime floor.
130
+
94
131
  They are created and updated with the commands:
95
132
 
96
133
  ```console
data/README.md CHANGED
@@ -1,17 +1,10 @@
1
- [![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-floss-i]][🖼️galtzo-floss] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][🖼️ruby-lang-i]][🖼️ruby-lang] [![kettle-rb Logo by Aboling0, CC BY-SA 4.0][🖼️kettle-rb-i]][🖼️kettle-rb]
2
-
3
- [🖼️galtzo-floss-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg
4
- [🖼️galtzo-floss]: https://discord.gg/3qme4XHNKN
5
- [🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
6
- [🖼️ruby-lang]: https://www.ruby-lang.org/
7
- [🖼️kettle-rb-i]: https://logos.galtzo.com/assets/images/kettle-rb/avatar-192px.svg
8
- [🖼️kettle-rb]: https://github.com/kettle-rb
1
+ <a href="https://github.com/kettle-rb"><img alt="kettle-rb Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-rb/avatar-128px.svg" width="14%" align="right"/></a>
9
2
 
10
3
  # 🍲 Kettle::Test
11
4
 
12
- [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: AGPL-3.0-only OR PolyForm-Small-Business-1.0.0][📄license-img]][📄license] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL]
5
+ [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: AGPL-3.0-only OR PolyForm-Small-Business-1.0.0][📄license-img]][📄license] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf]
13
6
 
14
- `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-floss], as I may have missed the [discord notification][🖼️galtzo-floss].
7
+ `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][✉️discord-invite], as I may have missed the [discord notification][✉️discord-invite].
15
8
 
16
9
  ---
17
10
 
@@ -26,7 +19,7 @@ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-ta
26
19
 
27
20
  </details>
28
21
 
29
- ## 🌻 Synopsis
22
+ ## 🌻 Synopsis <a href="https://discord.gg/3qme4XHNKN"><img alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg" width="8%" align="right"/></a> <a href="https://ruby-toolbox.com"><img alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5" src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg" width="8%" align="right"/></a>
30
23
 
31
24
  Add to your `spec/spec_helper.rb`:
32
25
 
@@ -78,6 +71,10 @@ and concordant releases of JRuby, and TruffleRuby.
78
71
  ### Compatibility
79
72
 
80
73
  Compatible with MRI Ruby 2.4.0+, and concordant releases of JRuby, and TruffleRuby.
74
+ CI workflows and Appraisals are generated for MRI Ruby 2.4+.
75
+ This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
76
+ may be higher than the gem's runtime compatibility floor when legacy Rubies are
77
+ not practical for the current toolchain.
81
78
 
82
79
  | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
83
80
  |------------------------------------------------|--------------------------------------------------------|
@@ -404,7 +401,7 @@ RSpec.describe("version-specific behavior") do
404
401
  it "pends for MRI >= 2.6.0 and <= 3.0.0" do
405
402
  pending_for(
406
403
  engine: :ruby,
407
- versions: (Gem::Version.new("2.6.0")..Gem::Version.new("3.0.0")),
404
+ versions: (Gem::Version.new("2.6.0")..Gem::Version.new("3.0.0"))
408
405
  )
409
406
  end
410
407
 
@@ -412,7 +409,7 @@ RSpec.describe("version-specific behavior") do
412
409
  it "skips for MRI >= 3.1.0 and < 3.3.0" do
413
410
  skip_for(
414
411
  engine: :ruby,
415
- versions: (Gem::Version.new("3.1.0")...Gem::Version.new("3.3.0")),
412
+ versions: (Gem::Version.new("3.1.0")...Gem::Version.new("3.3.0"))
416
413
  )
417
414
  end
418
415
 
@@ -435,7 +432,7 @@ RSpec.configure do |config|
435
432
  config.before(:each, :requires_ruby_32) do
436
433
  skip_for(
437
434
  reason: "Requires Ruby >= 3.2",
438
- versions: %w[2.7 3.0 3.1],
435
+ versions: %w[2.7 3.0 3.1]
439
436
  )
440
437
  end
441
438
  end
@@ -548,7 +545,7 @@ For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with
548
545
  For example:
549
546
 
550
547
  ```ruby
551
- spec.add_dependency("kettle-test", "~> 0.0")
548
+ spec.add_dependency("kettle-test", "~> 2.0")
552
549
  ```
553
550
 
554
551
  <details markdown="1">
@@ -603,6 +600,8 @@ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
603
600
 
604
601
  ### Please give the project a star ⭐ ♥.
605
602
 
603
+ Many parts of this project are actively managed by a [kettle-jem](https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/kettle-jem) smart template utilizing [StructuredMerge.org](https://structuredmerge.org) merge contracts.
604
+
606
605
  Thanks for RTFM. ☺️
607
606
 
608
607
  [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
@@ -705,8 +704,6 @@ Thanks for RTFM. ☺️
705
704
  [🏀codecovi]: https://codecov.io/gh/kettle-rb/kettle-test/graph/badge.svg
706
705
  [🏀coveralls]: https://coveralls.io/github/kettle-rb/kettle-test?branch=main
707
706
  [🏀coveralls-img]: https://coveralls.io/repos/github/kettle-rb/kettle-test/badge.svg?branch=main
708
- [🖐codeQL]: https://github.com/kettle-rb/kettle-test/security/code-scanning
709
- [🖐codeQL-img]: https://github.com/kettle-rb/kettle-test/actions/workflows/codeql-analysis.yml/badge.svg
710
707
  [🚎ruby-2.4-wf]: https://github.com/kettle-rb/kettle-test/actions/workflows/ruby-2.4.yml
711
708
  [🚎ruby-2.5-wf]: https://github.com/kettle-rb/kettle-test/actions/workflows/ruby-2.5.yml
712
709
  [🚎ruby-2.6-wf]: https://github.com/kettle-rb/kettle-test/actions/workflows/ruby-2.6.yml
@@ -773,7 +770,7 @@ Thanks for RTFM. ☺️
773
770
  [🤝cb-pulls]: https://codeberg.org/kettle-rb/kettle-test/pulls
774
771
  [🤝cb-donate]: https://donate.codeberg.org/
775
772
  [🤝contributing]: https://github.com/kettle-rb/kettle-test/blob/main/CONTRIBUTING.md
776
- [🏀codecov-g]: https://codecov.io/gh/kettle-rb/kettle-test/graphs/tree.svg
773
+ [🏀codecov-g]: https://codecov.io/gh/kettle-rb/kettle-test/graph/badge.svg
777
774
  [🖐contrib-rocks]: https://contrib.rocks
778
775
  [🖐contributors]: https://github.com/kettle-rb/kettle-test/graphs/contributors
779
776
  [🖐contributors-img]: https://contrib.rocks/image?repo=kettle-rb/kettle-test
@@ -791,7 +788,7 @@ Thanks for RTFM. ☺️
791
788
  [📌gitmoji]: https://gitmoji.dev
792
789
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
793
790
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
794
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-5.053-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
791
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.091-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
795
792
  [🔐security]: https://github.com/kettle-rb/kettle-test/blob/main/SECURITY.md
796
793
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
797
794
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -800,6 +797,7 @@ Thanks for RTFM. ☺️
800
797
  [📄license-img]: https://img.shields.io/badge/License-AGPL--3.0--only_OR_PolyForm--Small--Business--1.0.0-259D6C.svg
801
798
  [📄license-compat]: https://www.apache.org/legal/resolved.html#category-x
802
799
  [📄license-compat-img]: https://img.shields.io/badge/Apache_Incompatible:_Category_X-✗-C0392B.svg?style=flat&logo=Apache
800
+
803
801
  [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
804
802
  [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
805
803
  [🚎yard-current]: http://rubydoc.info/gems/kettle-test
@@ -818,7 +816,7 @@ Thanks for RTFM. ☺️
818
816
  | Package | kettle-test |
819
817
  | Description | 🍲 Kettle::Test is a meta tool from kettle-rb to streamline testing. Acts as a shim dependency, pulling in many other dependencies, to give you OOTB productivity with a RubyGem, or Ruby app project. Configures RSpec w/ syntactic sugar to make writing tests, and testing more scenarios, easier.Configures each dependency library for proper use in the test suite, so they arrive ready to go. Fund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev |
820
818
  | Homepage | https://github.com/kettle-rb/kettle-test |
821
- | Source | https://github.com/kettle-rb/kettle-test |
819
+ | Source | https://github.com/kettle-rb/kettle-test/tree/v2.0.1 |
822
820
  | License | `AGPL-3.0-only` OR `PolyForm-Small-Business-1.0.0` |
823
821
  | Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/kettle-rb, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/kettle-test, https://www.buymeacoffee.com/pboling |
824
822
  <!-- kettle-jem:metadata:end -->
data/exe/kettle-test.sh CHANGED
@@ -31,6 +31,43 @@
31
31
  #
32
32
  set -euo pipefail
33
33
 
34
+ # ── Help ─────────────────────────────────────────────────────────────────────
35
+
36
+ for arg in "$@"; do
37
+ case "$arg" in
38
+ -h|--help)
39
+ cat <<'HELP'
40
+ Usage:
41
+ bundle exec kettle-test [SPEC_ARGS...]
42
+
43
+ Runs RSpec through the configured runner and prints a compact summary.
44
+
45
+ By default this uses:
46
+ bundle exec turbo_tests2
47
+
48
+ Set KETTLE_TEST_RUNNER=rspec to force direct RSpec execution.
49
+
50
+ Options:
51
+ -h, --help Show this help and exit without running specs.
52
+
53
+ Environment:
54
+ KETTLE_TEST_RUNNER turbo_tests2, turbo, or rspec
55
+ KETTLE_TEST_TURBO_PROCESSES Passed to turbo_tests2 -n
56
+ KETTLE_TEST_TURBO_RUNTIME_LOG Passed to turbo_tests2 --runtime-log
57
+ KETTLE_TEST_TURBO_NICE Set true to pass turbo_tests2 --nice
58
+ K_SOUP_COV_DO Set true to enable coverage
59
+ K_SOUP_COV_MIN_HARD Set true to hard-fail on coverage thresholds
60
+
61
+ Examples:
62
+ bundle exec kettle-test
63
+ bundle exec kettle-test spec/my_spec.rb
64
+ K_SOUP_COV_DO=true bundle exec kettle-test
65
+ HELP
66
+ exit 0
67
+ ;;
68
+ esac
69
+ done
70
+
34
71
  # ── Helpers ──────────────────────────────────────────────────────────────────
35
72
 
36
73
  RED='\033[0;31m'
@@ -43,13 +80,33 @@ RESET='\033[0m'
43
80
  hr() { printf '%s\n' "────────────────────────────────────────────────────────────────"; }
44
81
 
45
82
  # ── Project root ──────────────────────────────────────────────────────────────
46
- # When run via `bundle exec`, BUNDLE_GEMFILE points to the project's Gemfile.
47
- # Fall back to the current working directory.
83
+ # When run via `bundle exec`, BUNDLE_GEMFILE can point at an Appraisal gemfile
84
+ # under gemfiles/. Walk upward to the real project root so relative paths such
85
+ # as coverage/ and tmp/ are never anchored under gemfiles/.
86
+
87
+ find_project_root() {
88
+ local dir="$1"
89
+
90
+ dir="$(cd "$dir" && pwd)"
91
+ while [ "$dir" != "/" ]; do
92
+ if compgen -G "$dir/*.gemspec" >/dev/null ||
93
+ [ -f "$dir/Appraisal.root.gemfile" ] ||
94
+ [ -f "$dir/Gemfile" ] ||
95
+ [ -d "$dir/.git" ]; then
96
+ printf '%s\n' "$dir"
97
+ return 0
98
+ fi
99
+
100
+ dir="$(dirname "$dir")"
101
+ done
102
+
103
+ pwd
104
+ }
48
105
 
49
106
  if [ -n "${BUNDLE_GEMFILE:-}" ]; then
50
- PROJECT_ROOT="$(cd "$(dirname "$BUNDLE_GEMFILE")" && pwd)"
107
+ PROJECT_ROOT="$(find_project_root "$(dirname "$BUNDLE_GEMFILE")")"
51
108
  else
52
- PROJECT_ROOT="$(pwd)"
109
+ PROJECT_ROOT="$(find_project_root "$(pwd)")"
53
110
  fi
54
111
 
55
112
  LOG_DIR="$PROJECT_ROOT/tmp/kettle-test"
@@ -58,6 +115,16 @@ TIMESTAMP="$(date -u +%Y%m%d-%H%M%S)"
58
115
  RUNNER="${KETTLE_TEST_RUNNER:-turbo_tests2}"
59
116
  LOG_FILE="$LOG_DIR/${RUNNER}-${TIMESTAMP}-$$.log"
60
117
 
118
+ run_kettle_soup_cover_hook() {
119
+ local hook="$1"
120
+
121
+ if [ "${K_SOUP_COV_DO:-false}" != "true" ]; then
122
+ return 0
123
+ fi
124
+
125
+ bundle exec ruby -e "begin; require 'kettle/soup/cover'; Kettle::Soup::Cover.${hook} if Kettle::Soup::Cover.turbo_tests_coverage?; rescue LoadError; end"
126
+ }
127
+
61
128
  # ── Run specs ─────────────────────────────────────────────────────────────────
62
129
  # Run via Bundler so the project's own Gemfile is always used.
63
130
  # We tee to the log so the full output is preserved even if the user interrupts.
@@ -68,6 +135,7 @@ cd "$PROJECT_ROOT"
68
135
  case "$RUNNER" in
69
136
  turbo|turbo_tests2)
70
137
  export PARALLEL_TEST_FIRST_IS_1="${PARALLEL_TEST_FIRST_IS_1:-true}"
138
+ run_kettle_soup_cover_hook "clear_turbo_tests_coverage_dir!"
71
139
  command=(bundle exec turbo_tests2)
72
140
  if [ -n "${KETTLE_TEST_TURBO_PROCESSES:-}" ]; then
73
141
  command+=(-n "$KETTLE_TEST_TURBO_PROCESSES")
@@ -92,6 +160,12 @@ esac
92
160
 
93
161
  "${command[@]}" 2>&1 | tee "$LOG_FILE" || rspec_exit=$?
94
162
 
163
+ case "$RUNNER" in
164
+ turbo|turbo_tests2)
165
+ run_kettle_soup_cover_hook "collate_turbo_tests_coverage!" 2>&1 | tee -a "$LOG_FILE" || rspec_exit=$?
166
+ ;;
167
+ esac
168
+
95
169
  # ── Parse output ──────────────────────────────────────────────────────────────
96
170
 
97
171
  LOG="$LOG_FILE"
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Test
5
5
  module Version
6
- VERSION = "2.0.0"
6
+ VERSION = "2.0.2"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
@@ -6,4 +6,3 @@ module Kettle
6
6
  VERSION: String
7
7
  end
8
8
  end
9
-
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -205,14 +205,20 @@ dependencies:
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '3.0'
208
+ version: '3.1'
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: 3.1.0
209
212
  type: :runtime
210
213
  prerelease: false
211
214
  version_requirements: !ruby/object:Gem::Requirement
212
215
  requirements:
213
216
  - - "~>"
214
217
  - !ruby/object:Gem::Version
215
- version: '3.0'
218
+ version: '3.1'
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: 3.1.0
216
222
  - !ruby/object:Gem::Dependency
217
223
  name: version_gem
218
224
  requirement: !ruby/object:Gem::Requirement
@@ -240,6 +246,9 @@ dependencies:
240
246
  - - "~>"
241
247
  - !ruby/object:Gem::Version
242
248
  version: '2.0'
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: 2.0.6
243
252
  type: :development
244
253
  prerelease: false
245
254
  version_requirements: !ruby/object:Gem::Requirement
@@ -247,6 +256,9 @@ dependencies:
247
256
  - - "~>"
248
257
  - !ruby/object:Gem::Version
249
258
  version: '2.0'
259
+ - - ">="
260
+ - !ruby/object:Gem::Version
261
+ version: 2.0.6
250
262
  - !ruby/object:Gem::Dependency
251
263
  name: bundler-audit
252
264
  requirement: !ruby/object:Gem::Requirement
@@ -295,26 +307,6 @@ dependencies:
295
307
  - - ">="
296
308
  - !ruby/object:Gem::Version
297
309
  version: 1.0.4
298
- - !ruby/object:Gem::Dependency
299
- name: appraisal2
300
- requirement: !ruby/object:Gem::Requirement
301
- requirements:
302
- - - "~>"
303
- - !ruby/object:Gem::Version
304
- version: '3.0'
305
- - - ">="
306
- - !ruby/object:Gem::Version
307
- version: 3.0.6
308
- type: :development
309
- prerelease: false
310
- version_requirements: !ruby/object:Gem::Requirement
311
- requirements:
312
- - - "~>"
313
- - !ruby/object:Gem::Version
314
- version: '3.0'
315
- - - ">="
316
- - !ruby/object:Gem::Version
317
- version: 3.0.6
318
310
  - !ruby/object:Gem::Dependency
319
311
  name: ruby-progressbar
320
312
  requirement: !ruby/object:Gem::Requirement
@@ -355,20 +347,20 @@ dependencies:
355
347
  requirements:
356
348
  - - "~>"
357
349
  - !ruby/object:Gem::Version
358
- version: '1.0'
350
+ version: '2.0'
359
351
  - - ">="
360
352
  - !ruby/object:Gem::Version
361
- version: 1.0.3
353
+ version: 2.0.1
362
354
  type: :development
363
355
  prerelease: false
364
356
  version_requirements: !ruby/object:Gem::Requirement
365
357
  requirements:
366
358
  - - "~>"
367
359
  - !ruby/object:Gem::Version
368
- version: '1.0'
360
+ version: '2.0'
369
361
  - - ">="
370
362
  - !ruby/object:Gem::Version
371
- version: 1.0.3
363
+ version: 2.0.1
372
364
  description: "\U0001F372 Kettle::Test is a meta tool from kettle-rb to streamline
373
365
  testing. Acts as a shim dependency, pulling in many other dependencies, to give
374
366
  you OOTB productivity with a RubyGem, or Ruby app project. Configures RSpec w/ syntactic
@@ -428,10 +420,10 @@ licenses:
428
420
  - PolyForm-Small-Business-1.0.0
429
421
  metadata:
430
422
  homepage_uri: https://kettle-test.galtzo.com
431
- source_code_uri: https://github.com/kettle-rb/kettle-test/tree/v2.0.0
432
- changelog_uri: https://github.com/kettle-rb/kettle-test/blob/v2.0.0/CHANGELOG.md
423
+ source_code_uri: https://github.com/kettle-rb/kettle-test/tree/v2.0.2
424
+ changelog_uri: https://github.com/kettle-rb/kettle-test/blob/v2.0.2/CHANGELOG.md
433
425
  bug_tracker_uri: https://github.com/kettle-rb/kettle-test/issues
434
- documentation_uri: https://www.rubydoc.info/gems/kettle-test/2.0.0
426
+ documentation_uri: https://www.rubydoc.info/gems/kettle-test/2.0.2
435
427
  funding_uri: https://github.com/sponsors/pboling
436
428
  wiki_uri: https://github.com/kettle-rb/kettle-test/wiki
437
429
  news_uri: https://www.railsbling.com/tags/kettle-test
@@ -460,7 +452,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
460
452
  - !ruby/object:Gem::Version
461
453
  version: '0'
462
454
  requirements: []
463
- rubygems_version: 4.0.11
455
+ rubygems_version: 4.0.10
464
456
  specification_version: 4
465
457
  summary: "\U0001F372 A kettle-rb meta tool to streamline testing"
466
458
  test_files: []
metadata.gz.sig CHANGED
Binary file