parallelized_specs 0.2.1 → 0.2.2
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
data/lib/parallelized_specs.rb
CHANGED
@@ -5,8 +5,6 @@ require 'parallelized_specs/railtie'
|
|
5
5
|
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
|
-
require 'parallelized_specs/shared_example_failures_logger'
|
9
|
-
require 'parallelized_specs/example_failures_logger'
|
10
8
|
|
11
9
|
class ParallelizedSpecs
|
12
10
|
VERSION = File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).strip
|
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.2.
|
8
|
+
s.version = "0.2.2"
|
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"]
|
@@ -18,11 +18,9 @@ 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",
|
22
21
|
"lib/parallelized_specs/grouper.rb",
|
23
22
|
"lib/parallelized_specs/railtie.rb",
|
24
23
|
"lib/parallelized_specs/runtime_logger.rb",
|
25
|
-
"lib/parallelized_specs/shared_example_failures_logger.rb",
|
26
24
|
"lib/parallelized_specs/spec_error_count_logger.rb",
|
27
25
|
"lib/parallelized_specs/spec_error_logger.rb",
|
28
26
|
"lib/parallelized_specs/spec_failures_logger.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:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jake Sorce, Bryan Madsen, Shawn Meredith
|
@@ -46,11 +46,9 @@ files:
|
|
46
46
|
- Readme.md
|
47
47
|
- VERSION
|
48
48
|
- lib/parallelized_specs.rb
|
49
|
-
- lib/parallelized_specs/example_failures_logger.rb
|
50
49
|
- lib/parallelized_specs/grouper.rb
|
51
50
|
- lib/parallelized_specs/railtie.rb
|
52
51
|
- lib/parallelized_specs/runtime_logger.rb
|
53
|
-
- lib/parallelized_specs/shared_example_failures_logger.rb
|
54
52
|
- lib/parallelized_specs/spec_error_count_logger.rb
|
55
53
|
- lib/parallelized_specs/spec_error_logger.rb
|
56
54
|
- lib/parallelized_specs/spec_failures_logger.rb
|
@@ -1,33 +0,0 @@
|
|
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
|
-
|
@@ -1,43 +0,0 @@
|
|
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
|