turbo_tests2 3.2.8 → 3.2.9

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: f63573447de503c49edf269ccd4fc2428f0264be443c581368424984a8d297fd
4
+ data.tar.gz: 03ac549c607d360119b7414862675512aae32f551f20e7573ab83a410a44d71e
5
5
  SHA512:
6
- metadata.gz: 76c25c3e606364c6014377d57c74c270916dee892864d45113483c460ee919dae5da892245268d02e94e3c41d30fd35d787ff97434ec6ffdc109a8d604df73a2
7
- data.tar.gz: bf173174ef544f7266cbc8488ba9b67cbb3f95c9aa438da45af1991e71f98f53851933bb55ad4840327ba35887058ca4786ca57a41f1a5034e1b21508878e4e8
6
+ metadata.gz: f87df2925ae0e2d74bcb2f3995be14f3384b0ac976d371af927da8ea90681893a5c78b2bdc73f569ebffe55a368d9a9f592822997a72457e3804ace986526a4f
7
+ data.tar.gz: 4e7ebf8e0ddfdb6df6c29973dbfac46101109aa26a484045569fd630e6f8e129abf49391d1be84427c1b1b8cf7f58df98324b6f70ea19acd56cd7c74602f527d
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,22 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [3.2.9] - 2026-09-13
34
+
35
+ - TAG: [v3.2.9][3.2.9t]
36
+ - COVERAGE: 96.79% -- 905/935 lines in 10 files
37
+ - BRANCH COVERAGE: 84.75% -- 239/282 branches in 10 files
38
+ - 36.73% documented
39
+
40
+ ### Fixed
41
+
42
+ - Workers that exit unsuccessfully before reporting any results (for example
43
+ after crashing while loading) are now reported as errors outside of examples,
44
+ instead of silently dropping out of the summary.
45
+ - JSON rows are serialized with `JSON.generate`, so ActiveSupport's `#to_json`
46
+ override (which fails for ActiveSupport < 8.1 with json >= 3.0) can no longer
47
+ crash workers.
48
+
33
49
  ## [3.2.8] - 2026-09-11
34
50
 
35
51
  - TAG: [v3.2.8][3.2.8t]
@@ -586,7 +602,9 @@ Please file a bug if you notice a violation of semantic versioning.
586
602
 
587
603
  - Initial release
588
604
 
589
- [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.8...HEAD
605
+ [Unreleased]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.9...HEAD
606
+ [3.2.9]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.8...v3.2.9
607
+ [3.2.9t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.9
590
608
  [3.2.8]: https://github.com/galtzo-floss/turbo_tests2/compare/v3.2.7...v3.2.8
591
609
  [3.2.8t]: https://github.com/galtzo-floss/turbo_tests2/releases/tag/v3.2.8
592
610
  [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.935-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
@@ -756,6 +762,24 @@ module TurboTests
756
762
  !@fail_fast.nil? && @failure_count >= @fail_fast
757
763
  end
758
764
 
765
+ # A worker that exits unsuccessfully without its formatter closing (for example
766
+ # one that crashed while loading spec_helper or while RSpec set up) reports no
767
+ # examples at all. Surface it as an error outside of examples so the summary
768
+ # reflects the failure instead of only counting the workers that reported.
769
+ def report_workers_without_results
770
+ return if fail_fast_met || @interrupt_handled
771
+
772
+ @failed_worker_statuses.keys.sort.each do |process_id|
773
+ next if @closed_process_ids[process_id]
774
+
775
+ status = @failed_worker_statuses[process_id]
776
+ @reporter.error_outside_of_examples(
777
+ "Worker #{process_id} exited with status #{status.exitstatus.inspect} before reporting results; see its output above."
778
+ )
779
+ @error = true
780
+ end
781
+ end
782
+
759
783
  def report_failed_group(tests_in_groups)
760
784
  @wait_threads.map(&:value).each_with_index do |value, index|
761
785
  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.9"
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.9
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.9
319
+ changelog_uri: https://github.com/galtzo-floss/turbo_tests2/blob/v3.2.9/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.9
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