herodot 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/herodot/version.rb +1 -1
- data/lib/herodot/worklog.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e258c2416084f926cfba575ec00e7322687c5f27
|
4
|
+
data.tar.gz: 2a1ca6076c7d932772890a9411db5ed6d193f56d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2503878d39d2b18a2c3aa537268e9e4a7649a9a440bc377017cb0e12c6a169f886d3d7fc91a87ef2e8058835f1081108ed97c02c93844b31747b696e27130434
|
7
|
+
data.tar.gz: d58e61d8188be9404e7197243115cf28566874761e29f9bc0bdf38b822bb5f9e15754b256e467a55b9b1975cacae135525290c2c031c5733f0bd432a344ca5d0
|
data/lib/herodot/version.rb
CHANGED
data/lib/herodot/worklog.rb
CHANGED
@@ -45,13 +45,17 @@ class Herodot::Worklog
|
|
45
45
|
dates.map do |date|
|
46
46
|
time_sums = grouped[date].each_with_object({}) do |time, sums|
|
47
47
|
id = time[:id]
|
48
|
-
sums[id] ||= { time: 0,
|
48
|
+
sums[id] ||= { time: 0, **branch(id) }
|
49
49
|
sums[id][:time] += time[:time]
|
50
50
|
end
|
51
51
|
[date, time_sums]
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def branch(id)
|
56
|
+
@branches.fetch(id, {})
|
57
|
+
end
|
58
|
+
|
55
59
|
def dates
|
56
60
|
@raw_logs.map { |log| log[:time].to_date }.uniq.sort
|
57
61
|
end
|