parallel_rspec 2.6.0 → 3.0.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 +4 -4
- data/CHANGES.md +11 -5
- data/lib/parallel_rspec/caller_filter_patch.rb +11 -0
- data/lib/parallel_rspec/client.rb +40 -2
- data/lib/parallel_rspec/server.rb +1 -1
- data/lib/parallel_rspec/version.rb +1 -1
- data/lib/parallel_rspec.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fad2da0cd1720dc8803b2bf06d3ad7b0b4c71e0856667dd761e449b8c3b3ed5d
|
|
4
|
+
data.tar.gz: 61daddf9f3a36ad24353c487a029d77f7fefd87cf1207a7e79d7326500eb99be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4f6821b9aee63cb2b55a8dcadf20e03a55570b24b2f68ad3e2e7f21f6b2f1cc4404ecddbeb3297c1b308a802876d59801bdd2f6b579e0309c80d8a7d16eeaee
|
|
7
|
+
data.tar.gz: 392c4adcd45f25706f47f18ee0be112a30bc5f199a0bcd821d4e5531c58b7e4a4cfa0983d9c144bd44bfdfb7bba19b1d7d683a8b4c63911a2d8c6303bde8f7ab
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
* Fix reporting of `aggregate_failures` errors.
|
|
6
|
+
* Add this gem's files to the backtrace filter RSpec uses to exclude its own files from failure messages.
|
|
7
|
+
* Implement `--fail-fast` support.
|
|
8
|
+
|
|
3
9
|
## 2.6.0
|
|
4
10
|
|
|
5
11
|
* Fix `--profile` support. Thanks @peret.
|
|
@@ -18,12 +24,12 @@
|
|
|
18
24
|
|
|
19
25
|
## 2.4.0
|
|
20
26
|
|
|
21
|
-
* Wrap Exception objects so they can always be dumped and loaded, even if they contain non-marshallable objects such as
|
|
27
|
+
* Wrap `Exception` objects so they can always be dumped and loaded, even if they contain non-marshallable objects such as `Proc`s or anonymous classes.
|
|
22
28
|
|
|
23
29
|
## 2.3.0
|
|
24
30
|
|
|
25
31
|
* Increase default workers from 2 to 4.
|
|
26
|
-
* Fix behavioral inconsistency with rspec-core in nested describe blocks on helper methods with clashing let methods.
|
|
32
|
+
* Fix behavioral inconsistency with rspec-core in nested describe blocks on helper methods with clashing `let` methods.
|
|
27
33
|
|
|
28
34
|
## 2.2.0
|
|
29
35
|
|
|
@@ -39,13 +45,13 @@
|
|
|
39
45
|
|
|
40
46
|
## 2.1.0
|
|
41
47
|
|
|
42
|
-
* Add a default parallel_rspec rake task.
|
|
43
|
-
* Add task descriptions for rake --tasks
|
|
48
|
+
* Add a default `parallel_rspec` rake task.
|
|
49
|
+
* Add task descriptions for `rake --tasks`.
|
|
44
50
|
|
|
45
51
|
## 2.0.0
|
|
46
52
|
|
|
47
53
|
* Remove an unnecessary dev dependency to pacify dependabot.
|
|
48
|
-
* Add after_fork hook and running
|
|
54
|
+
* Add `after_fork` hook and `running?` method. Thanks @mogest.
|
|
49
55
|
* Upgrade for compatibility with Rails 6.1 and RSpec 3.10. Thanks @mogest.
|
|
50
56
|
|
|
51
57
|
## 1.2.0
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require "rspec/support/caller_filter"
|
|
2
|
+
|
|
3
|
+
if RSpec.const_defined?(:CallerFilter) && RSpec::CallerFilter.const_defined?(:IGNORE_REGEX)
|
|
4
|
+
module RSpec
|
|
5
|
+
class CallerFilter
|
|
6
|
+
_ignore_regex = Regexp.union(IGNORE_REGEX, "/lib/parallel_rspec", "parallel_rspec/exe/prspec")
|
|
7
|
+
remove_const :IGNORE_REGEX
|
|
8
|
+
IGNORE_REGEX = _ignore_regex
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require "rspec/core"
|
|
2
|
+
|
|
1
3
|
module ParallelRSpec
|
|
2
4
|
# Some Exception objects contain non-marshallable ivars such as Proc objects. This wrapper
|
|
3
5
|
# represents the bits needed by RSpec's ExceptionPresenter, and can be dumped and loaded.
|
|
@@ -28,6 +30,20 @@ module ParallelRSpec
|
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
|
|
33
|
+
class MultipleExceptionMarshallingWrapper < ExceptionMarshallingWrapper
|
|
34
|
+
include ::RSpec::Core::MultipleExceptionError::InterfaceTag
|
|
35
|
+
|
|
36
|
+
attr_reader :all_exceptions, :aggregation_block_label, :aggregation_metadata, :exception_count_description
|
|
37
|
+
|
|
38
|
+
def initialize(class_name, message, backtrace, cause, all_exceptions, aggregation_block_label, aggregation_metadata, exception_count_description)
|
|
39
|
+
super(class_name, message, backtrace, cause)
|
|
40
|
+
@all_exceptions = all_exceptions
|
|
41
|
+
@aggregation_block_label = aggregation_block_label
|
|
42
|
+
@aggregation_metadata = aggregation_metadata
|
|
43
|
+
@exception_count_description = exception_count_description
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
31
47
|
class Client
|
|
32
48
|
attr_reader :channel_to_server
|
|
33
49
|
|
|
@@ -72,8 +88,30 @@ module ParallelRSpec
|
|
|
72
88
|
end
|
|
73
89
|
|
|
74
90
|
def dumpable_exception(exception)
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
case exception
|
|
92
|
+
when nil
|
|
93
|
+
nil
|
|
94
|
+
when ExceptionMarshallingWrapper
|
|
95
|
+
exception
|
|
96
|
+
when ::RSpec::Core::MultipleExceptionError::InterfaceTag
|
|
97
|
+
MultipleExceptionMarshallingWrapper.new(
|
|
98
|
+
exception.class.name,
|
|
99
|
+
exception.message,
|
|
100
|
+
exception.backtrace,
|
|
101
|
+
dumpable_exception(exception.cause),
|
|
102
|
+
exception.all_exceptions.map { |exception| dumpable_exception(exception) },
|
|
103
|
+
exception.aggregation_block_label,
|
|
104
|
+
exception.aggregation_metadata,
|
|
105
|
+
exception.exception_count_description,
|
|
106
|
+
)
|
|
107
|
+
else
|
|
108
|
+
ExceptionMarshallingWrapper.new(
|
|
109
|
+
exception.class.name,
|
|
110
|
+
exception.message,
|
|
111
|
+
exception.backtrace,
|
|
112
|
+
dumpable_exception(exception.cause),
|
|
113
|
+
)
|
|
114
|
+
end
|
|
77
115
|
end
|
|
78
116
|
|
|
79
117
|
def next_example_to_run
|
|
@@ -56,7 +56,7 @@ module ParallelRSpec
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def next_example_to_run(channel_to_client)
|
|
59
|
-
if remaining_examples_by_group.empty?
|
|
59
|
+
if remaining_examples_by_group.empty? || reporter.fail_fast_limit_met?
|
|
60
60
|
channel_to_client.write(nil)
|
|
61
61
|
else
|
|
62
62
|
example_group = remaining_examples_by_group.keys.first
|
data/lib/parallel_rspec.rb
CHANGED
|
@@ -5,6 +5,7 @@ require "parallel_rspec/workers"
|
|
|
5
5
|
require "parallel_rspec/example"
|
|
6
6
|
require "parallel_rspec/server"
|
|
7
7
|
require "parallel_rspec/client"
|
|
8
|
+
require "parallel_rspec/caller_filter_patch"
|
|
8
9
|
require "parallel_rspec/rake_task"
|
|
9
10
|
require "parallel_rspec/runner"
|
|
10
11
|
require "parallel_rspec/railtie"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parallel_rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Will Bryant, Powershop New Zealand Ltd
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -57,6 +57,7 @@ files:
|
|
|
57
57
|
- Rakefile
|
|
58
58
|
- exe/prspec
|
|
59
59
|
- lib/parallel_rspec.rb
|
|
60
|
+
- lib/parallel_rspec/caller_filter_patch.rb
|
|
60
61
|
- lib/parallel_rspec/channel.rb
|
|
61
62
|
- lib/parallel_rspec/client.rb
|
|
62
63
|
- lib/parallel_rspec/config.rb
|