parallelized_specs 0.4.37 → 0.4.38
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/parallelized_specs/slow_spec_logger.rb +34 -0
- data/parallelized_specs.gemspec +2 -1
- metadata +4 -3
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.4.
|
15
|
+
gem.version = "0.4.38"
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
18
18
|
rescue LoadError
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'parallelized_specs'
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
|
5
|
+
|
6
|
+
class ParallelizedSpecs::SlowestSpecLogger < ParallelizedSpecs::SpecLoggerBase
|
7
|
+
|
8
|
+
def example_started(example)
|
9
|
+
@spec_start_time = Time.now
|
10
|
+
end
|
11
|
+
|
12
|
+
def example_passed(example)
|
13
|
+
total_time = determine_spec_duration(@spec_start_time)
|
14
|
+
write_total_spec_time(total_time, example)
|
15
|
+
end
|
16
|
+
|
17
|
+
def example_failed(example, count, failure)
|
18
|
+
total_time = determine_spec_duration(@spec_start_time)
|
19
|
+
write_total_spec_time(total_time, example)
|
20
|
+
end
|
21
|
+
|
22
|
+
def determine_spec_duration(spec_start_time)
|
23
|
+
total_time = Time.now - spec_start_time
|
24
|
+
total_time
|
25
|
+
end
|
26
|
+
|
27
|
+
def write_total_spec_time(total_time, example)
|
28
|
+
lock_output do
|
29
|
+
@output.puts "#{total_time}*#{example.description}"
|
30
|
+
end
|
31
|
+
@output.flush
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
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.4.
|
8
|
+
s.version = "0.4.38"
|
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"]
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
"lib/parallelized_specs/outcome_builder.rb",
|
25
25
|
"lib/parallelized_specs/railtie.rb",
|
26
26
|
"lib/parallelized_specs/runtime_logger.rb",
|
27
|
+
"lib/parallelized_specs/slow_spec_logger.rb",
|
27
28
|
"lib/parallelized_specs/spec_error_count_logger.rb",
|
28
29
|
"lib/parallelized_specs/spec_error_logger.rb",
|
29
30
|
"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: 67
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 38
|
10
|
+
version: 0.4.38
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jake Sorce, Bryan Madsen, Shawn Meredith
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- lib/parallelized_specs/outcome_builder.rb
|
53
53
|
- lib/parallelized_specs/railtie.rb
|
54
54
|
- lib/parallelized_specs/runtime_logger.rb
|
55
|
+
- lib/parallelized_specs/slow_spec_logger.rb
|
55
56
|
- lib/parallelized_specs/spec_error_count_logger.rb
|
56
57
|
- lib/parallelized_specs/spec_error_logger.rb
|
57
58
|
- lib/parallelized_specs/spec_failures_logger.rb
|