day_planner 0.1.0.pre30 → 0.1.0.pre31

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16fe32a951d2e380d2505cd56d6fef46ed3d3c87
4
- data.tar.gz: 2447869ab904825010d2201b0f9346ea615af3b6
3
+ metadata.gz: f93423d978c0f98e567f365c1c8a15b8d67851ff
4
+ data.tar.gz: 17f07bde4817a4bb73ce1d26dc39a6d2a98c5cfd
5
5
  SHA512:
6
- metadata.gz: 89356fc569473819f7d838cbea2196f84053bc4c57b06675144664bf496280f17fe342e8fea95bffefbe28ac504d1d7c06a5dabfd45ef3decdb8168db22b0f5c
7
- data.tar.gz: d9e7d857e80f3c22a3722c597c49c364b856305e933787e7e351aee0d08e1264e512880f000861931f61f25c337b201bd5b41f708ddd24616d461a9143e1306e
6
+ metadata.gz: 917a78ea5779c67adb5efe819ab9750e6fdc90505f47144dc48444b87035cff1fc65353ab6229459b81897332a7014fca51144e672bd81228f747438e2579a89
7
+ data.tar.gz: d9345181453907c3b4654e9269aa5f112dad5417e8856865d0679c73b30c8bc16d27d431afc4080107584f05a8aa467d2f277742425ed199172330635b3a2678
@@ -28,7 +28,12 @@ module DayPlanner
28
28
  else
29
29
  deviation = 0
30
30
  end
31
- cumulative_deviation = self.cumulative_deviation || 0
31
+ last_execution = DayPlanner::Log.where(name: self.name).last
32
+ if !last_execution.nil?
33
+ cumulative_deviation = last_execution.cumulative_deviation || 0
34
+ else
35
+ cumulative_deviation = 0
36
+ end
32
37
  cumulative_deviation += deviation
33
38
  DayPlanner::Log.create(name: name, interval: interval, datetime: now, deviation: deviation, cumulative_deviation: cumulative_deviation)
34
39
  end
@@ -2,7 +2,7 @@ module DayPlanner
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
4
  TINY = 0
5
- PRE = "pre30"
5
+ PRE = "pre31"
6
6
  BUILD = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, TINY, PRE, BUILD].compact.join(".")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: day_planner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre30
4
+ version: 0.1.0.pre31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damon Siefert