parallel_tests 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5511e5d10d0f1cbf05bea6aebd60db8b25f0771
4
- data.tar.gz: 70924bb16d0cbbe03d528afdf3b79e3fcb0ed553
3
+ metadata.gz: 352fa864d70d787e50eb44c7c47c1b2d2bade48d
4
+ data.tar.gz: cb300796822d200a52b06ffc78fbde18cc443898
5
5
  SHA512:
6
- metadata.gz: 8e38588284f3c99dd8c4e0c7f9e0e435249802e58310bc37c58ff069488131b65d8cdab48067a141e505421101d69f6796daa4863250cd238e0adfd2cd57ff1c
7
- data.tar.gz: 21edc681851fe9b59b70e34c0f0ef7a7fd3f05e45f930c12a961040f35eaff8bb060b960fb3ccec927dd2fab8ca2ba8fe6b56af37491cd3c1f92ccdceb4058af
6
+ metadata.gz: d35ee99456b3adad10251061b6576deaade4783f56239616283e308420dd45888a0ac5c16ea298b4499f52a7c8260cee7cdff6aa89032198f8a12c07bafcd881
7
+ data.tar.gz: d66c822297d2b63f7d0896c5943f1ca4e6c6d1d879f35824fd872c95ec3f5916ddbd30dc05500cb59209de82ef2fea4b534ef79001e81556f15ba178dd8ae558
@@ -50,7 +50,7 @@ class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
50
50
  # TODO: Figure out why sometimes time can be less than 0
51
51
  lock_output do
52
52
  @example_times.each do |file, time|
53
- relative_path = file.sub(/^#{Regexp.escape Dir.pwd}\//,'')
53
+ relative_path = file.sub(/^#{Regexp.escape Dir.pwd}\//,'').sub(/^\.\//, "")
54
54
  @output.puts "#{relative_path}:#{time > 0 ? time : 0}"
55
55
  end
56
56
  end
@@ -21,7 +21,10 @@ module ParallelTests
21
21
  lock do
22
22
  separator = "\n"
23
23
  groups = File.read(logfile).split(separator).map { |line| line.split(":") }.group_by(&:first)
24
- lines = groups.map { |file, times| "#{file}:#{times.map(&:last).map(&:to_f).inject(:+)}" }
24
+ lines = groups.map do |file, times|
25
+ time = "%.2f" % times.map(&:last).map(&:to_f).inject(:+)
26
+ "#{file}:#{time}"
27
+ end
25
28
  File.write(logfile, lines.join(separator) + separator)
26
29
  end
27
30
  end
@@ -45,9 +48,8 @@ module ParallelTests
45
48
  end
46
49
  end
47
50
 
48
- def message(test, time)
51
+ def message(test, delta)
49
52
  return unless method = test.public_instance_methods(true).detect { |method| method =~ /^test_/ }
50
- delta = "%.2f" % time
51
53
  filename = test.instance_method(method).source_location.first.sub("#{Dir.pwd}/", "")
52
54
  "#{filename}:#{delta}"
53
55
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '1.3.4'
2
+ VERSION = Version = '1.3.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-07 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel