rspec-multiprocess_runner 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +2 -1
- data/exe/multirspec +2 -1
- data/lib/rspec/multiprocess_runner/command_line_options.rb +7 -2
- data/lib/rspec/multiprocess_runner/coordinator.rb +1 -1
- data/lib/rspec/multiprocess_runner/version.rb +1 -1
- data/lib/rspec/multiprocess_runner/worker.rb +0 -8
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 492b1be42a4af88ed0b980c32fb9f7e32c5b2b0a
|
4
|
+
data.tar.gz: a3be0c1b7fb90d04be2225047b00545ffd203afa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 851c47a16f073be4d29186eaf502ef5b1760ea3e5471fd3f50c3aa2fdaad9d2d28e0648f7139e03cf6e06ed5a0be5cf43980fd191ba44e279cd4dc28f294d7bd
|
7
|
+
data.tar.gz: 9cffdb7de487c780bb0ef7533481f56ec62e56af58a016ec8f11397275454e08dc414c8d5b85784a437a0d02039669746f2a0938dbbe9daa9dbfec598bd57fbd
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.5.1
|
2
|
+
|
3
|
+
* Added flag '--use-given-order' that respects the order files are passed on the
|
4
|
+
commandline. The default is still to sort by file size.
|
5
|
+
* Removed some unneeded RSpec 2 configuration.
|
6
|
+
|
1
7
|
# 0.5.0
|
2
8
|
|
3
9
|
* Added support for RSpec 3. Did not maintain compatability with RSpec 2.
|
data/README.md
CHANGED
@@ -27,7 +27,8 @@ for setting up parallel environments.)
|
|
27
27
|
|
28
28
|
## Limitations
|
29
29
|
|
30
|
-
* Only works with RSpec 2. Does not work with
|
30
|
+
* Only works with RSpec 3 (>= 2.99). Does not work with previous versions of
|
31
|
+
RSpec.
|
31
32
|
* Does not work on Windows or JRuby. Since it relies on `fork(2)`, it probably
|
32
33
|
never will.
|
33
34
|
* Does not support RSpec custom formatters.
|
data/exe/multirspec
CHANGED
@@ -14,7 +14,8 @@ coordinator = RSpec::MultiprocessRunner::Coordinator.new(
|
|
14
14
|
example_timeout_seconds: options.example_timeout_seconds,
|
15
15
|
test_env_number_first_is_1: options.first_is_1,
|
16
16
|
rspec_options: options.rspec_options,
|
17
|
-
log_failing_files: options.log_failing_files
|
17
|
+
log_failing_files: options.log_failing_files,
|
18
|
+
use_given_order: options.use_given_order
|
18
19
|
}
|
19
20
|
)
|
20
21
|
|
@@ -7,7 +7,7 @@ module RSpec::MultiprocessRunner
|
|
7
7
|
class CommandLineOptions
|
8
8
|
attr_accessor :worker_count, :file_timeout_seconds, :example_timeout_seconds,
|
9
9
|
:rspec_options, :explicit_files_or_directories, :pattern, :log_failing_files,
|
10
|
-
:first_is_1
|
10
|
+
:first_is_1, :use_given_order
|
11
11
|
|
12
12
|
DEFAULT_WORKER_COUNT = 3
|
13
13
|
|
@@ -19,6 +19,7 @@ module RSpec::MultiprocessRunner
|
|
19
19
|
self.log_failing_files = nil
|
20
20
|
self.rspec_options = []
|
21
21
|
self.first_is_1 = default_first_is_1
|
22
|
+
self.use_given_order = false
|
22
23
|
end
|
23
24
|
|
24
25
|
def parse(command_line_args, error_stream=$stderr)
|
@@ -51,7 +52,7 @@ module RSpec::MultiprocessRunner
|
|
51
52
|
else
|
52
53
|
Dir[path.join(pattern).relative_path_from(relative_root)]
|
53
54
|
end
|
54
|
-
end
|
55
|
+
end
|
55
56
|
end
|
56
57
|
|
57
58
|
private
|
@@ -114,6 +115,10 @@ module RSpec::MultiprocessRunner
|
|
114
115
|
self.first_is_1 = true
|
115
116
|
end
|
116
117
|
|
118
|
+
parser.on("-O", "--use-given-order", "Use the order that the files are given as arguments") do
|
119
|
+
self.use_given_order = true
|
120
|
+
end
|
121
|
+
|
117
122
|
parser.on_tail("-h", "--help", "Prints this help") do
|
118
123
|
help_requested!
|
119
124
|
end
|
@@ -11,7 +11,7 @@ module RSpec::MultiprocessRunner
|
|
11
11
|
@test_env_number_first_is_1 = options[:test_env_number_first_is_1]
|
12
12
|
@log_failing_files = options[:log_failing_files]
|
13
13
|
@rspec_options = options[:rspec_options]
|
14
|
-
@spec_files = sort_files(files)
|
14
|
+
@spec_files = options[:use_given_order] ? files : sort_files(files)
|
15
15
|
@workers = []
|
16
16
|
@stopped_workers = []
|
17
17
|
end
|
@@ -37,12 +37,6 @@ module RSpec::MultiprocessRunner
|
|
37
37
|
@file_timeout_seconds = options[:file_timeout_seconds]
|
38
38
|
@test_env_number_first_is_1 = options[:test_env_number_first_is_1]
|
39
39
|
@example_results = []
|
40
|
-
|
41
|
-
# Use a single configuration and world across all individual runs
|
42
|
-
# This will not be necessary to do manually in RSpec 3 — it does not
|
43
|
-
# reset the globals after each run.
|
44
|
-
@rspec_configuration = RSpec.configuration
|
45
|
-
@rspec_world = RSpec.world
|
46
40
|
end
|
47
41
|
|
48
42
|
##
|
@@ -277,8 +271,6 @@ module RSpec::MultiprocessRunner
|
|
277
271
|
@current_file = spec_file
|
278
272
|
set_process_name
|
279
273
|
|
280
|
-
RSpec.configuration = @rspec_configuration
|
281
|
-
RSpec.world = @rspec_world
|
282
274
|
# If we don't do this, every previous spec is run every time run is called
|
283
275
|
RSpec.world.example_groups.clear
|
284
276
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-multiprocess_runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rhett Sutphin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -130,9 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.5.1
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: A runner for RSpec 3 that uses multiple processes to execute specs in parallel
|
137
137
|
test_files: []
|
138
|
-
has_rdoc:
|