parallel_tests 0.16.6 → 0.16.7

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: b78e58ec8786ec81ea30d559f6d4600afeca37ac
4
- data.tar.gz: 520fbcd03a8c79f46d2f5280631bbe7f72661214
3
+ metadata.gz: a0401013c4446f58aa5d69d8af58e42fbe445716
4
+ data.tar.gz: 21c76a3992e163e0e469a4e999ab72d479c3d7d8
5
5
  SHA512:
6
- metadata.gz: bd5215563d9fb5d0ffd7317e20d3628dca7e9d540fa74b4e95d5e016115e5558f0e55d17c5b3be8a76cd7c6b1995f00659eac1b839c92b33741079847b1844ab
7
- data.tar.gz: 1d4a0bd2496827d8683f6bb8ea62802ac78cc0ccb798a5be60759278da7f72ba33240eb696ff5ab6a38db643c9885aea0753d7414683e804a4c9c75f3af73bdc
6
+ metadata.gz: c5e028be9def6bd10ca21c494f391e11fb18dce725e3bf46db8c3a312b4b5c2cbb29f1c73a59517f219acdd500ea33be1cc7721c8355cc35532111d153de2096
7
+ data.tar.gz: 9b1bc90b9bbe330f55a70782b59d77f3f3c0a145597daa8c3167bd78b2e1520365dd3a014fe2e0dc1e6a44496d34d8f5d49eac253c5c43c445bbf7236a7d3a9b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.16.6)
4
+ parallel_tests (0.16.7)
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
  - [sidfarkus](https://github.com/sidfarkus)
292
292
  - [Colin Harris](https://github.com/aberant)
293
293
  - [Wataru MIYAGUNI](https://github.com/gongo)
294
+ - [Brandon Turner](https://github.com/blt04)
294
295
 
295
296
  [Michael Grosser](http://grosser.it)<br/>
296
297
  michael@grosser.it<br/>
@@ -30,8 +30,10 @@ module ParallelTests
30
30
  activate_pipefail = "set -o pipefail"
31
31
  remove_ignored_lines = %Q{(grep -v "#{ignore_regex}" || test 1)}
32
32
 
33
- if system("#{activate_pipefail} 2>/dev/null && test 1")
34
- "#{activate_pipefail} && (#{command}) | #{remove_ignored_lines}"
33
+ if File.executable?('/bin/bash') && system('/bin/bash', '-c', "#{activate_pipefail} 2>/dev/null && test 1")
34
+ # We need to shell escape single quotes (' becomes '"'"') because
35
+ # run_in_parallel wraps command in single quotes
36
+ %Q{/bin/bash -c '"'"'#{activate_pipefail} && (#{command}) | #{remove_ignored_lines}'"'"'}
35
37
  else
36
38
  command
37
39
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.16.6'
2
+ VERSION = Version = '0.16.7'
3
3
  end
@@ -91,13 +91,16 @@ describe ParallelTests::Tasks do
91
91
 
92
92
  describe ".suppress_output" do
93
93
  def call(command, grep)
94
- result = `#{ParallelTests::Tasks.suppress_output(command, grep)}`
94
+ # Explictly run as a parameter to /bin/sh to simulate how
95
+ # the command will be run by parallel_test --exec
96
+ # This also tests shell escaping of single quotes
97
+ result = `/bin/sh -c '#{ParallelTests::Tasks.suppress_output(command, grep)}'`
95
98
  [result, $?.success?]
96
99
  end
97
100
 
98
101
  context "with pipefail supported" do
99
102
  before :all do
100
- if not system("set -o pipefail 2>/dev/null && test 1")
103
+ if not system("/bin/bash", "-c", "set -o pipefail 2>/dev/null && test 1")
101
104
  pending "pipefail is not supported on your system"
102
105
  end
103
106
  end
@@ -121,7 +124,7 @@ describe ParallelTests::Tasks do
121
124
 
122
125
  context "without pipefail supported" do
123
126
  before do
124
- ParallelTests::Tasks.should_receive(:system).with("set -o pipefail 2>/dev/null && test 1").and_return false
127
+ ParallelTests::Tasks.should_receive(:system).with('/bin/bash', '-c', 'set -o pipefail 2>/dev/null && test 1').and_return false
125
128
  end
126
129
 
127
130
  it "should not filter and succeed" do
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.16.6
4
+ version: 0.16.7
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-12-30 00:00:00.000000000 Z
11
+ date: 2014-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel