parallelized_specs 0.1.9 → 0.2.0
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
@@ -11,8 +11,8 @@ begin
|
|
11
11
|
gem.summary = "Run rspec tests in parallel"
|
12
12
|
gem.email = "jake@instructure.com"
|
13
13
|
gem.homepage = "http://github.com/jakesorce/#{gem.name}"
|
14
|
-
gem.authors = "Jake Sorce, Bryan Madsen"
|
15
|
-
gem.version = "0.
|
14
|
+
gem.authors = "Jake Sorce, Bryan Madsen, Shawn Meredith"
|
15
|
+
gem.version = "0.2.0"
|
16
16
|
end
|
17
17
|
|
18
18
|
Jeweler::GemcutterTasks.new
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'parallelized_specs/spec_logger_base'
|
2
|
+
|
3
|
+
class ParallelizedSpecs::ExampleRerunFailuresLogger < ParallelizedSpecs::SpecLoggerBase
|
4
|
+
|
5
|
+
def example_failed(example, *args)
|
6
|
+
if RSPEC_1
|
7
|
+
unless !!self.example_group.nested_descriptions.to_s.match(/shared/) || !!self.instance_variable_get(:@example_group).examples.last.location.match(/helper/)
|
8
|
+
@failed_examples ||= []
|
9
|
+
@failed_examples << "#{example.location.match(/spec.*\d/).to_s} "
|
10
|
+
end
|
11
|
+
end
|
12
|
+
else
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
# RSpec 1: dumps 1 failed spec
|
17
|
+
def dump_failure(*args)
|
18
|
+
end
|
19
|
+
|
20
|
+
# RSpec 2: dumps all failed specs
|
21
|
+
def dump_failures(*args)
|
22
|
+
end
|
23
|
+
|
24
|
+
def dump_summary(*args)
|
25
|
+
lock_output do
|
26
|
+
if RSPEC_1
|
27
|
+
@output.puts "#{@failed_examples.to_s}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
@output.flush
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'parallelized_specs/spec_logger_base'
|
2
|
+
|
3
|
+
class ParallelizedSpecs::SharedExampleRerunFailuresLogger < ParallelizedSpecs::SpecLoggerBase
|
4
|
+
|
5
|
+
def example_failed(example, *args)
|
6
|
+
if RSPEC_1
|
7
|
+
@failed_shared_examples ||= {}
|
8
|
+
spec_caller = self.example_group.backtrace.match(/spec.*\d/).to_s #regex later to get right relative path
|
9
|
+
failed_shared_spec = example.location.match(/spec.*\d/).to_s
|
10
|
+
|
11
|
+
if !!self.example_group.nested_descriptions.to_s.match(/shared/) || !!self.instance_variable_get(:@example_group).examples.last.location.match(/helper/)
|
12
|
+
if spec_caller == @failed_shared_examples.keys.last || spec_caller == @failed_shared_examples.keys.first || !!spec_caller.match(/helper/)
|
13
|
+
key = @failed_shared_examples.keys.first
|
14
|
+
@failed_shared_examples[key] << "#{failed_shared_spec} "
|
15
|
+
else
|
16
|
+
@failed_shared_examples["#{spec_caller}"] = ["#{failed_shared_spec} "]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
else
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# RSpec 1: dumps 1 failed spec
|
25
|
+
def dump_failure(*args)
|
26
|
+
end
|
27
|
+
|
28
|
+
# RSpec 2: dumps all failed specs
|
29
|
+
def dump_failures(*args)
|
30
|
+
end
|
31
|
+
|
32
|
+
def dump_summary(*args)
|
33
|
+
lock_output do
|
34
|
+
if RSPEC_1
|
35
|
+
(@failed_shared_examples||{}).each_pair do |caller, example|
|
36
|
+
@output.puts "#{caller}:\n\n #{example}\n\n "
|
37
|
+
end
|
38
|
+
end
|
39
|
+
@output.flush
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
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.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Jake Sorce, Bryan Madsen"]
|
12
|
-
s.date = "2012-
|
11
|
+
s.authors = ["Jake Sorce, Bryan Madsen, Shawn Meredith"]
|
12
|
+
s.date = "2012-09-27"
|
13
13
|
s.email = "jake@instructure.com"
|
14
14
|
s.files = [
|
15
15
|
"Gemfile",
|
@@ -18,9 +18,11 @@ Gem::Specification.new do |s|
|
|
18
18
|
"Readme.md",
|
19
19
|
"VERSION",
|
20
20
|
"lib/parallelized_specs.rb",
|
21
|
+
"lib/parallelized_specs/example_failures_logger.rb",
|
21
22
|
"lib/parallelized_specs/grouper.rb",
|
22
23
|
"lib/parallelized_specs/railtie.rb",
|
23
24
|
"lib/parallelized_specs/runtime_logger.rb",
|
25
|
+
"lib/parallelized_specs/shared_example_failures_logger.rb",
|
24
26
|
"lib/parallelized_specs/spec_error_count_logger.rb",
|
25
27
|
"lib/parallelized_specs/spec_error_logger.rb",
|
26
28
|
"lib/parallelized_specs/spec_failures_logger.rb",
|
@@ -40,7 +42,7 @@ Gem::Specification.new do |s|
|
|
40
42
|
]
|
41
43
|
s.homepage = "http://github.com/jakesorce/parallelized_specs"
|
42
44
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = "1.8.
|
45
|
+
s.rubygems_version = "1.8.24"
|
44
46
|
s.summary = "Run rspec tests in parallel"
|
45
47
|
|
46
48
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallelized_specs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
- Jake Sorce, Bryan Madsen
|
13
|
+
- Jake Sorce, Bryan Madsen, Shawn Meredith
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-09-27 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: parallel
|
@@ -46,9 +46,11 @@ files:
|
|
46
46
|
- Readme.md
|
47
47
|
- VERSION
|
48
48
|
- lib/parallelized_specs.rb
|
49
|
+
- lib/parallelized_specs/example_failures_logger.rb
|
49
50
|
- lib/parallelized_specs/grouper.rb
|
50
51
|
- lib/parallelized_specs/railtie.rb
|
51
52
|
- lib/parallelized_specs/runtime_logger.rb
|
53
|
+
- lib/parallelized_specs/shared_example_failures_logger.rb
|
52
54
|
- lib/parallelized_specs/spec_error_count_logger.rb
|
53
55
|
- lib/parallelized_specs/spec_error_logger.rb
|
54
56
|
- lib/parallelized_specs/spec_failures_logger.rb
|
@@ -94,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
96
|
requirements: []
|
95
97
|
|
96
98
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.8.
|
99
|
+
rubygems_version: 1.8.24
|
98
100
|
signing_key:
|
99
101
|
specification_version: 3
|
100
102
|
summary: Run rspec tests in parallel
|