Cinch-Tell 0.0.5 → 0.0.6

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: 35e8cea7fd8e9036ac37189981efd9e655b7a4e4
4
- data.tar.gz: d50246c1b4b1a593395c741f10d8a5ce1b77ade1
3
+ metadata.gz: a028a89b45e1e70689aaa2e8b9c5181ee195a071
4
+ data.tar.gz: f8d79a4f48031d014756d1679b698edad06ec83b
5
5
  SHA512:
6
- metadata.gz: e51c31376a35d3627ba0c1d18629a1f2ca7b57595a061ec47d8777ac398309db3cecb66e54a9c3fdfe3e472cfc724e6de0ad841abaabcef578ae4a440e1fa14b
7
- data.tar.gz: 5f74ac931e1eec12ca5de38874e632cc4b997feb9e02a8bc8f6a13d58861bfda31cc35b4f67b4537af4946c831270dea88e60ad01d8433029250fb4a837a8381
6
+ metadata.gz: 1e96a2baafa668b4f76ce828eb08b826f69f37385a352f7eaccf17b6acc7cc0b661ec8d0a392ee82dd0edbd08636829e8c92e7be29cb00198b43e61a1b6c8a04
7
+ data.tar.gz: 262adc6ee547e7db1bf5c9b8a1effe13000e636eeea35aee672194f6a8e0e83e8b851c6f6520244df7167a7bad5d3c65c770f19e4d0e08cca6702f647b1e69a1
@@ -52,12 +52,14 @@ module Cinch
52
52
  msg = tell[:message]
53
53
  msg_when = tell[:time]
54
54
  timediff = Time.diff(Time.at(msg_when), Time.now)
55
- output = "#{from_nick} wanted to tell you '#{msg}' about "
55
+ puts "when: #{msg_when}, now: #{Time.now}, timediff: #{timediff}"
56
+ output = "#{from_nick} wanted to tell you '#{msg}', "
56
57
  # lots of unless, could use timediff[:diff] but it's ugly
57
58
  ago_str = ''
58
59
  ago_str = "#{timediff[:year]} years, " unless timediff[:year].zero?
59
60
  ago_str << "#{timediff[:month]} months, " unless timediff[:month].zero?
60
61
  ago_str << "#{timediff[:week]} weeks, " unless timediff[:week].zero?
62
+ ago_str << "#{timediff[:day]} days, " unless timediff[:day].zero?
61
63
  ago_str << "#{timediff[:hour]} hours, " unless timediff[:hour].zero?
62
64
  ago_str << "#{timediff[:minute]} minutes, " unless timediff[:minute].zero?
63
65
  ago_str << 'and ' unless ago_str.empty?
@@ -1,5 +1,5 @@
1
1
  module Cinch
2
2
  module Tell
3
- VERSION = '0.0.5'.freeze
3
+ VERSION = '0.0.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Cinch-Tell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lily Jónsdóttir