gitwakatime 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gitwakatime/durations.rb +10 -11
- data/lib/gitwakatime/query.rb +1 -1
- data/lib/gitwakatime/version.rb +1 -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: 608325483e8f379265e87a1a1043e1243994c36a
|
4
|
+
data.tar.gz: 818c9c1e91c25af377fdc13fc9fd06dc26a2a1ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52151087d7120140ca3a55e85f223fa098fb3f73a881623b8bbe3251c877d6548af46d7236944c68345e17eeff07b29a22a079f0767b1f4b9eeb26a5a3d772ca
|
7
|
+
data.tar.gz: 3607317bf5cbea8d9265e17f6eb88f1fa005a97d975c3219d2092653881827f5802df269737452c9cd3d1710a7fbd9eb3a66f367d7314e4241e311e0fcd90740
|
@@ -44,17 +44,16 @@ module GitWakaTime
|
|
44
44
|
|
45
45
|
def cached?
|
46
46
|
# Check to see if this date range might be stale?
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
false
|
47
|
+
if cached_heartbeats.count > 0
|
48
|
+
max_local_timetamp = (
|
49
|
+
Time.parse(cached_heartbeats.max(:time)) + 15.day
|
50
|
+
).to_date
|
51
|
+
!(
|
52
|
+
@args[:start].to_date..@args[:end].to_date
|
53
|
+
).include?(max_local_timetamp)
|
54
|
+
else
|
55
|
+
false
|
56
|
+
end
|
58
57
|
end
|
59
58
|
|
60
59
|
def cached_heartbeats
|
data/lib/gitwakatime/query.rb
CHANGED
@@ -70,7 +70,7 @@ module GitWakaTime
|
|
70
70
|
start: (
|
71
71
|
@start_at.to_date + (i * @api_limit)
|
72
72
|
).to_time.beginning_of_day,
|
73
|
-
end: (@start_at.to_date + (
|
73
|
+
end: (@start_at.to_date + (i * @api_limit)).to_time.end_of_day,
|
74
74
|
project: @project,
|
75
75
|
show: 'file,branch,project,time,id'
|
76
76
|
}
|
data/lib/gitwakatime/version.rb
CHANGED