parallelized_specs 0.3.39 → 0.3.40

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.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ begin
12
12
  gem.email = "jake@instructure.com"
13
13
  gem.homepage = "http://github.com/jakesorce/#{gem.name}"
14
14
  gem.authors = "Jake Sorce, Bryan Madsen, Shawn Meredith"
15
- gem.version = "0.3.39"
15
+ gem.version = "0.3.40"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -275,7 +275,7 @@ class ParallelizedSpecs
275
275
  rerun_specs = []
276
276
  filename = "#{RAILS_ROOT}/tmp/parallel_log/rspec.failures"
277
277
 
278
- @error_count = %x{wc -l "#{filename}"}.match(/\d/).to_s #counts the number of lines in the file
278
+ @error_count = %x{wc -l "#{filename}"}.match(/\d*[^\D]/).to_s #counts the number of lines in the file
279
279
  @error_count = @error_count.to_i
280
280
 
281
281
  case
@@ -298,15 +298,20 @@ class ParallelizedSpecs
298
298
 
299
299
  result = %x[DISPLAY=:99 bundle exec rake spec #{l}]
300
300
  #can't just use exit code, if specs fail to start it will pass or if a spec isn't found, and sometimes rspec 1 exit codes aren't right
301
- rerun_status = result.match(/1 example, \d failure/).to_s
301
+ rerun_status = result.scan(/\d*[^\D]\d*/).to_a
302
+ if rerun_status.length >= 2
303
+ @examples = rerun_status[0].to_i
304
+ @failures = rerun_status[1].to_i
305
+ else
306
+ abort "spec didn't actually run, ending rerun process early"
307
+ end
302
308
 
303
- case rerun_status
304
- when "" #when specs fail to run it exits with 0 examples, 0 failures and won't be matched by the previous regex
309
+ if @examples == 0 #when specs fail to run it exits with 0 examples, 0 failures and won't be matched by the previous regex
305
310
  abort "the spec failed to run on the rerun try, marking build as failed"
306
- when "1 example, 1 failure"
311
+ elsif @failures > 0
307
312
  puts "the example failed again"
308
313
  @rerun_failures << l
309
- when "1 example, 0 failure"
314
+ elseif @examples > 0 && @failures == 0
310
315
  puts "the example passed and is being marked as a success"
311
316
  @rerun_passes << l
312
317
  else
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.3.39"
8
+ s.version = "0.3.40"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jake Sorce, Bryan Madsen, Shawn Meredith"]
12
- s.date = "2012-11-14"
12
+ s.date = "2012-11-15"
13
13
  s.email = "jake@instructure.com"
14
14
  s.files = [
15
15
  "Gemfile",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallelized_specs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 93
4
+ hash: 67
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 39
10
- version: 0.3.39
9
+ - 40
10
+ version: 0.3.40
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jake Sorce, Bryan Madsen, Shawn Meredith
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-14 00:00:00 Z
18
+ date: 2012-11-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: parallel