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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 168b591ace36a3aee27b46f91c877e1c7ed46dd9
4
- data.tar.gz: ea9639102940b3d512fefb4d94ea89deab3d8d1e
3
+ metadata.gz: 608325483e8f379265e87a1a1043e1243994c36a
4
+ data.tar.gz: 818c9c1e91c25af377fdc13fc9fd06dc26a2a1ac
5
5
  SHA512:
6
- metadata.gz: a5d4ff163d2161129b89b98c57c5d8a3fe0067248c3ae2c54f6080cc13e3a781d5a96044336ec1d23cac22135099b0c1a5fe93a8ac597550c861dc149ce3925c
7
- data.tar.gz: cde46c05f64e924f5a9d8128337d77542e79f2c265fe8a6d0fac046c6d7e220858af69b183cc23454a99bacb7ac693e9d423d1d8a574c32afa18936093d76dc3
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
- # 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
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
@@ -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 + ((i + 1) * @api_limit)).to_time.end_of_day,
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
  }
@@ -1,4 +1,4 @@
1
1
  # Version Number Definition
2
2
  module GitWakaTime
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitwakatime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov