example_group_timer 0.0.3 → 0.0.4
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/HISTORY.md
CHANGED
@@ -26,8 +26,7 @@ module ExampleGroupTimer
|
|
26
26
|
def report
|
27
27
|
super
|
28
28
|
puts "<ol>"
|
29
|
-
examples
|
30
|
-
subgroups.sort_by { |o| o.duration }.reverse.each(&:report)
|
29
|
+
(examples + subgroups).sort_by(&:duration).reverse.each(&:report)
|
31
30
|
puts "</ol>"
|
32
31
|
end
|
33
32
|
end
|
@@ -16,7 +16,7 @@ module ExampleGroupTimer
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def duration
|
19
|
-
|
19
|
+
@finished_at - @started_at
|
20
20
|
end
|
21
21
|
|
22
22
|
def indent
|
@@ -24,7 +24,7 @@ module ExampleGroupTimer
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def percentage
|
27
|
-
(
|
27
|
+
(duration.to_f / parent.duration.to_f) * 100
|
28
28
|
end
|
29
29
|
|
30
30
|
def report
|
@@ -32,8 +32,8 @@ module ExampleGroupTimer
|
|
32
32
|
<li>
|
33
33
|
<div class="example-group">
|
34
34
|
<span class="title">%s</span>
|
35
|
-
<span class="duration"
|
36
|
-
<span class="share"
|
35
|
+
<span class="duration">%.4f</span>
|
36
|
+
<span class="share">%.1f%%</span>
|
37
37
|
</div>
|
38
38
|
</li>
|
39
39
|
EOS
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: example_group_timer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|