forking_test_runner 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1839ef1db8973b5e282bbf3998915649fa16448e12d6c56e11fda8b0d1f4d2a8
4
- data.tar.gz: 8d3f007a2149807efd62c4e1ff4b9a287c54055aebc3760b6bd3300d5844e8bf
3
+ metadata.gz: 310cb4e18cc6ae7699b73ed2ff52b7ace99f4c85ad6d96c57a2e3b26251a9be2
4
+ data.tar.gz: fc42925b1e5c1bc1039b2ef2900e29de0c9dea7494eb69517d13d1b3c3ee0f91
5
5
  SHA512:
6
- metadata.gz: 4939fa2877d285718946f957082a2129b17d4d20d7cce27050709d81d4c410bd50c455af8c2d546a3ebeaaa76a7ac047859883ea1b780102f8af63ac12ae14a5
7
- data.tar.gz: 25caf6564292c4cd5d74b9214879d514b6d9b49ac11c8bcf9e3e1407e0550ece85d92f6ed3395015ff028b1c654578d9d05d17f2b708c9e6e59ffdf590a49d3e
6
+ metadata.gz: a37d5ec4d8cde469b487c7bffa9153c030aca524e8a9e91bd1ada13c8cdec6f2be5042588472620d9f39b2234d44470ea26d9b2beb4a3c3f7070d01439c6918a
7
+ data.tar.gz: 15d354d5a8047be55e86df400a6ebed70594e68b25afec6e2fd14cc9b163fd07dbe09a7b1eccd407d06822a13f70e81b1e061601e93eefb0d5af0647cfd34216
@@ -365,21 +365,20 @@ module ForkingTestRunner
365
365
  def summarize_partial_reports
366
366
  reports = Dir.glob("#{CONVERAGE_REPORT_PREFIX}*")
367
367
  return if reports.empty?
368
+ key = nil
368
369
 
369
370
  require "json" # not a global dependency
370
371
  coverage = reports.each_with_object({}) do |report, all|
371
- suites = JSON.parse(File.read(report), symbolize_names: true).values
372
+ data = JSON.parse(File.read(report), symbolize_names: true)
373
+ key ||= data.keys.first
374
+ suites = data.values
372
375
  raise "Unsupported number of suites #{suites.size}" if suites.size != 1
373
376
  all.replace CoverageCapture.merge_coverage(all, suites.first.fetch(:coverage))
374
377
  ensure
375
378
  File.unlink(report) # do not leave junk behind
376
379
  end
377
380
 
378
- # report only line coverage to be backwards compatible for some coverage backends
379
- coverage.transform_values! { |v| v.is_a?(Hash) ? v.fetch(:lines) : v } if @options[:report_line_coverage]
380
-
381
- # chose "Minitest" because it is what simplecov uses for reports and "Unit Tests" makes sonarqube break
382
- data = JSON.pretty_generate("Minitest" => {"coverage" => coverage, "timestamp" => Time.now.to_i })
381
+ data = JSON.pretty_generate(key => {"coverage" => coverage, "timestamp" => Time.now.to_i })
383
382
  File.write(SingleCov.coverage_report, data)
384
383
 
385
384
  # make it not override our report when it finishes for main process
@@ -8,7 +8,6 @@ module ForkingTestRunner
8
8
  [:no_fixtures, "--no-fixtures", "Do not load fixtures"],
9
9
  [:no_ar, "--no-ar", "Disable ActiveRecord logic"],
10
10
  [:merge_coverage, "--merge-coverage", "Merge base code coverage into individual files coverage and summarize coverage report"],
11
- [:report_line_coverage, "--report-line-coverage", "Convert coverage report to line coverage (for compatibility)"],
12
11
  [
13
12
  :record_runtime,
14
13
  "--record-runtime=MODE",
@@ -1,3 +1,3 @@
1
1
  module ForkingTestRunner
2
- VERSION = "1.10.0"
2
+ VERSION = "1.11.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forking_test_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-24 00:00:00.000000000 Z
11
+ date: 2020-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel_tests