reminders_txt 0.5.1 → 0.5.2

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
  SHA256:
3
- metadata.gz: c9330081c4faaa7b6bac24ca91b949c81251fb9625e0db2000a6eda9a07a7c4d
4
- data.tar.gz: 93270c3a063d26d9b6c7467db818e1757c33cd858fa5bbc6b2c12543f63b903e
3
+ metadata.gz: 18bd04b91568bbb4c2b648ff1eb4cf089abff05819083b183b3db06f6ac95c1e
4
+ data.tar.gz: 3d687633ab3d1cda5d0b477eb7fc202e2501249661c882806c68e0a35e6e3827
5
5
  SHA512:
6
- metadata.gz: d6085c6f4b3b1501b0add624840205e5788eab55e85fec7a3982eebb47f21101b0f211affc38e479ccbda712bfd359bf21c5d2bccede51a49a16e1459c396471
7
- data.tar.gz: 0f285941022338301f717d146fdc8aaaf948df4b7fd6b12175daa538c7c31cd8674713c9f6aa7f14b55d6c1b317a493dbe4da3520409477df5d1455b07d26af3
6
+ metadata.gz: 2213cd6d31824e0433f69cb1682a1dea00a1f31797d111903bc8279b8a832b64ee17a7cf96e672ebc568b19c09d24ee3509651c7857b2f7b37480be6bdca9aa1
7
+ data.tar.gz: faa87b6e0f3cf5c67fe4d8bffe2868891f2be32230d79c75268fe10448103e614fdfaf432aae35c63751e9fb2f3af80de914ee4939c9b6ff2bcf484c35a159fe
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/reminders_txt.rb CHANGED
@@ -91,7 +91,7 @@ class RemindersTxt
91
91
  next_date = if months then
92
92
  @now.to_datetime >> months.to_i
93
93
  else
94
- @now.to_datetime + days.to_i
94
+ ((@now.to_date + days.to_i + 1).to_time - 1).to_datetime
95
95
  end
96
96
 
97
97
  @dx.filter {|x| DateTime.parse(x.date) <= next_date}
@@ -279,16 +279,22 @@ end
279
279
  class RemindersTxtVoice < RemindersTxt
280
280
  using HumanSpeakable
281
281
 
282
- def weekahead()
282
+ def weekahead() plain_talk(super) end
283
+ def today() plain_talk(super) end
284
+ def tomorrow() plain_talk(super) end
285
+
286
+ private
287
+
288
+ def plain_talk(entries)
283
289
 
284
- s = super.all.map do |x|
290
+ s = entries.all.map do |x|
285
291
  date = DateTime.parse(x.date)
286
292
  "you are at %s, %s at %s." % [(x.venue.empty? ? x.title : x.venue), \
287
293
  date.humanize, date.to_time.humanize]
288
294
  end.join(" Then ")
289
295
 
290
296
  s.sub!(/^./){|x| x.upcase}
291
-
297
+
292
298
  end
293
299
 
294
300
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reminders_txt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  U6f6HfP/6K9f602IeJGEDybVHYFQ7Ssl+AeclLBiMqy5HYuL7kRoD9C2D166GI42
36
36
  M4blonk3dgx08AvXnjoMsgqh
37
37
  -----END CERTIFICATE-----
38
- date: 2019-03-10 00:00:00.000000000 Z
38
+ date: 2019-03-12 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dynarex
metadata.gz.sig CHANGED
Binary file