parallelized_specs 0.3.20 → 0.3.21

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.20"
15
+ gem.version = "0.3.21"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -14,21 +14,13 @@ module RSpec
14
14
  f.puts retry_command(example)
15
15
  end
16
16
 
17
- def dump_summary(*args)
18
- ;
19
- end
17
+ def dump_summary(*args);end
20
18
 
21
- def dump_failures(*args)
22
- ;
23
- end
19
+ def dump_failures(*args);end
24
20
 
25
- def dump_failure(*args)
26
- ;
27
- end
21
+ def dump_failure(*args);end
28
22
 
29
- def dump_pending(*args)
30
- ;
31
- end
23
+ def dump_pending(*args);end
32
24
 
33
25
  def retry_command(example)
34
26
  spec_file = example_group.location.gsub("\"", "\\\"").match(/spec.*b/).to_s
@@ -42,27 +34,31 @@ module RSpec
42
34
  @rerun_passes ||= []
43
35
  @error_count = %x{wc -l "#{FILENAME}"}.match(/\d/).to_s #counts the number of lines in the file
44
36
 
45
- File.open("#{FILENAME}").each_line do |l|
46
- if @error_count.to_i > 1 && 10 # if there is 1 line but less that 10 errors the rerun will run
37
+ if @error_count.to_i > 1 && 10
38
+ @output.puts "rerunning #{@error_count} examples again"
39
+ File.open("#{FILENAME}").each_line do |l|
47
40
  rerun_failed_examples = true
41
+ @output.puts "#{l} will be ran and marked as a success if it passes"
48
42
  result = %x[bundle exec rake spec #{l}]
49
43
  rerun_status = result.match(/FAILED/).to_s
50
44
 
51
45
  if rerun_status == "FAILED"
46
+ @output.puts "the example failed again"
52
47
  @rerun_failures << l
53
48
  rerun_status = ""
54
49
  else
50
+ @output.puts "the example passed and is being marked as a success"
55
51
  @rerun_passes << l
56
52
  rerun_status = ""
57
53
  end
58
- end
59
- end #end file loop
54
+ end #end file loop
55
+ end
60
56
 
61
57
  if rerun_failed_examples
62
58
  if @rerun_failures.length > 0
63
- puts "1 or more examples failed on rerun, rspec will mark this build as a failure"
59
+ @output.puts "1 or more examples failed on rerun, rspec will mark this build as a failure"
64
60
  else
65
- puts "all rerun examples passed, rspec will mark this build as passed"
61
+ @output.puts "all rerun examples passed, rspec will mark this build as passed"
66
62
  $rerun_success = true
67
63
  Spec::Runner.options.instance_variable_get(:@reporter).instance_variable_get(:@failures).delete_if { |item| item != 'b' } #placeholder delete all failures in array approach
68
64
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.3.20"
8
+ s.version = "0.3.21"
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: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 20
10
- version: 0.3.20
9
+ - 21
10
+ version: 0.3.21
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jake Sorce, Bryan Madsen, Shawn Meredith