lita-totems 0.3.0 → 0.3.1

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: 4c08d38dab66a89133a326195a7a3284c383e95e
4
- data.tar.gz: 67e50f44222b2e993aec07811c178a868cf31a24
3
+ metadata.gz: 04bc52d9b4cb545151bf9169b928be5c0ac001aa
4
+ data.tar.gz: 8acfd0dbacf8df24fbc72ed1861e6489acec0ef8
5
5
  SHA512:
6
- metadata.gz: 80179d6ebc67dd3ff465b7fb0636b9cab74665b0ca9d8ce564b6eb183c06cb5cefbca6d62039dd1baa4259366e7b21f883527543395bc5b5f91ee60af3c3179c
7
- data.tar.gz: b6fcd10085bdc4fc04ceceb5faf7c2bd2ddd5a8cbab5b6c206d923e23629a11182fd583b446cd9b19627e0c801113092df467b33c019caa5fd377520a9ff52aa
6
+ metadata.gz: e00c7649a4842f437a9f0a5e5b1988ad33025349330ec42e6c885f8ee6c1d6cb4e85e5a08f5c42db207671528eeabf84c1c2e210b4477c4fc34abf6f796ff9c4
7
+ data.tar.gz: 985ef09a1be5e6c815d6fc194ad21fff0057ab5e79e4bef40dedc260c5ccf7ecbc71d302e5a514fdb702a94a53e35a7402a576e32c228568c427f2dfc9df766f
@@ -221,12 +221,14 @@ module Lita
221
221
  if first_id
222
222
  waiting_since_hash = redis.hgetall("totem/#{totem}/waiting_since")
223
223
  message_hash = redis.hgetall("totem/#{totem}/message")
224
- str += "#{prefix}1. #{users_cache[first_id].name} (held for #{waiting_duration(waiting_since_hash[first_id])})\n"
225
- str += "\s\s\s\s#{message_hash[first_id]}\n" if message_hash[first_id]
224
+ str += "#{prefix}1. #{users_cache[first_id].name} (held for #{waiting_duration(waiting_since_hash[first_id])})"
225
+ str += " - #{message_hash[first_id]}" if message_hash[first_id]
226
+ str += "\n"
226
227
  rest = redis.lrange("totem/#{totem}/list", 0, -1)
227
228
  rest.each_with_index do |user_id, index|
228
- str += "#{prefix}#{index+2}. #{users_cache[user_id].name} (waiting for #{waiting_duration(waiting_since_hash[user_id])})\n"
229
- str += "\s\s\s\s#{message_hash[user_id]}\n" if message_hash[user_id]
229
+ str += "#{prefix}#{index+2}. #{users_cache[user_id].name} (waiting for #{waiting_duration(waiting_since_hash[user_id])})"
230
+ str += " - #{message_hash[user_id]}" if message_hash[user_id]
231
+ str += "\n"
230
232
  end
231
233
  end
232
234
  str
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-totems"
3
- spec.version = "0.3.0"
3
+ spec.version = "0.3.1"
4
4
  spec.authors = ["Charles Finkel", "Vijay Ramesh"]
5
5
  spec.email = ["cf@dropbox.com", "vijay@change.org"]
6
6
  spec.description = %q{Totems handler for Lita)}
@@ -127,17 +127,17 @@ describe Lita::Handlers::Totems, lita_handler: true do
127
127
  before do
128
128
  Timecop.freeze("2014-03-01 12:00:00") do
129
129
  send_message("totems add chicken message", as: carl)
130
- send_message("totems add chicken other message", as: another_user)
130
+ send_message("totems add chicken", as: another_user)
131
+ send_message("totems add chicken other message", as: yet_another_user)
131
132
  end
132
133
  end
133
134
  it "includes the message in the totems' info" do
134
135
  Timecop.freeze("2014-03-01 13:00:00") do
135
136
  send_message("totems info chicken")
136
137
  expect(replies.last).to eq <<-END
137
- 1. Carl (held for 1h)
138
- message
138
+ 1. Carl (held for 1h) - message
139
139
  2. person_1 (waiting for 1h)
140
- other message
140
+ 3. person_2 (waiting for 1h) - other message
141
141
  END
142
142
  end
143
143
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-totems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Finkel