parallelized_specs 0.3.07 → 0.3.08
Sign up to get free protection for your applications and to get access to all the features.
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.
|
15
|
+
gem.version = "0.3.08"
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
18
18
|
rescue LoadError
|
@@ -1,14 +1,43 @@
|
|
1
1
|
require 'parallelized_specs/spec_logger_base'
|
2
2
|
|
3
3
|
class ParallelizedSpecs::TrendingExampleFailures < ParallelizedSpecs::SpecLoggerBase
|
4
|
+
def initialize(*args)
|
5
|
+
@output ||= args[1] || args[0] # rspec 1 has output as second argument
|
6
|
+
@hudson_build_info = File.read("#{RAILS_ROOT}/spec/build_info.txt")
|
7
|
+
if String === @output # a path ?
|
8
|
+
FileUtils.mkdir_p(File.dirname(@output))
|
9
|
+
@output = File.open(@output, 'a+')
|
10
|
+
elsif File === @output # close and restart in append mode
|
11
|
+
@output.close
|
12
|
+
@output = File.open(@output.path, 'a+')
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def example_failed(example, counter, failure)
|
17
|
+
if RSPEC_1
|
18
|
+
if example.location != nil && failure != nil
|
19
|
+
backtrace_tweaker.tweak_backtrace(error)
|
20
|
+
@failed_examples ||= {}
|
21
|
+
@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/,"")}*", "#{Date.today}*", "#{@hudson_build_info}"]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# RSpec 1: dumps 1 failed spec
|
27
|
+
def dump_failure(*args)
|
28
|
+
end
|
29
|
+
|
30
|
+
# RSpec 2: dumps all failed specs
|
31
|
+
def dump_failures(*args)
|
32
|
+
end
|
4
33
|
|
5
34
|
def dump_summary(*args)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
35
|
+
lock_output do
|
36
|
+
(@failed_examples||{}).each_pair do |example, details|
|
37
|
+
@output.puts "#{example}#{details}"
|
38
|
+
end
|
39
|
+
@output.flush
|
40
|
+
end
|
12
41
|
end
|
13
42
|
end
|
14
43
|
|
data/parallelized_specs.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "parallelized_specs"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.08"
|
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:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 8
|
10
|
+
version: 0.3.08
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jake Sorce, Bryan Madsen, Shawn Meredith
|