parallel_tests 1.3.0 → 1.3.1

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: 0f821f8cf4e9ccbadef8d9a5d5c57f449e114cec
4
- data.tar.gz: 654e9c3515d9b52af9bbeca95ba5ce7b97a408d6
3
+ metadata.gz: 906e4b29ac1f504f1abb438ef730e5ae7a7076e1
4
+ data.tar.gz: fcc5d45823c76190851fd0f340b98b99d00b4a55
5
5
  SHA512:
6
- metadata.gz: 5190ff730509aea5855831877865cf5ee9b8223b67ad1b960519c0b4eed034b744180bd8c3123cd81649ebd4c9243e6e67ed1be6bec4da5e2d73ec544a27d800
7
- data.tar.gz: b5c2281e6f285333656923d8af0ce1ed85aaf2cab84dd84a9a83b413bb8c99f861aa8cb94f25de2b9e134ba0c9b47baeb312bbf35bb17a2630fcf94768835527
6
+ metadata.gz: db53a0c8a8a517a3d6464845b0b6604a8a34377b61e60139e52a30f7aae2939f8db9096a4b1e6568bd16f33bdab85579b26ab393b68d5d59057addfd52a07e9c
7
+ data.tar.gz: b1a64ce20f6ad0d057edbb8e354a99604371546b0b6caf824ba316ae375b1acc4d94f59b7665e81b6394611586ba49183f74b4b480320a98cb8c04a56a81055e
@@ -190,9 +190,15 @@ module ParallelTests
190
190
  end
191
191
 
192
192
  def report_time_taken
193
- start = Time.now
194
- yield
195
- puts "\nTook #{Time.now - start} seconds"
193
+ seconds = ParallelTests.delta { yield }.to_i
194
+ puts "\nTook #{seconds} seconds#{detailed_duration(seconds)}"
195
+ end
196
+
197
+ def detailed_duration(seconds)
198
+ parts = [ seconds / 3600, seconds % 3600 / 60, seconds % 60 ].drop_while(&:zero?)
199
+ return if parts.size < 2
200
+ parts = parts.map { |i| "%02d" % i }.join(':').sub(/^0/, '')
201
+ " (#{parts})"
196
202
  end
197
203
 
198
204
  def final_fail_message
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '1.3.0'
2
+ VERSION = Version = '1.3.1'
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.0
4
+ version: 1.3.1
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-02-25 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel