parallel_tests 1.0.7 → 1.0.8
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/Gemfile.lock +2 -2
- data/Readme.md +1 -0
- data/lib/parallel_tests/test/runner.rb +4 -1
- data/lib/parallel_tests/version.rb +1 -1
- data/spec/integration_spec.rb +18 -0
- data/spec/spec_helper.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 686483f7dc8498a77a68696e67e20a4306c01227
|
4
|
+
data.tar.gz: 01b43608ce56b14847094336251caeb00b19b334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e12060b53c7dda0bf83378bc4281b732bc95c530ac3b91ece0cd6a5ac99c9ef93d8be70b19c36403c34fdc2db09a158d688b5925020991d6eda0033c131f0ad1
|
7
|
+
data.tar.gz: 095d5a39cd83a0789c18c0366915c8ddb18866cf461892179fae0dfcc09d6754191f6cab9b0195162ea3c2cc446b6416ee58d5efc53a568f5433dc3aeff011d8
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
parallel_tests (1.0.
|
4
|
+
parallel_tests (1.0.8)
|
5
5
|
parallel
|
6
6
|
|
7
7
|
GEM
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
gherkin-ruby (0.3.0)
|
25
25
|
multi_json (1.8.2)
|
26
26
|
multi_test (0.0.2)
|
27
|
-
parallel (1.
|
27
|
+
parallel (1.3.3)
|
28
28
|
rake (10.0.3)
|
29
29
|
rspec (2.13.0)
|
30
30
|
rspec-core (~> 2.13.0)
|
data/Readme.md
CHANGED
@@ -299,6 +299,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
|
|
299
299
|
- [Stanislaw Wozniak](https://github.com/sponte)
|
300
300
|
- [Dmitry Polushkin](https://github.com/dmitry)
|
301
301
|
- [Samer Masry](https://github.com/smasry)
|
302
|
+
- [Volodymyr Mykhailyk](https:/github.com/volodymyr-mykhailyk)
|
302
303
|
|
303
304
|
[Michael Grosser](http://grosser.it)<br/>
|
304
305
|
michael@grosser.it<br/>
|
@@ -51,7 +51,7 @@ module ParallelTests
|
|
51
51
|
Grouper.in_even_groups_by_size(tests, num_groups, options)
|
52
52
|
end
|
53
53
|
|
54
|
-
def execute_command(cmd, process_number,
|
54
|
+
def execute_command(cmd, process_number, num_processes, options)
|
55
55
|
env = (options[:env] || {}).merge(
|
56
56
|
"TEST_ENV_NUMBER" => test_env_number(process_number),
|
57
57
|
"PARALLEL_TEST_GROUPS" => num_processes
|
@@ -120,6 +120,9 @@ module ParallelTests
|
|
120
120
|
loop do
|
121
121
|
begin
|
122
122
|
read = out.readpartial(1000000) # read whatever chunk we can get
|
123
|
+
if RUBY_VERSION >= "1.9" && Encoding.default_internal
|
124
|
+
read = read.force_encoding(Encoding.default_internal)
|
125
|
+
end
|
123
126
|
result << read
|
124
127
|
unless silence
|
125
128
|
$stdout.print read
|
data/spec/integration_spec.rb
CHANGED
@@ -70,6 +70,24 @@ describe 'CLI' do
|
|
70
70
|
result.should include('Byłem tu')
|
71
71
|
end
|
72
72
|
|
73
|
+
it "respects default encoding when reading child stdout", :encoding => true do
|
74
|
+
write 'test/xxx_test.rb', <<-EOF
|
75
|
+
# encoding: utf-8
|
76
|
+
require 'test/unit'
|
77
|
+
class XTest < Test::Unit::TestCase
|
78
|
+
def test_unicode
|
79
|
+
raise '¯\\_(ツ)_/¯'
|
80
|
+
end
|
81
|
+
end
|
82
|
+
EOF
|
83
|
+
# Need to tell Ruby to default to utf-8 to simulate environments where
|
84
|
+
# this is set. (Otherwise, it defaults to nil and the undefined conversion
|
85
|
+
# issue doesn't come up.)
|
86
|
+
result = run_tests('test', :fail => true,
|
87
|
+
:export => 'RUBYOPT=-Eutf-8:utf-8')
|
88
|
+
result.should include('¯\_(ツ)_/¯')
|
89
|
+
end
|
90
|
+
|
73
91
|
it "does not run any tests if there are none" do
|
74
92
|
write 'spec/xxx_spec.rb', '1'
|
75
93
|
result = run_tests "spec", :type => 'rspec'
|
data/spec/spec_helper.rb
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|