turbo_tests2 3.0.0 → 3.1.1

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: 914b16e54da50fc47c640b1d19c21a3065cdb6b4e81f39efeda2985a7117ad6c
4
- data.tar.gz: 83ec0433e663c137885b0ca442d6a04b378907f16f847b196946d590a204c513
3
+ metadata.gz: 60ede4cd429a0a25151b01cd9f0bcddbafb8002e048e55b4aef4dbb47d5fa5d8
4
+ data.tar.gz: 7b64b241458249d78ff9b632ecc7679fc5e27620f8f36aea0d1f4170236c9cd9
5
5
  SHA512:
6
- metadata.gz: 5e72db711c9e2a8c89428b8da820405eed60bcc645f0f566622179d2bce6e3541afb5f048955062c5b978e7f26be269b8dfe26a9a899137e14972ef25bb1fdf2
7
- data.tar.gz: 7e40c4aaad85157c5741b7883baae2200e5d5d3c73e4324b8b2e21146c98923d4dc933cb4b981e7b95340ec7b50220e454ce1636220176b7969981f1c69bcd8f
6
+ metadata.gz: a24112e4b8d4280f937aa5b9617cfa6367c4aef082750e819ac76a12681ab596ad8bf2f72c5701833f4efe29e33de89a4eed316422e4b341fb781f2addba3ef5
7
+ data.tar.gz: 34da19c8fbeee18e9541c488c34c8045f8a9ea5f2628b679339c6cbb0160e492fa7b9b21231ca6ecb30685826c27206788d58c6512a4ffc18e7f34728ca625df
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -28,8 +28,81 @@ Please file a bug if you notice a violation of semantic versioning.
28
28
 
29
29
  ### Fixed
30
30
 
31
+ - Worker PID cleanup now uses the `parallel_tests` pid file path captured when the subprocess starts, avoiding JRuby failures after the pid-file environment is restored.
32
+
31
33
  ### Security
32
34
 
35
+ ## [3.1.1] - 2026-06-02
36
+
37
+ - TAG: [v3.1.1][3.1.1t]
38
+ - COVERAGE: 94.63% -- 634/670 lines in 16 files
39
+ - BRANCH COVERAGE: 78.17% -- 111/142 branches in 16 files
40
+ - 36.78% documented
41
+
42
+ ### Fixed
43
+
44
+ - The CLI now honors documented `turbo_tests2:setup` and `turbo_tests2:cleanup`
45
+ Rake hooks, while still falling back to legacy `turbo_tests:*` hooks.
46
+ - Worker processes now receive the full `parallel_tests` environment metadata, so SimpleCov
47
+ defers minimum coverage enforcement to the combined final result instead of checking each
48
+ shard independently.
49
+
50
+ - Restored Ruby 2.4 compatibility for worker wait-thread cleanup.
51
+ - The coverage workflow now runs `kettle-test` through direct RSpec execution,
52
+ so hard coverage thresholds are checked against the complete suite result
53
+ while other gems can still use `turbo_tests2` under `kettle-test`.
54
+
55
+ ## [3.1.0] - 2026-05-28
56
+
57
+ - TAG: [v3.1.0][3.1.0t]
58
+ - COVERAGE: 95.01% -- 609/641 lines in 16 files
59
+ - BRANCH COVERAGE: 77.54% -- 107/138 branches in 16 files
60
+ - 36.78% documented
61
+
62
+ ### Added
63
+
64
+ - `-w` / `--workers` aliases for `-n`, matching the worker-count terminology used by other
65
+ parallel test runners.
66
+ - `turbo_tests2 fan`, a generic worker fan-out command that runs an arbitrary command once per
67
+ worker with `TEST_ENV_NUMBER` and `PARALLEL_TEST_GROUPS` set.
68
+ - `--example-status-log FILE`, which converts RSpec example-status persistence data into a
69
+ `parallel_tests`-compatible runtime log so grouping can use example-level timing history.
70
+
71
+ ### Changed
72
+
73
+ - Worker subprocess JSON now forwards RSpec deprecation notifications to the parent reporter.
74
+ - Worker subprocess JSON now forwards RSpec profile output to the parent reporter.
75
+ - Fail-fast runs now report spec groups that were stopped before execution.
76
+ - Interrupted runs now report spec groups that had not finished before shutdown.
77
+
78
+ ### Fixed
79
+
80
+ - Reconstructed failure backtraces now filter internal `turbo_tests2` frames.
81
+ - Coverage was refreshed by adding focused specs for the new CLI, reporting, formatter, and
82
+ grouping behaviors.
83
+
84
+ - RSpec deprecation notification reconstruction now uses the public `from_hash` API so CI passes
85
+ with RSpec versions where `.new` is private.
86
+ - The shim command result object no longer depends on `Struct#keyword_init`, restoring Ruby 2.4
87
+ compatibility.
88
+ - Backtrace output specs now accept JRuby 9.2's legacy `block in <main>` frame wording.
89
+ - GitHub Actions test jobs now force `kettle-test` to use its direct RSpec runner so coverage
90
+ aggregation remains stable while testing `turbo_tests2` itself.
91
+ - GitHub Actions appraisal jobs now pass explicit parent-directory RSpec paths so direct RSpec
92
+ runs execute the real suite instead of finding zero examples from `gemfiles/`.
93
+ - Spawned-process coverage setup now locates `.simplecov_spawn.rb` from the working directory
94
+ instead of `Bundler.root`, so appraisal gemfiles do not point it at `gemfiles/`.
95
+ - The coverage workflow now uses the same hard coverage thresholds as local development.
96
+ - The dedicated coverage workflow now runs RSpec directly so coverage artifacts are written under
97
+ the repository root for upload steps.
98
+ - Removed the advanced CodeQL workflow because GitHub CodeQL default setup is enabled and rejects
99
+ SARIF uploads from advanced configurations.
100
+
101
+ ### Security
102
+
103
+ - Refreshed pinned GitHub Action SHAs.
104
+ - Added checksums for the `v3.0.0` release artifacts.
105
+
33
106
  ## [3.0.0] - 2026-05-22
34
107
 
35
108
  - TAG: [v3.0.0][3.0.0t]
@@ -41,6 +114,10 @@ Please file a bug if you notice a violation of semantic versioning.
41
114
 
42
115
  - Initial release
43
116
 
44
- [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.0.0...HEAD
117
+ [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.1...HEAD
118
+ [3.1.1]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.0...v3.1.1
119
+ [3.1.1t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.1.1
120
+ [3.1.0]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.0.0...v3.1.0
121
+ [3.1.0t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.1.0
45
122
  [3.0.0]: https://github.com/galtzo-floss/turbo_tests2/compare/7d4064e5b8acc2f53929fccf7be3eb63f8a9f140...v3.0.0
46
123
  [3.0.0t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.0.0
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/LICENSE.md ADDED
@@ -0,0 +1,22 @@
1
+ # License
2
+
3
+ This project is made available under the following license.
4
+ Choose the option that best fits your use case:
5
+
6
+ - [MIT](MIT.md)
7
+
8
+ ## Copyright Notice
9
+
10
+ Copyright (c) 2020-2023 Illia
11
+ Copyright (c) 2020 Ilya Zub
12
+ Copyright (c) 2021 AMHOL
13
+ Copyright (c) 2021 Serge Bedzhyk
14
+ Copyright (c) 2023 Bo Anderson
15
+ Copyright (c) 2023 Dmitiry Zub☀️
16
+ Copyright (c) 2023-2024 Illia
17
+ Copyright (c) 2023 mrudzki
18
+ Copyright (c) 2023-2024 Sebastien Savater
19
+ Copyright (c) 2024 David Rodriguez
20
+ Copyright (c) 2024 Hiroshi SHIBATA
21
+ Copyright (c) 2025-2026 Gareth Jones
22
+ Copyright (c) 2025-2026 Peter H. Boling
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] [![turbo_tests2 Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-floss-turbo_tests2-i]][🖼️galtzo-floss-turbo_tests2]
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
- [🖼️galtzo-floss-turbo_tests2-i]: https://logos.galtzo.com/assets/images/galtzo-floss/turbo_tests2/avatar-192px.svg
8
- [🖼️galtzo-floss-turbo_tests2]: https://github.com/galtzo-floss/turbo_tests2
1
+ <a href="https://github.com/galtzo-floss"><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="12%" align="right"/></a> <a href="https://github.com/galtzo-floss/turbo_tests2"><img alt="turbo_tests2 Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/turbo_tests2/avatar-128px.svg" width="12%" align="right"/></a>
9
2
 
10
3
  # 🚀 TurboTests
11
4
 
12
- [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄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] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
5
+ [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄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] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-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
  | Hard Fork Note |
32
25
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -89,25 +82,15 @@ Finished in 2 minute 25.15 seconds (files took 0 seconds to load)
89
82
  ### Compatibility
90
83
 
91
84
  Compatible with MRI Ruby 2.4.0+, and concordant releases of JRuby, and TruffleRuby.
85
+ CI workflows and Appraisals are generated for MRI Ruby 2.4+.
86
+ This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
87
+ may be higher than the gem's runtime compatibility floor when legacy Rubies are
88
+ not practical for the current toolchain.
92
89
 
93
90
  | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
94
91
  |------------------------------------------------|--------------------------------------------------------|
95
92
  | 👟 Check it out! | ✨ [github.com/appraisal-rb/appraisal2][💎appraisal2] ✨ |
96
93
 
97
- <details markdown="1">
98
- <summary>StructuredMerge package family</summary>
99
-
100
- This gem is part of the StructuredMerge Ruby package family. The implementation inventory, layering model, and backend notes live in the [root package-family guide][sm-family-guide]. Shared behavior is defined by the [StructuredMerge fixtures][sm-family-fixtures] and implemented by the [Go][sm-family-go], [Ruby][sm-family-ruby], [Rust][sm-family-rust], and [TypeScript][sm-family-typescript] repositories.
101
-
102
- </details>
103
-
104
- [sm-family-guide]: https://github.com/structuredmerge/structuredmerge-ruby#package-family
105
- [sm-family-fixtures]: https://github.com/structuredmerge/structuredmerge-fixtures
106
- [sm-family-go]: https://github.com/structuredmerge/structuredmerge-go
107
- [sm-family-ruby]: https://github.com/structuredmerge/structuredmerge-ruby
108
- [sm-family-rust]: https://github.com/structuredmerge/structuredmerge-rust
109
- [sm-family-typescript]: https://github.com/structuredmerge/structuredmerge-typescript
110
-
111
94
  ### Federated DVCS
112
95
 
113
96
  <details markdown="1">
@@ -225,12 +208,12 @@ bundle exec turbo_tests2 -r fuubar -f Fuubar spec/whatever
225
208
 
226
209
  ### Rake Hooks
227
210
 
228
- If Rake is present, the CLI will invoke the tasks `turbo_tests:setup` and `turbo_tests:cleanup` before and after running
211
+ If Rake is present, the CLI will invoke the tasks `turbo_tests2:setup` and `turbo_tests2:cleanup` before and after running
229
212
  the test suite. These can be used to do work that should only happen once, such as removing files or collating coverage:
230
213
 
231
214
  ```ruby
232
215
  # lib/tasks/turbo_tests.rake
233
- namespace :turbo_tests do
216
+ namespace :turbo_tests2 do
234
217
  task setup: :environment do
235
218
  # precompile assets once, to avoid doing it per each process
236
219
  Rake::Tasks["assets:precompile"]
@@ -264,8 +247,8 @@ SimpleCov.start("rails") do
264
247
  formatter SimpleCov::Formatter::SimpleFormatter
265
248
  end
266
249
 
267
- # lib/tasks/turbo_tests.rake
268
- namespace :turbo_tests do
250
+ # lib/tasks/turbo_tests2.rake
251
+ namespace :turbo_tests2 do
269
252
  task setup: :environment do
270
253
  # remove any existing coverage files to avoid false reporting
271
254
  FileUtils.rm_rf("coverage/turbo_tests")
@@ -406,7 +389,7 @@ For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with
406
389
  For example:
407
390
 
408
391
  ```ruby
409
- spec.add_dependency("turbo_tests2", "~> 0.0")
392
+ spec.add_dependency("turbo_tests2", "~> 3.0")
410
393
  ```
411
394
 
412
395
  <details markdown="1">
@@ -436,7 +419,7 @@ See [LICENSE.md][📄license] for the official copyright notice.
436
419
  <details markdown="1">
437
420
  <summary>Copyright holders</summary>
438
421
 
439
- - Copyright (c) 2020-2023, 2025 Illia
422
+ - Copyright (c) 2020-2023 Illia
440
423
  - Copyright (c) 2020 Ilya Zub
441
424
  - Copyright (c) 2021 AMHOL
442
425
  - Copyright (c) 2021 Serge Bedzhyk
@@ -447,7 +430,7 @@ See [LICENSE.md][📄license] for the official copyright notice.
447
430
  - Copyright (c) 2023-2024 Sebastien Savater
448
431
  - Copyright (c) 2024 David Rodriguez
449
432
  - Copyright (c) 2024 Hiroshi SHIBATA
450
- - Copyright (c) 2025 Gareth Jones
433
+ - Copyright (c) 2025-2026 Gareth Jones
451
434
  - Copyright (c) 2025-2026 Peter H. Boling
452
435
 
453
436
  </details>
@@ -471,6 +454,8 @@ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
471
454
 
472
455
  ### Please give the project a star ⭐ ♥.
473
456
 
457
+ 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.
458
+
474
459
  Thanks for RTFM. ☺️
475
460
 
476
461
  [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
@@ -573,8 +558,6 @@ Thanks for RTFM. ☺️
573
558
  [🏀codecovi]: https://codecov.io/gh/galtzo-floss/turbo_tests2/graph/badge.svg
574
559
  [🏀coveralls]: https://coveralls.io/github/galtzo-floss/turbo_tests2?branch=main
575
560
  [🏀coveralls-img]: https://coveralls.io/repos/github/galtzo-floss/turbo_tests2/badge.svg?branch=main
576
- [🖐codeQL]: https://github.com/galtzo-floss/turbo_tests2/security/code-scanning
577
- [🖐codeQL-img]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/codeql-analysis.yml/badge.svg
578
561
  [🚎ruby-2.4-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/ruby-2.4.yml
579
562
  [🚎ruby-2.5-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/ruby-2.5.yml
580
563
  [🚎ruby-2.6-wf]: https://github.com/galtzo-floss/turbo_tests2/actions/workflows/ruby-2.6.yml
@@ -643,7 +626,7 @@ Thanks for RTFM. ☺️
643
626
  [🤝cb-pulls]: https://codeberg.org/galtzo-floss/turbo_tests2/pulls
644
627
  [🤝cb-donate]: https://donate.codeberg.org/
645
628
  [🤝contributing]: https://github.com/galtzo-floss/turbo_tests2/blob/main/CONTRIBUTING.md
646
- [🏀codecov-g]: https://codecov.io/gh/galtzo-floss/turbo_tests2/graphs/tree.svg
629
+ [🏀codecov-g]: https://codecov.io/gh/galtzo-floss/turbo_tests2/graph/badge.svg
647
630
  [🖐contrib-rocks]: https://contrib.rocks
648
631
  [🖐contributors]: https://github.com/galtzo-floss/turbo_tests2/graphs/contributors
649
632
  [🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/turbo_tests2
@@ -661,7 +644,7 @@ Thanks for RTFM. ☺️
661
644
  [📌gitmoji]: https://gitmoji.dev
662
645
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
663
646
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
664
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.555-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
647
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.670-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
665
648
  [🔐security]: https://github.com/galtzo-floss/turbo_tests2/blob/main/SECURITY.md
666
649
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
667
650
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -670,6 +653,7 @@ Thanks for RTFM. ☺️
670
653
  [📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
671
654
  [📄license-compat]: https://www.apache.org/legal/resolved.html#category-a
672
655
  [📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-✓-259D6C.svg?style=flat&logo=Apache
656
+
673
657
  [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
674
658
  [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
675
659
  [🚎yard-current]: http://rubydoc.info/gems/turbo_tests2
@@ -686,9 +670,9 @@ Thanks for RTFM. ☺️
686
670
  | Field | Value |
687
671
  |---|---|
688
672
  | Package | turbo_tests2 |
689
- | Description | 🚀 `turbo_tests2` is a drop-in replacement for `serpapi/turbo_tests` and `grosser/parallel_tests` with incremental summarized output. Source code of `turbo_test2` gem is based on Discourse and Rubygems work in this area (see README file of the source repository). |
673
+ | Description | 🚀 turbo_tests2` is a drop-in replacement for `serpapi/turbo_tests` and `grosser/parallel_tests` with incremental summarized output. Source code of `turbo_test2` gem is based on Discourse and Rubygems work in this area (see README.md). |
690
674
  | Homepage | https://github.com/galtzo-floss/turbo_tests2 |
691
- | Source | https://github.com/galtzo-floss/turbo_tests2 |
675
+ | Source | https://github.com/galtzo-floss/turbo_tests2/tree/v3.1.1 |
692
676
  | License | `MIT` |
693
677
  | Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/galtzo-floss, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/turbo_tests2, https://www.buymeacoffee.com/pboling |
694
678
  <!-- kettle-jem:metadata:end -->
@@ -10,12 +10,14 @@ module TurboTests
10
10
 
11
11
  def run
12
12
  handle_shim_command if shim_command?
13
+ handle_fan_command if fan_command?
13
14
 
14
15
  requires = []
15
16
  formatters = []
16
17
  tags = []
17
18
  count = nil
18
19
  runtime_log = nil
20
+ example_status_log = nil
19
21
  verbose = false
20
22
  fail_fast = nil
21
23
  seed = nil
@@ -39,7 +41,9 @@ module TurboTests
39
41
  Options:
40
42
  BANNER
41
43
 
42
- opts.on("-n [PROCESSES]", Integer, "How many processes to use, default: available CPUs") { |n| count = n }
44
+ opts.on("-n [PROCESSES]", "-w [PROCESSES]", "--workers [PROCESSES]", Integer, "How many processes to use, default: available CPUs") do |n|
45
+ count = n
46
+ end
43
47
 
44
48
  opts.on("-r", "--require PATH", "Require a file.") do |filename|
45
49
  requires << filename
@@ -48,11 +52,11 @@ module TurboTests
48
52
  opts.on(
49
53
  "-f",
50
54
  "--format FORMATTER",
51
- "Choose a formatter. Available formatters: progress (p), documentation (d). Default: progress",
55
+ "Choose a formatter. Available formatters: progress (p), documentation (d). Default: progress"
52
56
  ) do |name|
53
57
  formatters << {
54
58
  name: name,
55
- outputs: [],
59
+ outputs: []
56
60
  }
57
61
  end
58
62
 
@@ -64,7 +68,7 @@ module TurboTests
64
68
  if formatters.empty?
65
69
  formatters << {
66
70
  name: "progress",
67
- outputs: [],
71
+ outputs: []
68
72
  }
69
73
  end
70
74
  formatters.last[:outputs] << filename
@@ -74,6 +78,10 @@ module TurboTests
74
78
  runtime_log = filename
75
79
  end
76
80
 
81
+ opts.on("--example-status-log FILE", "Use RSpec example status persistence timings for grouping") do |filename|
82
+ example_status_log = filename
83
+ end
84
+
77
85
  opts.on("-v", "--verbose", "More output") do
78
86
  verbose = true
79
87
  end
@@ -81,7 +89,7 @@ module TurboTests
81
89
  opts.on("--fail-fast=[N]") do |n|
82
90
  n = begin
83
91
  Integer(n)
84
- rescue StandardError
92
+ rescue
85
93
  nil
86
94
  end
87
95
  fail_fast = (n.nil? || n < 1) ? 1 : n
@@ -113,7 +121,7 @@ module TurboTests
113
121
  if formatters.empty?
114
122
  formatters << {
115
123
  name: "progress",
116
- outputs: [],
124
+ outputs: []
117
125
  }
118
126
  end
119
127
 
@@ -123,7 +131,7 @@ module TurboTests
123
131
 
124
132
  load_rake
125
133
 
126
- invoke_rake_task("turbo_tests:setup")
134
+ invoke_rake_hook("setup")
127
135
 
128
136
  files = @argv.empty? ? ["spec"] : @argv
129
137
  parallel_options = {}
@@ -133,16 +141,17 @@ module TurboTests
133
141
  tags: tags,
134
142
  files: files,
135
143
  runtime_log: runtime_log,
144
+ example_status_log: example_status_log,
136
145
  verbose: verbose,
137
146
  fail_fast: fail_fast,
138
147
  count: count,
139
148
  seed: seed,
140
149
  nice: nice,
141
150
  print_failed_group: print_failed_group,
142
- parallel_options: parallel_options,
151
+ parallel_options: parallel_options
143
152
  )
144
153
 
145
- invoke_rake_task("turbo_tests:cleanup")
154
+ invoke_rake_hook("cleanup")
146
155
 
147
156
  # From https://github.com/galtzo-floss/turbo_tests2/pull/20/
148
157
  exit(exitstatus)
@@ -154,6 +163,43 @@ module TurboTests
154
163
  @argv.first == "shim"
155
164
  end
156
165
 
166
+ def fan_command?
167
+ @argv.first == "fan"
168
+ end
169
+
170
+ def handle_fan_command
171
+ args = @argv.drop(1)
172
+ count = nil
173
+ parser = OptionParser.new do |opts|
174
+ opts.banner = "Usage: turbo_tests2 fan [options] COMMAND [ARGS]"
175
+ opts.on("-n [PROCESSES]", "-w [PROCESSES]", "--workers [PROCESSES]", Integer, "How many processes to use, default: available CPUs") do |n|
176
+ count = n
177
+ end
178
+ end
179
+ parser.order!(args)
180
+
181
+ if args.empty?
182
+ warn(parser)
183
+ exit(1)
184
+ end
185
+
186
+ processes = ParallelTests.determine_number_of_processes(count)
187
+ pids = (1..processes).map do |process_id|
188
+ env = {
189
+ "TEST_ENV_NUMBER" => process_id.to_s,
190
+ "PARALLEL_TEST_GROUPS" => processes.to_s
191
+ }
192
+ Process.spawn(env, *args)
193
+ end
194
+ statuses = pids.map { |pid| Process.wait2(pid).last }
195
+
196
+ exit(statuses.all?(&:success?) ? 0 : 1)
197
+ rescue OptionParser::ParseError => e
198
+ warn(e.message)
199
+ warn(parser)
200
+ exit(1)
201
+ end
202
+
157
203
  def handle_shim_command
158
204
  command = @argv[1]
159
205
  args = @argv.drop(2)
@@ -197,7 +243,7 @@ module TurboTests
197
243
  def shim_usage(command = nil)
198
244
  lines = [
199
245
  "Usage: turbo_tests2 shim install [--path PATH]",
200
- " turbo_tests2 shim remove [--path PATH]",
246
+ " turbo_tests2 shim remove [--path PATH]"
201
247
  ]
202
248
  lines << "Unknown shim command: #{command}" if command && !%w[install remove].include?(command)
203
249
  lines.join("\n")
@@ -224,5 +270,14 @@ module TurboTests
224
270
 
225
271
  Rake::Task[name].invoke
226
272
  end
273
+
274
+ def invoke_rake_hook(name)
275
+ current_task = "turbo_tests2:#{name}"
276
+ legacy_task = "turbo_tests:#{name}"
277
+
278
+ return invoke_rake_task(current_task) if defined?(Rake) && Rake::Task.task_defined?(current_task)
279
+
280
+ invoke_rake_task(legacy_task)
281
+ end
227
282
  end
228
283
  end