parallelized_specs 0.4.16 → 0.4.17
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 +1 -1
- data/lib/parallelized_specs.rb +7 -6
- data/parallelized_specs.gemspec +2 -2
- metadata +4 -4
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.4.
|
15
|
+
gem.version = "0.4.17"
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
18
18
|
rescue LoadError
|
data/lib/parallelized_specs.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'parallel'
|
2
|
+
require 'parallel'
|
2
3
|
raise "please ' gem install parallel '" if Gem::Version.new(Parallel::VERSION) < Gem::Version.new('0.4.2')
|
3
4
|
require 'parallelized_specs/grouper'
|
4
5
|
require 'parallelized_specs/railtie'
|
@@ -300,7 +301,7 @@ class ParallelizedSpecs
|
|
300
301
|
def self.parse_result(result)
|
301
302
|
puts "INFO: this is the result\n#{result}"
|
302
303
|
#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
|
303
|
-
rerun_status = result.scan(/\d*[^\D]\d*/).
|
304
|
+
rerun_status = result.scan(/\d*[^\D]\d*/).to_s
|
304
305
|
puts "INFO: this is the rerun_status\n#{rerun_status}"
|
305
306
|
example_index = rerun_status.length - 2
|
306
307
|
@examples = rerun_status[example_index].to_i
|
@@ -346,7 +347,7 @@ class ParallelizedSpecs
|
|
346
347
|
abort "SEVERE: #{@error_count} errors, but the build failed, errors were not written to the file or there is something else wrong, marking build as a failure"
|
347
348
|
when code == 6
|
348
349
|
print_failures("#{RAILS_ROOT}/tmp/parallel_log/error.log")
|
349
|
-
abort "SEVERE: #{@error_count} errors are to many to rerun, marking the build as a failure"
|
350
|
+
abort "SEVERE: #{@error_count} errors are to many to rerun, marking the build as a failure. Max errors defined for this build is #{@max_reruns}"
|
350
351
|
when code == 7
|
351
352
|
puts "#Total errors #{@error_count}"
|
352
353
|
abort "SEVERE: unexpected error information, please check errors are being written to file correctly"
|
@@ -381,15 +382,16 @@ class ParallelizedSpecs
|
|
381
382
|
@error_count = %x{wc -l "#{@filename}"}.match(/\d*[^\D]/).to_s #counts the number of lines in the file
|
382
383
|
@error_count = @error_count.to_i
|
383
384
|
puts "INFO: error count = #@error_count"
|
385
|
+
@max_reruns = ENV["RERUNS"].to_i || 9
|
384
386
|
|
385
|
-
if !@error_count.between?(1,
|
387
|
+
if !@error_count.between?(1, @max_reruns)
|
386
388
|
puts "INFO: total errors are not in rerun eligibility range"
|
387
389
|
case
|
388
390
|
when @error_count == 0
|
389
391
|
puts "INFO: 0 errors build being aborted"
|
390
392
|
abort_reruns(5)
|
391
|
-
when @error_count >
|
392
|
-
puts "INFO: error count has exceeded maximum errors of
|
393
|
+
when @error_count > @max_reruns
|
394
|
+
puts "INFO: error count has exceeded maximum errors of #{@max_reruns}"
|
393
395
|
abort_reruns(6)
|
394
396
|
else
|
395
397
|
abort_reruns(7)
|
@@ -448,7 +450,6 @@ class ParallelizedSpecs
|
|
448
450
|
|
449
451
|
|
450
452
|
def self.determine_rerun_outcome
|
451
|
-
|
452
453
|
if @rerun_failures.count > 0
|
453
454
|
abort_reruns(8)
|
454
455
|
elsif @rerun_passes.count >= @error_count
|
data/parallelized_specs.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "parallelized_specs"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.17"
|
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 = "2013-
|
12
|
+
s.date = "2013-03-14"
|
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:
|
4
|
+
hash: 45
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 17
|
10
|
+
version: 0.4.17
|
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: 2013-
|
18
|
+
date: 2013-03-14 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: parallel
|