activity-logger 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/activity-logger.rb +7 -2
  2. metadata +2 -2
@@ -16,7 +16,12 @@ class ActivityLogger
16
16
 
17
17
  # Returns true if the time from the last entry exceeds 45 minutes.
18
18
  #
19
- def expired?()
20
- (Time.now - Time.parse(DynarexDaily.new.to_h.last[:time])) / 60 >= 45
19
+ def expired?()
20
+ records = DynarexDaily.new.to_h
21
+ if !records.empty? then
22
+ (Time.now - Time.parse(records.last[:time])) / 60 >= 45
23
+ else
24
+ true
25
+ end
21
26
  end
22
27
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: activity-logger
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-11 00:00:00 +00:00
13
+ date: 2012-01-22 00:00:00 +00:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency