parallel_tests 2.22.1 → 2.23.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/lib/parallel_tests/tasks.rb +8 -6
- data/lib/parallel_tests/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f75b65c14028c6a0d25e067476f25201667eb1d8ecaf8360c2ca6e393a817a2f
|
4
|
+
data.tar.gz: eabee9ad729e7dcbd334c53a4d66ea89bcde2258d771af6d2ced86dfe38fe9b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76aca03bc645860de2d48ca4147473e3941cb6ebd2aa71ac019f0ee9de72d13d61c02ddd0f4e46cf5ee566f3f4049acccb45e617544ae92a0f5debbe9dbdeaed
|
7
|
+
data.tar.gz: 3160c7c718b14c628b3bcd22da4d20f79ed6f94a692f0818ddd58559037413435a056215c28e86d470b00d064a30bd6746f97cff226faf788d6924fa04b57317
|
data/lib/parallel_tests/tasks.rb
CHANGED
@@ -65,10 +65,10 @@ module ParallelTests
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
# parallel:spec[:count, :pattern, :options]
|
68
|
+
# parallel:spec[:count, :pattern, :options, :pass_through]
|
69
69
|
def parse_args(args)
|
70
70
|
# order as given by user
|
71
|
-
args = [args[:count], args[:pattern], args[:options]]
|
71
|
+
args = [args[:count], args[:pattern], args[:options], args[:pass_through]]
|
72
72
|
|
73
73
|
# count given or empty ?
|
74
74
|
# parallel:spec[2,models,options]
|
@@ -77,8 +77,9 @@ module ParallelTests
|
|
77
77
|
num_processes = count.to_i unless count.to_s.empty?
|
78
78
|
pattern = args.shift
|
79
79
|
options = args.shift
|
80
|
+
pass_through = args.shift
|
80
81
|
|
81
|
-
[num_processes, pattern.to_s, options.to_s]
|
82
|
+
[num_processes, pattern.to_s, options.to_s, pass_through.to_s]
|
82
83
|
end
|
83
84
|
end
|
84
85
|
end
|
@@ -152,11 +153,11 @@ namespace :parallel do
|
|
152
153
|
|
153
154
|
['test', 'spec', 'features', 'features-spinach'].each do |type|
|
154
155
|
desc "Run #{type} in parallel with parallel:#{type}[num_cpus]"
|
155
|
-
task type, [:count, :pattern, :options] do |t, args|
|
156
|
+
task type, [:count, :pattern, :options, :pass_through] do |t, args|
|
156
157
|
ParallelTests::Tasks.check_for_pending_migrations
|
157
158
|
ParallelTests::Tasks.load_lib
|
158
159
|
|
159
|
-
count, pattern, options = ParallelTests::Tasks.parse_args(args)
|
160
|
+
count, pattern, options, pass_through = ParallelTests::Tasks.parse_args(args)
|
160
161
|
test_framework = {
|
161
162
|
'spec' => 'rspec',
|
162
163
|
'test' => 'test',
|
@@ -173,7 +174,8 @@ namespace :parallel do
|
|
173
174
|
command = "#{ParallelTests.with_ruby_binary(Shellwords.escape(executable))} #{type} --type #{test_framework} " \
|
174
175
|
"-n #{count} " \
|
175
176
|
"--pattern '#{pattern}' " \
|
176
|
-
"--test-options '#{options}'"
|
177
|
+
"--test-options '#{options}' " \
|
178
|
+
"#{pass_through}"
|
177
179
|
abort unless system(command) # allow to chain tasks e.g. rake parallel:spec parallel:features
|
178
180
|
end
|
179
181
|
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.
|
4
|
+
version: 2.23.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-09-
|
11
|
+
date: 2018-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|