turbo_tests2 3.1.11 → 3.1.13
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 +30 -1
- data/README.md +1 -1
- data/lib/turbo_tests/runner.rb +61 -2
- data/lib/turbo_tests/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +6 -6
- 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: 394115742cadee6d2c917aa3d4234eb6d61ef695c2629f7960262fbe7b748331
|
|
4
|
+
data.tar.gz: ddde1b1124d90db035218b071f36d5c2f30a0453ada0b634d0797504bc406c3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2b063990697f22ac01fe2f08d233d5b1b13387bebbe26a48503aab25a515df11ca1b523c720eb7c620f457926f4f3a0c1c415999c3e763fc4746dd6d89ec955
|
|
7
|
+
data.tar.gz: 935bbe77795769c8195867207b2caa6383bfcc1f2a765932673b695d6151ba38894c25d0c85c0c732bdccf5cae1234f50c930632b04cff7e60eb9b1332ddcbb0
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,31 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [3.1.13] - 2026-07-16
|
|
34
|
+
|
|
35
|
+
- TAG: [v3.1.13][3.1.13t]
|
|
36
|
+
- COVERAGE: 97.50% -- 741/760 lines in 10 files
|
|
37
|
+
- BRANCH COVERAGE: 88.35% -- 182/206 branches in 10 files
|
|
38
|
+
- 35.87% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Duplicate RSpec `Run options:` messages from parallel workers are now
|
|
43
|
+
collapsed so they no longer interrupt progress formatter output repeatedly.
|
|
44
|
+
|
|
45
|
+
## [3.1.12] - 2026-07-16
|
|
46
|
+
|
|
47
|
+
- TAG: [v3.1.12][3.1.12t]
|
|
48
|
+
- COVERAGE: 97.04% -- 722/744 lines in 10 files
|
|
49
|
+
- BRANCH COVERAGE: 85.50% -- 171/200 branches in 10 files
|
|
50
|
+
- 35.87% documented
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- `file:line` RSpec selectors are now supported when passed to `turbo_tests2`;
|
|
55
|
+
files are grouped by real path and workers receive the original line-filtered
|
|
56
|
+
selectors.
|
|
57
|
+
|
|
33
58
|
## [3.1.11] - 2026-07-16
|
|
34
59
|
|
|
35
60
|
- TAG: [v3.1.11][3.1.11t]
|
|
@@ -262,7 +287,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
262
287
|
|
|
263
288
|
- Initial release
|
|
264
289
|
|
|
265
|
-
[Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.
|
|
290
|
+
[Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.13...HEAD
|
|
291
|
+
[3.1.13]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.12...v3.1.13
|
|
292
|
+
[3.1.13t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.1.13
|
|
293
|
+
[3.1.12]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.11...v3.1.12
|
|
294
|
+
[3.1.12t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.1.12
|
|
266
295
|
[3.1.11]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.10...v3.1.11
|
|
267
296
|
[3.1.11t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.1.11
|
|
268
297
|
[3.1.10]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.1.9...v3.1.10
|
data/README.md
CHANGED
|
@@ -666,7 +666,7 @@ Thanks for RTFM. ☺️
|
|
|
666
666
|
[📌gitmoji]: https://gitmoji.dev
|
|
667
667
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
668
668
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
669
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
669
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.760-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
670
670
|
[🔐security]: https://github.com/galtzo-floss/turbo_tests2/blob/main/SECURITY.md
|
|
671
671
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
672
672
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/turbo_tests/runner.rb
CHANGED
|
@@ -26,6 +26,7 @@ module TurboTests
|
|
|
26
26
|
def run(opts = {})
|
|
27
27
|
default_file_discovery = !opts.key?(:files) || opts[:files].nil?
|
|
28
28
|
files = default_file_discovery ? rspec_configured_files_to_run : opts[:files]
|
|
29
|
+
file_selection = normalize_rspec_file_selection(files)
|
|
29
30
|
formatters = opts[:formatters]
|
|
30
31
|
tags = opts[:tags]
|
|
31
32
|
parallel_options = opts[:parallel_options] || {}
|
|
@@ -62,7 +63,8 @@ module TurboTests
|
|
|
62
63
|
reporter: reporter,
|
|
63
64
|
formatters: formatters,
|
|
64
65
|
start_time: start_time,
|
|
65
|
-
files: files,
|
|
66
|
+
files: file_selection.fetch(:files),
|
|
67
|
+
test_selectors: file_selection.fetch(:selectors),
|
|
66
68
|
tags: tags,
|
|
67
69
|
runtime_log: runtime_log,
|
|
68
70
|
example_status_log: example_status_log,
|
|
@@ -79,6 +81,31 @@ module TurboTests
|
|
|
79
81
|
).run
|
|
80
82
|
end
|
|
81
83
|
|
|
84
|
+
def normalize_rspec_file_selection(files)
|
|
85
|
+
selectors = {}
|
|
86
|
+
files.each do |entry|
|
|
87
|
+
file, selector = split_rspec_location(entry)
|
|
88
|
+
selectors[file] ||= []
|
|
89
|
+
if selector == file
|
|
90
|
+
selectors[file] = [file]
|
|
91
|
+
elsif !selectors[file].include?(file)
|
|
92
|
+
selectors[file] << selector unless selectors[file].include?(selector)
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
{files: selectors.keys, selectors: selectors}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def split_rspec_location(entry)
|
|
100
|
+
value = entry.to_s
|
|
101
|
+
return [value, value] if File.exist?(value)
|
|
102
|
+
|
|
103
|
+
match = value.match(/\A(.+):(\d+)\z/)
|
|
104
|
+
return [value, value] unless match && File.exist?(match[1])
|
|
105
|
+
|
|
106
|
+
[match[1], value]
|
|
107
|
+
end
|
|
108
|
+
|
|
82
109
|
def runtime_log_from_example_status(example_status_log)
|
|
83
110
|
statuses = RSpec::Core::ExampleStatusPersister.load_from(example_status_log)
|
|
84
111
|
runtimes = statuses.each_with_object(Hash.new(0.0)) do |status, sums|
|
|
@@ -121,6 +148,7 @@ module TurboTests
|
|
|
121
148
|
@formatters = opts[:formatters]
|
|
122
149
|
@reporter = opts[:reporter]
|
|
123
150
|
@files = opts[:files]
|
|
151
|
+
@test_selectors = opts[:test_selectors] || {}
|
|
124
152
|
@tags = opts[:tags]
|
|
125
153
|
@verbose = opts[:verbose]
|
|
126
154
|
@fail_fast = opts[:fail_fast]
|
|
@@ -149,6 +177,7 @@ module TurboTests
|
|
|
149
177
|
@exited_process_ids = []
|
|
150
178
|
@worker_output = Hash.new { |hash, process_id| hash[process_id] = {stdout: +"", stderr: +""} }
|
|
151
179
|
@worker_output_mutex = Mutex.new
|
|
180
|
+
@deferred_run_options_messages = Hash.new { |hash, message| hash[message] = [] }
|
|
152
181
|
@error = false
|
|
153
182
|
@print_failed_group = opts[:print_failed_group]
|
|
154
183
|
end
|
|
@@ -244,7 +273,7 @@ module TurboTests
|
|
|
244
273
|
"PARALLEL_PID_FILE" => parallel_pid_file_path
|
|
245
274
|
},
|
|
246
275
|
@tags.map { |tag| "--tag=#{tag}" },
|
|
247
|
-
tests,
|
|
276
|
+
tests.flat_map { |test| selectors_for_test(test) },
|
|
248
277
|
process_id,
|
|
249
278
|
**opts
|
|
250
279
|
)
|
|
@@ -378,6 +407,10 @@ module TurboTests
|
|
|
378
407
|
ENV["PARALLEL_PID_FILE"]
|
|
379
408
|
end
|
|
380
409
|
|
|
410
|
+
def selectors_for_test(test)
|
|
411
|
+
@test_selectors.fetch(test) { [test] }
|
|
412
|
+
end
|
|
413
|
+
|
|
381
414
|
def track_parallel_pid(pid, pid_file_path = parallel_pid_file_path)
|
|
382
415
|
ParallelTests::Pids.new(pid_file_path).add(pid) if pid && pid_file_path
|
|
383
416
|
end
|
|
@@ -512,6 +545,8 @@ module TurboTests
|
|
|
512
545
|
if message[:message].include?("An error occurred") || message[:message].include?("occurred outside of examples")
|
|
513
546
|
@reporter.error_outside_of_examples(message[:message])
|
|
514
547
|
@error = true
|
|
548
|
+
elsif run_options_message?(message[:message])
|
|
549
|
+
defer_run_options_message(message[:message], message[:process_id])
|
|
515
550
|
else
|
|
516
551
|
@reporter.message(message[:message])
|
|
517
552
|
end
|
|
@@ -535,9 +570,33 @@ module TurboTests
|
|
|
535
570
|
|
|
536
571
|
$stdout.flush
|
|
537
572
|
end
|
|
573
|
+
|
|
574
|
+
flush_deferred_run_options_messages
|
|
538
575
|
rescue Interrupt
|
|
539
576
|
end
|
|
540
577
|
|
|
578
|
+
def run_options_message?(message)
|
|
579
|
+
message.to_s.start_with?("Run options:")
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
def defer_run_options_message(message, process_id)
|
|
583
|
+
@deferred_run_options_messages[message] << process_id
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
def flush_deferred_run_options_messages
|
|
587
|
+
return if @deferred_run_options_messages.empty?
|
|
588
|
+
|
|
589
|
+
if @deferred_run_options_messages.one?
|
|
590
|
+
@reporter.message(@deferred_run_options_messages.keys.first)
|
|
591
|
+
else
|
|
592
|
+
lines = @deferred_run_options_messages.map do |message, process_ids|
|
|
593
|
+
" workers #{process_ids.uniq.sort.join(", ")}: #{message}"
|
|
594
|
+
end
|
|
595
|
+
@reporter.message(["Run options by worker:", *lines].join("\n"))
|
|
596
|
+
end
|
|
597
|
+
@deferred_run_options_messages.clear
|
|
598
|
+
end
|
|
599
|
+
|
|
541
600
|
def close_io(io)
|
|
542
601
|
io.close unless io.closed?
|
|
543
602
|
rescue IOError
|
data/lib/turbo_tests/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: turbo_tests2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Illia
|
|
@@ -110,7 +110,7 @@ dependencies:
|
|
|
110
110
|
version: '2.3'
|
|
111
111
|
- - ">="
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
|
-
version: 2.3.
|
|
113
|
+
version: 2.3.5
|
|
114
114
|
type: :development
|
|
115
115
|
prerelease: false
|
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -120,7 +120,7 @@ dependencies:
|
|
|
120
120
|
version: '2.3'
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: 2.3.
|
|
123
|
+
version: 2.3.5
|
|
124
124
|
- !ruby/object:Gem::Dependency
|
|
125
125
|
name: bundler-audit
|
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -312,10 +312,10 @@ licenses:
|
|
|
312
312
|
- MIT
|
|
313
313
|
metadata:
|
|
314
314
|
homepage_uri: https://turbo-tests2.galtzo.com
|
|
315
|
-
source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.1.
|
|
316
|
-
changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.1.
|
|
315
|
+
source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.1.13
|
|
316
|
+
changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.1.13/CHANGELOG.md
|
|
317
317
|
bug_tracker_uri: https://github.com/galtzo-floss/turbo_tests2/issues
|
|
318
|
-
documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.1.
|
|
318
|
+
documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.1.13
|
|
319
319
|
funding_uri: https://github.com/sponsors/pboling
|
|
320
320
|
wiki_uri: https://github.com/galtzo-floss/turbo_tests2/wiki
|
|
321
321
|
news_uri: https://www.railsbling.com/tags/turbo_tests2
|
metadata.gz.sig
CHANGED
|
Binary file
|