parallel_tests 2.14.2 → 2.14.3

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
2
  SHA1:
3
- metadata.gz: e63015e49335d727c6653cbe672304d63ef983a7
4
- data.tar.gz: cd4280ed0ce9d8fdab0647f1b34f8b24d885753c
3
+ metadata.gz: 802a9d4fb83cd7fb9d5bce515e16a15271cfc428
4
+ data.tar.gz: a83ad7e7884ac668453980354288eb67a54dbe39
5
5
  SHA512:
6
- metadata.gz: 83fb00184843c80b7121f3a8a6a3a2e8153860a885d5ee40efb2b0eab7bacf5d8e12d23f18aa2732c5a402f0f5dadc76439fa832b4443b83e80f33a0ccc32fa0
7
- data.tar.gz: 12029850d47dde7c202e13ba0dc2c35e6aeda6f67f161bbceeef2d0a5dbaf3cf2f068f1ba9805cd54562bd633be7790d9856a1fc200a668a38151799928ab0ca
6
+ metadata.gz: fd07e77eaa82c01c1787bcf83c23a0176cee5c9c70dcc0b28a4b27df00efdbde013b70f11a122062f8b1d7cd047397b371115b9c894948933795f3ec23d41c2c
7
+ data.tar.gz: d5de114478e45b2a962e377fa8d382b261905391f7cb5acfed6737157237f922e93afbae474d42d173ec4e44ef464cdbcdbbe4ab2c284523080507e536d9442d
@@ -10,6 +10,7 @@ module ParallelTests
10
10
  else
11
11
  "ps -ef | grep [T]EST_ENV_NUMBER= 2>&1"
12
12
  end
13
+ RUBY_BINARY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
13
14
 
14
15
  autoload :CLI, "parallel_tests/cli"
15
16
  autoload :VERSION, "parallel_tests/version"
@@ -60,6 +61,10 @@ module ParallelTests
60
61
  end.to_i
61
62
  end
62
63
 
64
+ def with_ruby_binary(command)
65
+ WINDOWS ? "#{RUBY_BINARY} -- #{command}" : command
66
+ end
67
+
63
68
  def wait_for_other_processes_to_finish
64
69
  return unless ENV["TEST_ENV_NUMBER"]
65
70
  sleep 1 until number_of_running_processes <= 1
@@ -16,7 +16,7 @@ module ParallelTests
16
16
  def determine_executable
17
17
  cmd = case
18
18
  when File.exist?("bin/rspec")
19
- WINDOWS ? "ruby bin/rspec" : "bin/rspec"
19
+ "bin/rspec"
20
20
  when ParallelTests.bundler_enabled?
21
21
  cmd = (run("bundle show rspec-core") =~ %r{Could not find gem.*} ? "spec" : "rspec")
22
22
  "bundle exec #{cmd}"
@@ -17,6 +17,7 @@ module ParallelTests
17
17
  count = " -n #{options[:count]}" unless options[:count].to_s.empty?
18
18
  executable = File.expand_path("../../../bin/parallel_test", __FILE__)
19
19
  command = "#{Shellwords.escape executable} --exec '#{cmd}'#{count}#{' --non-parallel' if options[:non_parallel]}"
20
+ command = ParallelTests.with_ruby_binary(command)
20
21
  abort unless system(command)
21
22
  end
22
23
 
@@ -163,10 +164,7 @@ namespace :parallel do
163
164
  "-n #{count} " \
164
165
  "--pattern '#{pattern}' " \
165
166
  "--test-options '#{options}'"
166
- if ParallelTests::WINDOWS
167
- ruby_binary = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
168
- command = "#{ruby_binary} #{command}"
169
- end
167
+ command = ParallelTests.with_ruby_binary(command)
170
168
  abort unless system(command) # allow to chain tasks e.g. rake parallel:spec parallel:features
171
169
  end
172
170
  end
@@ -76,6 +76,8 @@ module ParallelTests
76
76
  )
77
77
  cmd = "nice #{cmd}" if options[:nice]
78
78
  cmd = "#{cmd} 2>&1" if options[:combine_stderr]
79
+ cmd = ParallelTests.with_ruby_binary(cmd)
80
+
79
81
  puts cmd if options[:verbose]
80
82
 
81
83
  execute_command_and_capture_output(env, cmd, options[:serialize_stdout])
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '2.14.2'
2
+ VERSION = Version = '2.14.3'
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.14.2
4
+ version: 2.14.3
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-07-15 00:00:00.000000000 Z
11
+ date: 2017-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel