parallel_tests 2.25.0 → 2.26.0

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: 88f551914ac9f5bf5326bf18ca992d9892c3c4399c8860b5e5c23140d65d5c21
4
- data.tar.gz: 8035ed6bab7fba56b01685a15b36c62655693fb8a79caba18ffddf5f6b01120c
3
+ metadata.gz: 4232f03dce77c4d10d8bb46b9001bf2d285e4dfda72079edd36e04d84c02ecef
4
+ data.tar.gz: 5bd9ad2fdfcb4c36509480f8abad3d7b0b632e530a8a2539253388346d4335eb
5
5
  SHA512:
6
- metadata.gz: 0c07d76e5429fb4660a92095729ed1ca56afa5e74f9bdf6d13b1092ffc45e0696fbe936edb43e88251abde9a71898aeb5fc810b098b6048aa92a46a38308c211
7
- data.tar.gz: b1b09589da2f6ff0e08abd11cc6b5a22d89a732f717f6c5f5c494d0d8e61527536a654fdefeb7d35c6f23a0bc941ca15280e7447499768ba0439590982f1298d
6
+ metadata.gz: 4b308ddbe59b8a455c7f1bfc8571884bef055e6daf030dcdc14e507fdbcb0f1b5437e061ecfd93fce43d4616726e9bacd07b7116fca51a954535c46e2f8b0adc
7
+ data.tar.gz: 5a563c161e6d04a815983fc4b1b486fe88939813af3cbf60ad7fafd1630c73669a2bd558a892041a7a3b52b559d4d66dc35a35c3696b34927affda9ab87404ab
@@ -5,22 +5,22 @@ module ParallelTests
5
5
  class RuntimeLogger
6
6
  include Io
7
7
 
8
- def initialize(step_mother, path_or_io, options)
9
- @io = prepare_io(path_or_io)
8
+ def initialize(config)
9
+ @io = prepare_io(config.out_stream)
10
10
  @example_times = Hash.new(0)
11
- end
12
11
 
13
- def before_feature(_)
14
- @start_at = ParallelTests.now.to_f
15
- end
12
+ config.on_event :test_case_started do |_|
13
+ @start_at = ParallelTests.now.to_f
14
+ end
16
15
 
17
- def after_feature(feature)
18
- @example_times[feature.file] += ParallelTests.now.to_f - @start_at
19
- end
16
+ config.on_event :test_case_finished do |event|
17
+ @example_times[event.test_case.feature.file] += ParallelTests.now.to_f - @start_at
18
+ end
20
19
 
21
- def after_features(*args)
22
- lock_output do
23
- @io.puts @example_times.map { |file, time| "#{file}:#{time}" }
20
+ config.on_event :test_run_finished do |_|
21
+ lock_output do
22
+ @io.puts @example_times.map { |file, time| "#{file}:#{time}" }
23
+ end
24
24
  end
25
25
  end
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '2.25.0'
2
+ VERSION = Version = '2.26.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.25.0
4
+ version: 2.26.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: 2018-10-24 00:00:00.000000000 Z
11
+ date: 2018-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel