parallel_tests 1.0.7 → 1.0.8

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: fd5692678ef7dc4c63ac278dffdcdde4290d01db
4
- data.tar.gz: 901fe93471c491f6ca75ed3b77b234f5ffa8e3b4
3
+ metadata.gz: 686483f7dc8498a77a68696e67e20a4306c01227
4
+ data.tar.gz: 01b43608ce56b14847094336251caeb00b19b334
5
5
  SHA512:
6
- metadata.gz: 968eb5b10707481f6e244ea8e57662e6d9caf6a0998333d27c0352f0f1e04b51bb97b4bd2ff12c039a792a3cce29ba605a437bfbcf44b4f582fbc0c76af8afc8
7
- data.tar.gz: 93c26b8b81e2c53c3b6bf13ac6f2ebb26b365bcb8a974588c72bf39d957f322f0faaa80431b9ee598aab8ef094bc323bf70fb4bc9d60cdb60602eef4a585b985
6
+ metadata.gz: e12060b53c7dda0bf83378bc4281b732bc95c530ac3b91ece0cd6a5ac99c9ef93d8be70b19c36403c34fdc2db09a158d688b5925020991d6eda0033c131f0ad1
7
+ data.tar.gz: 095d5a39cd83a0789c18c0366915c8ddb18866cf461892179fae0dfcc09d6754191f6cab9b0195162ea3c2cc446b6416ee58d5efc53a568f5433dc3aeff011d8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (1.0.7)
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.2.2)
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, num_processes, options)
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
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '1.0.7'
2
+ VERSION = Version = '1.0.8'
3
3
  end
@@ -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'
@@ -19,6 +19,7 @@ end
19
19
 
20
20
  RSpec.configure do |config|
21
21
  config.filter_run :focus => true
22
+ config.filter_run_excluding :encoding => (RUBY_VERSION < "1.9")
22
23
  config.run_all_when_everything_filtered = true
23
24
 
24
25
  config.after 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: 1.0.7
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: 2014-09-10 00:00:00.000000000 Z
11
+ date: 2015-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel