parallel_split_test 0.7.0 → 0.8.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
- SHA1:
3
- metadata.gz: 45de1287c50f21414ec9cfd8cd44f15063757423
4
- data.tar.gz: 77b10746bf20d6b9b0bbc334617d3c1648c7ba5f
2
+ SHA256:
3
+ metadata.gz: d99547f6d43a4f9dd42a7516577df244219947e306e3949f92857fae6223918b
4
+ data.tar.gz: 28168f003ffdd21e7114505282130097177c9613088f00d87de6debc3050da0a
5
5
  SHA512:
6
- metadata.gz: 01bf113de23323bdbb7f64eef5f4aeb885cf40dd915e0d1701dc6bf9995b7773b43f8c1cc06f1ad9b4d086453cec57e45da5dc4b550281917e30ae8bd5d8f7e7
7
- data.tar.gz: e72f3554bae41f8590eb896d9e8ae69da8ae62ff2f9efb4a844274142f8b0a6a73dc068b1585d0cdfc22df8c19924270d56b2f3a9c6778074a7051776aae4e28
6
+ metadata.gz: e28d04385f572a35391a22dac32ee71a4b78a875a183bcab786801689c5053a8cba0eaa7bcd08193f11c2819cbbaa9265f74e22c87c419f07b244b6f46681e4e
7
+ data.tar.gz: e265329ce22c3df8e279498629370942ae2fdff97bcc3004cd840b159aedae67762993b0142ee6a06bdbfb3a87a73244bc32a1267016947467b38ce2c5150f98
@@ -2,7 +2,6 @@ require 'parallel_split_test'
2
2
  require 'parallel_split_test/output_recorder'
3
3
  require 'parallel'
4
4
  require 'rspec'
5
- require 'parallel_split_test/core_ext/rspec_example'
6
5
  require 'parallel_split_test/core_ext/rspec_world'
7
6
 
8
7
  module ParallelSplitTest
@@ -2,14 +2,14 @@ require 'parallel_split_test'
2
2
  require 'rspec/core/example'
3
3
 
4
4
  RSpec::Core::World.class_eval do
5
- alias :example_count_without_parallel_split_test :example_count
6
- def example_count(*args, &block)
7
- count = example_count_without_parallel_split_test(*args, &block)
8
- quotient = count / ParallelSplitTest.processes
9
- if ParallelSplitTest.process_number < count % ParallelSplitTest.processes
10
- quotient + 1
11
- else
12
- quotient
5
+ alias :original_prepare_example_filtereing :prepare_example_filtering
6
+
7
+ def prepare_example_filtering
8
+ @original_filtered_examples = original_prepare_example_filtereing
9
+ @filtered_examples = Hash.new do |hash, group|
10
+ hash[group] = @original_filtered_examples[group].select do |x|
11
+ ParallelSplitTest.run_example?
12
+ end
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelSplitTest
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_split_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.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: 2017-10-27 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -49,7 +49,6 @@ files:
49
49
  - bin/parallel_split_test
50
50
  - lib/parallel_split_test.rb
51
51
  - lib/parallel_split_test/command_line.rb
52
- - lib/parallel_split_test/core_ext/rspec_example.rb
53
52
  - lib/parallel_split_test/core_ext/rspec_world.rb
54
53
  - lib/parallel_split_test/output_recorder.rb
55
54
  - lib/parallel_split_test/runner.rb
@@ -66,15 +65,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
66
65
  requirements:
67
66
  - - ">="
68
67
  - !ruby/object:Gem::Version
69
- version: 2.1.0
68
+ version: 2.2.0
70
69
  required_rubygems_version: !ruby/object:Gem::Requirement
71
70
  requirements:
72
71
  - - ">="
73
72
  - !ruby/object:Gem::Version
74
73
  version: '0'
75
74
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.5.1
75
+ rubygems_version: 3.1.3
78
76
  signing_key:
79
77
  specification_version: 4
80
78
  summary: Split a big test file into multiple chunks and run them in parallel
@@ -1,13 +0,0 @@
1
- require 'parallel_split_test'
2
- require 'rspec/core/example'
3
-
4
- RSpec::Core::Example.class_eval do
5
- alias :run_without_parallel_split_test :run
6
- def run(*args, &block)
7
- if ParallelSplitTest.run_example?
8
- run_without_parallel_split_test(*args, &block)
9
- else
10
- true # example 'passed'
11
- end
12
- end
13
- end