parallelized_specs 0.3.26 → 0.3.27

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.26"
15
+ gem.version = "0.3.27"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -47,16 +47,6 @@ namespace :parallel do
47
47
  task 'spec', :count, :pattern, :options, :arguments do |t, args|
48
48
  count, pattern = ParallelizedSpecs.parse_rake_args(args)
49
49
  opts = {:count => count, :pattern => pattern, :root => Rails.root, :files => args[:arguments]}
50
- exit_result = ParallelizedSpecs.execute_parallel_specs(opts)
51
-
52
- puts "#{exit_result}" >> "/tmp/exit_code.log"
53
- puts "going to check for reruns"
54
-
55
- if $? != 0 && FileTest.exist?("#{RAILS_ROOT}/tmp/parallel_log/rspec.failures")
56
- ParallelizedSpecs.rerun()
57
- else
58
- abort "#{exit_result}"
59
- end
60
-
50
+ ParallelizedSpecs.execute_parallel_specs(opts)
61
51
  end
62
52
  end
@@ -118,7 +118,11 @@ class ParallelizedSpecs
118
118
 
119
119
  #exit with correct status code so rake parallel:test && echo 123 works
120
120
  failed = test_results.any? { |result| result[:exit_status] != 0 }
121
- abort "#{name.capitalize}s Failed" if failed
121
+ if failed && FileTest.exist?("#{RAILS_ROOT}/tmp/parallel_log/rspec.failures")
122
+ ParallelizedSpecs.rerun()
123
+ else
124
+ abort "#{name.capitalize}s Failed" if failed
125
+ end
122
126
  end
123
127
 
124
128
  # parallel:spec[:count, :pattern, :options]
@@ -297,20 +301,20 @@ class ParallelizedSpecs
297
301
  if @rerun_failures.count > 0
298
302
  puts "1 or more examples failed on rerun, rspec will mark this build as a failure"
299
303
  #dump errors to file
300
- exit(1)
304
+ abort "some specs failed on rerun"
301
305
  elsif @rerun_passes.count >= @error_count.to_i
302
306
  puts "all rerun examples passed, rspec will mark this build as passed"
303
307
  $rerun_success = true
304
308
  exit(0)
305
309
  else
306
310
  put "something unexpected happened not safe to mark the build as passed."
307
- exit(1)
311
+ abort "unexpected situation on rerun"
308
312
  end
309
313
  end
314
+ else
315
+ "No errors file was found, marking build as a success"
316
+ exit(0)
310
317
  end
311
- else
312
- "No errors file was found, marking build as a success"
313
- exit(0)
314
318
  end
315
319
  end
316
320
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.3.26"
8
+ s.version = "0.3.27"
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"]
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: 39
4
+ hash: 37
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 26
10
- version: 0.3.26
9
+ - 27
10
+ version: 0.3.27
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jake Sorce, Bryan Madsen, Shawn Meredith