turbo_tests2 3.2.8 → 3.2.10

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: ca871e5dbe65758df84b2abc6d7e7260cd3be66f463262083e51f3dd9b914b8f
4
- data.tar.gz: 40920adda29dd8f5dc77dd1ca41dd2349b18838bc8a661ddddc6f277a8ec3b2e
3
+ metadata.gz: ef9aa5b6ef624127fee6f208c3f85446dbcf8a8f48072ed34f12ea3b7af7b343
4
+ data.tar.gz: 8552a68e93d29f1d9bb93d71b6e7435ed9ea5e889c76be641cdb314c8020f31b
5
5
  SHA512:
6
- metadata.gz: 76c25c3e606364c6014377d57c74c270916dee892864d45113483c460ee919dae5da892245268d02e94e3c41d30fd35d787ff97434ec6ffdc109a8d604df73a2
7
- data.tar.gz: bf173174ef544f7266cbc8488ba9b67cbb3f95c9aa438da45af1991e71f98f53851933bb55ad4840327ba35887058ca4786ca57a41f1a5034e1b21508878e4e8
6
+ metadata.gz: c81f42592dc81b08e22462fe71981ac28d941ff7ddfdfaf7d70db296094b3e76ec51d704614fc3ec53d98bd18f8e849c25def06de48c680c712eb6c30b66776a
7
+ data.tar.gz: df5d0f31a8bdfbad6842ab4e2e0a56804d5d566df0bfbb6745c980bffd68833c3948b014a6f05126c1f84a036c1f7d31e8719f9b2e436517d6342693024447af
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,29 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [3.2.10] - 2026-09-15
34
+
35
+ - TAG: [v3.2.10][3.2.10t]
36
+ - COVERAGE: 96.79% -- 906/936 lines in 10 files
37
+ - BRANCH COVERAGE: 84.86% -- 241/284 branches in 10 files
38
+ - 36.73% documented
39
+
40
+ ## [3.2.9] - 2026-09-13
41
+
42
+ - TAG: [v3.2.9][3.2.9t]
43
+ - COVERAGE: 96.79% -- 905/935 lines in 10 files
44
+ - BRANCH COVERAGE: 84.75% -- 239/282 branches in 10 files
45
+ - 36.73% documented
46
+
47
+ ### Fixed
48
+
49
+ - Workers that exit unsuccessfully before reporting any results (for example
50
+ after crashing while loading) are now reported as errors outside of examples,
51
+ instead of silently dropping out of the summary.
52
+ - JSON rows are serialized with `JSON.generate`, so ActiveSupport's `#to_json`
53
+ override (which fails for ActiveSupport < 8.1 with json >= 3.0) can no longer
54
+ crash workers.
55
+
33
56
  ## [3.2.8] - 2026-09-11
34
57
 
35
58
  - TAG: [v3.2.8][3.2.8t]
@@ -586,7 +609,11 @@ Please file a bug if you notice a violation of semantic versioning.
586
609
 
587
610
  - Initial release
588
611
 
589
- [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.8...HEAD
612
+ [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.10...HEAD
613
+ [3.2.10]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.9...v3.2.10
614
+ [3.2.10t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.10
615
+ [3.2.9]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.8...v3.2.9
616
+ [3.2.9t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.9
590
617
  [3.2.8]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.7...v3.2.8
591
618
  [3.2.8t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.8
592
619
  [3.2.7]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.6...v3.2.7
data/README.md CHANGED
@@ -775,7 +775,7 @@ Thanks for RTFM. ☺️
775
775
  [📌gitmoji]: https://gitmoji.dev
776
776
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
777
777
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
778
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.922-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
778
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.936-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
779
779
  [🔐security]: https://github.com/galtzo-floss/turbo_tests2/blob/main/SECURITY.md
780
780
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
781
781
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -210,7 +210,9 @@ module TurboTests
210
210
  end
211
211
 
212
212
  def output_row(obj)
213
- output.puts "#{ENV.fetch("RSPEC_FORMATTER_OUTPUT_ID", "")}#{json_ready(obj).to_json}"
213
+ # JSON.generate instead of #to_json: ActiveSupport overrides #to_json, and its
214
+ # encoder can fail (e.g. ActiveSupport < 8.1 with json >= 3.0).
215
+ output.puts "#{ENV.fetch("RSPEC_FORMATTER_OUTPUT_ID", "")}#{JSON.generate(json_ready(obj))}"
214
216
  output.flush
215
217
  end
216
218
 
@@ -222,6 +224,8 @@ module TurboTests
222
224
  obj.map { |value| json_ready(value) }
223
225
  when String
224
226
  obj.dup.force_encoding(Encoding::UTF_8).scrub
227
+ when Symbol
228
+ obj.id2name
225
229
  else
226
230
  obj
227
231
  end
@@ -235,6 +235,8 @@ module TurboTests
235
235
  @worker_output_mutex = Mutex.new
236
236
  @deferred_run_options_messages = Hash.new { |hash, message| hash[message] = [] }
237
237
  @error = false
238
+ @closed_process_ids = {}
239
+ @failed_worker_statuses = {}
238
240
  @print_failed_group = opts[:print_failed_group]
239
241
  @worker_output_mode = self.class.normalize_worker_output_mode(opts.fetch(:worker_output, DEFAULT_WORKER_OUTPUT_MODE))
240
242
  end
@@ -282,6 +284,8 @@ module TurboTests
282
284
 
283
285
  @threads.each(&:join)
284
286
 
287
+ report_workers_without_results
288
+
285
289
  report_failed_group(tests_in_groups) if @print_failed_group
286
290
 
287
291
  Signal.trap(:INT, old_signal)
@@ -452,6 +456,7 @@ module TurboTests
452
456
  @threads << Thread.new do
453
457
  begin
454
458
  status = wait_thr.value
459
+ @failed_worker_statuses.store(process_id, status) unless status.success?
455
460
  @messages << {type: "error", process_id: process_id} unless status.success?
456
461
  @messages << {type: "exit", process_id: process_id}
457
462
  ensure
@@ -539,6 +544,7 @@ module TurboTests
539
544
  return unless message.is_a?(Hash) && message[:type].is_a?(String)
540
545
 
541
546
  message[:process_id] = process_id
547
+ @closed_process_ids.store(process_id, true) if message[:type] == "close"
542
548
  message
543
549
  rescue JSON::ParserError
544
550
  nil
@@ -662,6 +668,7 @@ module TurboTests
662
668
 
663
669
  def handle_messages
664
670
  exited_process_ids = {}
671
+ process_count = @tests_in_groups&.size || @num_processes
665
672
 
666
673
  loop do
667
674
  message = @messages.pop
@@ -712,7 +719,7 @@ module TurboTests
712
719
 
713
720
  exited_process_ids[process_id] = true
714
721
  @exited_process_ids << process_id
715
- break if exited_process_ids.size == @num_processes
722
+ break if exited_process_ids.size == process_count
716
723
  else
717
724
  warn("Unhandled message in main process: #{message}")
718
725
  end
@@ -756,6 +763,24 @@ module TurboTests
756
763
  !@fail_fast.nil? && @failure_count >= @fail_fast
757
764
  end
758
765
 
766
+ # A worker that exits unsuccessfully without its formatter closing (for example
767
+ # one that crashed while loading spec_helper or while RSpec set up) reports no
768
+ # examples at all. Surface it as an error outside of examples so the summary
769
+ # reflects the failure instead of only counting the workers that reported.
770
+ def report_workers_without_results
771
+ return if fail_fast_met || @interrupt_handled
772
+
773
+ @failed_worker_statuses.keys.sort.each do |process_id|
774
+ next if @closed_process_ids[process_id]
775
+
776
+ status = @failed_worker_statuses[process_id]
777
+ @reporter.error_outside_of_examples(
778
+ "Worker #{process_id} exited with status #{status.exitstatus.inspect} before reporting results; see its output above."
779
+ )
780
+ @error = true
781
+ end
782
+ end
783
+
759
784
  def report_failed_group(tests_in_groups)
760
785
  @wait_threads.map(&:value).each_with_index do |value, index|
761
786
  next if value.success?
@@ -4,7 +4,7 @@ module TurboTests
4
4
  # Version namespace for this gem.
5
5
  module Version
6
6
  # Current gem version.
7
- VERSION = "3.2.8"
7
+ VERSION = "3.2.10"
8
8
  end
9
9
  # Current gem version exposed at the traditional constant location.
10
10
  VERSION = Version::VERSION # Traditional Constant Location
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.2.8
4
+ version: 3.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Illia
@@ -315,10 +315,10 @@ licenses:
315
315
  - MIT
316
316
  metadata:
317
317
  homepage_uri: https://turbo-tests2.galtzo.com
318
- source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.2.8
319
- changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.8/CHANGELOG.md
318
+ source_code_uri: https://github.com/galtzo-floss/turbo_tests2/tree/v3.2.10
319
+ changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.10/CHANGELOG.md
320
320
  bug_tracker_uri: https://github.com/galtzo-floss/turbo_tests2/issues
321
- documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.2.8
321
+ documentation_uri: https://www.rubydoc.info/gems/turbo_tests2/3.2.10
322
322
  funding_uri: https://github.com/sponsors/pboling
323
323
  wiki_uri: https://github.com/galtzo-floss/turbo_tests2/wiki
324
324
  news_uri: https://www.railsbling.com/tags/turbo_tests2
metadata.gz.sig CHANGED
Binary file