parallel_tests 0.15.2 → 0.15.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: b06b8b7a06a62107496d979771375e1ae39b260f
4
- data.tar.gz: 4bd2bb9780dd04d4aeb42d0e12676594036b544c
3
+ metadata.gz: 325f02c0fe908d90aefd0f92ca27e3f232929f8b
4
+ data.tar.gz: 285e87fa1189e7628ae0560cc889931719a26377
5
5
  SHA512:
6
- metadata.gz: 1a1193b83e575ea49b19d3dd6a327abfaeedca05e86f86304e575501ed7672cce923202cc931b0875c87d2c786d1b71d1c1f98fee86014c82bef90060c68b75b
7
- data.tar.gz: 71435234ad10665421a4cf07e6fafcc45ba8c9fbee3f021a564c67386e1ec901b8f2369763475e544f1861db492aa6faf6e0144d7a5d19ce742e5d07678e4972
6
+ metadata.gz: df0c5f289a917b126fac521860c9005c05c661aa32eb5cacdde12a72633110a8d0b802e150a7027f8aa8189ebafd94a776f3cd293c23deaa1f6d37f5866d350d
7
+ data.tar.gz: 03893ba586dd41e9e21f1c0b1ed1af8e41ec28b14af68f3344410994578d3aadafff691a82eeac1efb0f5444b2230bf44c188076a9de771beaba4e1b7e9c9d3e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.15.2)
4
+ parallel_tests (0.15.3)
5
5
  parallel
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -291,6 +291,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
291
291
  - [Izaak Alpert](https://github.com/karlhungus)
292
292
  - [Micah Geisel](https://github.com/botandrose)
293
293
  - [Exoth](https://github.com/Exoth)
294
+ - [sidfarkus](https://github.com/sidfarkus)
294
295
 
295
296
  [Michael Grosser](http://grosser.it)<br/>
296
297
  michael@grosser.it<br/>
@@ -1,8 +1,14 @@
1
1
  require "parallel"
2
2
  require "parallel_tests/railtie" if defined? Rails::Railtie
3
+ require "rbconfig"
3
4
 
4
5
  module ParallelTests
5
- GREP_PROCESSES_COMMAND = "ps -ef | grep [T]EST_ENV_NUMBER= 2>&1"
6
+ GREP_PROCESSES_COMMAND = \
7
+ if RbConfig::CONFIG['host_os'] =~ /win32/
8
+ "wmic process get commandline | findstr TEST_ENV_NUMBER 2>&1"
9
+ else
10
+ "ps -ef | grep [T]EST_ENV_NUMBER= 2>&1"
11
+ end
6
12
 
7
13
  autoload :CLI, "parallel_tests/cli"
8
14
  autoload :VERSION, "parallel_tests/version"
@@ -60,10 +60,16 @@ module ParallelTests
60
60
 
61
61
  def execute_command_and_capture_output(env, cmd, silence)
62
62
  # make processes descriptive / visible in ps -ef
63
+ windows = RbConfig::CONFIG['host_os'] =~ /win32/
64
+ separator = windows ? ' & ' : ';'
63
65
  exports = env.map do |k,v|
64
- "#{k}=#{v};export #{k}"
65
- end.join(";")
66
- cmd = "#{exports};#{cmd}"
66
+ if windows
67
+ "(SET \"#{k}=#{v}\")"
68
+ else
69
+ "#{k}=#{v};export #{k}"
70
+ end
71
+ end.join(separator)
72
+ cmd = "#{exports}#{separator}#{cmd}"
67
73
 
68
74
  output = open("|#{cmd}", "r") { |output| capture_output(output, silence) }
69
75
  exitstatus = $?.exitstatus
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.15.2'
2
+ VERSION = Version = '0.15.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: 0.15.2
4
+ version: 0.15.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: 2013-08-23 00:00:00.000000000 Z
11
+ date: 2013-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel