parallelized_specs 0.2.93 → 0.2.94

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.2.93"
15
+ gem.version = "0.2.94"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.93
1
+ 0.2.94
@@ -7,7 +7,7 @@ class ParallelizedSpecs::ExampleRerunFailuresLogger < ParallelizedSpecs::SpecLog
7
7
  if example.location != nil
8
8
  unless !!self.example_group.nested_descriptions.to_s.match(/shared/) || !!self.instance_variable_get(:@example_group).examples.last.location.match(/helper/)
9
9
  @failed_examples ||= []
10
- @failed_examples << "#{example.location.match(/spec.*\d/).to_s.chomp}"
10
+ @failed_examples << "#{example.location.match(/spec.*\d/).to_s.chomp} "
11
11
  end
12
12
  end
13
13
  else
@@ -4,7 +4,6 @@ class ParallelizedSpecs::SharedExampleRerunFailuresLogger < ParallelizedSpecs::S
4
4
 
5
5
  def example_failed(example, *args)
6
6
  if RSPEC_1
7
-
8
7
  if example.location != nil && example.location.match(/spec.*\d/).to_s != nil
9
8
  @failed_shared_examples ||= {}
10
9
  spec_caller = self.example_group.backtrace.match(/spec.*\d/).to_s
@@ -0,0 +1,47 @@
1
+ require 'parallelized_specs/spec_logger_base'
2
+
3
+ class ParallelizedSpecs::TrendingExampleFailures < ParallelizedSpecs::SpecLoggerBase
4
+ def initialize(*args)
5
+ @output ||= args[1] || args[0] # rspec 1 has output as second argument
6
+
7
+ # need to handle clean up in hudson_build.sh
8
+ if String === @output # a path ?
9
+ FileUtils.mkdir_p(File.dirname(@output))
10
+ @output = File.open(@output, 'a+')
11
+ elsif File === @output # close and restart in append mode
12
+ @output.close
13
+ @output = File.open(@output.path, 'a+')
14
+ end
15
+ end
16
+
17
+ def example_failed(example, counter, failure)
18
+ if RSPEC_1
19
+ super
20
+ if example.location != nil
21
+ @failed_examples ||= {}
22
+ #putting tabs between each output as a delimiter
23
+ @failed_examples["#{example.location.match(/spec.*\d/).to_s}*"] = ["#{example.description}*", "#{failure.header}*", "#{failure.exception.to_s.gsub(/\n/,"")}*", "#{failure.exception.backtrace.to_s.gsub(/\n/,"")}*", "#{Time.now.to_date}*", "#{}"]
24
+ end
25
+ else
26
+ super
27
+ end
28
+ end
29
+
30
+ # RSpec 1: dumps 1 failed spec
31
+ def dump_failure(*args)
32
+ end
33
+
34
+ # RSpec 2: dumps all failed specs
35
+ def dump_failures(*args)
36
+ end
37
+
38
+ def dump_summary(*args)
39
+ lock_output do
40
+ (@failed_examples||{}).each_pair do |example, details|
41
+ @output.puts "#{example}#{details}"
42
+ end
43
+ @output.flush
44
+ end
45
+ end
46
+ end
47
+
@@ -6,6 +6,7 @@ require 'parallelized_specs/spec_error_logger'
6
6
  require 'parallelized_specs/spec_error_count_logger'
7
7
  require 'parallelized_specs/spec_start_finish_logger'
8
8
  require 'parallelized_specs/shared_example_failures_logger'
9
+ require 'parallelized_specs/trending_example_failures_logger'
9
10
  require 'parallelized_specs/example_failures_logger'
10
11
 
11
12
  class ParallelizedSpecs
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.2.93"
8
+ s.version = "0.2.94"
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-10-05"
12
+ s.date = "2012-10-10"
13
13
  s.email = "jake@instructure.com"
14
14
  s.files = [
15
15
  "Gemfile",
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
31
31
  "lib/parallelized_specs/spec_start_finish_logger.rb",
32
32
  "lib/parallelized_specs/spec_summary_logger.rb",
33
33
  "lib/parallelized_specs/tasks.rb",
34
+ "lib/parallelized_specs/trending_example_failures_logger.rb",
34
35
  "lib/tasks/parallelized_specs.rake",
35
36
  "parallelized_specs.gemspec",
36
37
  "spec/integration_spec.rb",
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: 173
4
+ hash: 171
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 93
10
- version: 0.2.93
9
+ - 94
10
+ version: 0.2.94
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-10-05 00:00:00 Z
18
+ date: 2012-10-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: parallel
@@ -59,6 +59,7 @@ files:
59
59
  - lib/parallelized_specs/spec_start_finish_logger.rb
60
60
  - lib/parallelized_specs/spec_summary_logger.rb
61
61
  - lib/parallelized_specs/tasks.rb
62
+ - lib/parallelized_specs/trending_example_failures_logger.rb
62
63
  - lib/tasks/parallelized_specs.rake
63
64
  - parallelized_specs.gemspec
64
65
  - spec/integration_spec.rb