parallelized_specs 0.4.77 → 0.4.78

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.4.77"
15
+ gem.version = "0.4.78"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -4,8 +4,8 @@ module RSpec
4
4
  class ParallelizedSpecs::SlowestSpecLogger < ParallelizedSpecs::SpecLoggerBase
5
5
 
6
6
  def initialize(*args)
7
- @example_times = []
8
7
  super
8
+ @example_times = {}
9
9
  end
10
10
 
11
11
  def example_started(example)
@@ -20,15 +20,16 @@ module RSpec
20
20
  add_total_spec_time(example)
21
21
  end
22
22
 
23
- def dump_summary(*args)
24
- File.open("#{Rails.root}/tmp/parallel_log/spec_times.log", 'a+') do |f|
25
- @example_times.each { |example_details| f.puts "#{example_details}" }
23
+ def dump_summary(duration, example_count, failure_count, pending_count)
24
+ lock_output do
25
+ @example_times.sort.map.each { |time, example| @output.write "#{time} #{example}\n" }
26
26
  end
27
+ @output.flush
27
28
  end
28
29
 
29
30
  def add_total_spec_time(example)
30
31
  total_time = Time.now - @spec_start_time
31
- @example_times << "#{total_time}*#{example.description}*#{example_group.location.match(/.*rb/).to_s}"
32
+ @example_times[total_time] = ": file: #{example.location.match(/spec.*rb:\w*/).to_s} spec: #{example.description}"
32
33
  end
33
34
  end
34
- end
35
+ end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.4.77"
8
+ s.version = "0.4.78"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallelized_specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.77
4
+ version: 0.4.78
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: