day_planner 0.1.0.pre23 → 0.1.0.pre25

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: b1e08960931e6316e3475c252fc23aade40162c6
4
- data.tar.gz: 2d473c00cf600a2d7fe3e1ff732bff62df60e0ec
3
+ metadata.gz: 63f1c79cb1df54b1bc39d166848841670103023c
4
+ data.tar.gz: a39994b599e405bd5dfeeb1a8ffeb7867a169f74
5
5
  SHA512:
6
- metadata.gz: 62163c93d570d7e92ec78aa63045f6522385eb16ab16d8521e79d487787a34d368d72aed8cd0b06f365523bfd0518fba39b3ad5a064a468869d7ef0dbb6e4c93
7
- data.tar.gz: d12bd0f744acf5575202f17b9cafb2e77a435a385237cc3fe7faf356dfabadde2802a0fdc8bb290fd0fabc10ade6d30fad1572a08850a92e678daefd2a4904e4
6
+ metadata.gz: 0be1f6b1ec52b00d0e73bbdda73383a0ffd387c32a0cb1c43c8d7f0cc5c06c9c844651d2d9729c8c4e068d886dae5576a3300e65b69b05ddf6f413925fb8cf23
7
+ data.tar.gz: 01ad10a05026086b65726c8e1908f3e59fc528612ec26c533baf0c1386abb4b6f3c0719e8a980f683a35d42d3aca34dde60b31108cee9ac2f3ab48cb13d88fa9
@@ -23,7 +23,7 @@ module DayPlanner
23
23
 
24
24
  def log(last, now)
25
25
  if ActiveRecord::Base.connection.table_exists?('day_planner_log')
26
- early = last + interval - now
26
+ early = last + interval.seconds - now
27
27
  DayPlanner::Log.create(name: name, interval: interval, datetime: Time.now, early: early)
28
28
  end
29
29
  end
@@ -111,6 +111,7 @@ module DayPlanner
111
111
  @@tasks.select!{ |item| item.id != t.id }
112
112
  else
113
113
  if task.last_execution.nil? || task.next_execution.nil? || (time > task.next_execution && time > task.last_execution + (task.interval / 2))
114
+ last = task.last_execution
114
115
  task.last_execution = time
115
116
 
116
117
  if !task.next_execution.nil?
@@ -121,7 +122,7 @@ module DayPlanner
121
122
 
122
123
  task.save!
123
124
 
124
- t.log(task.last_execution, time)
125
+ t.log(last, time)
125
126
  t.block.call
126
127
  end
127
128
  end
@@ -2,7 +2,7 @@ module DayPlanner
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
4
  TINY = 0
5
- PRE = "pre23"
5
+ PRE = "pre25"
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.pre23
4
+ version: 0.1.0.pre25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damon Siefert