lita-debug-queue 0.1.2 → 0.1.3

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: 0a2e7ac111f8ab2cc860f5a352ef7c3465c63cdd
4
- data.tar.gz: 32d4111430293f16a405becfdfd73088d8299ec7
3
+ metadata.gz: 4b10eb46b22747c3a3010cad69a883df7c285c6a
4
+ data.tar.gz: 168300e199a91d3ee5ac04ea516487b08bc150ee
5
5
  SHA512:
6
- metadata.gz: 344e268f20bfe2ea95479bc41d3dff57a53cf3cb631da42599db1c8be175e554aafc6cd876dd2d5e72a9a579b53fa04dc3e8fb55a46137990ddd421b9ce85f57
7
- data.tar.gz: 50a448fca9c44c970f2b340806007e1919a21331f6a66c1cb1b2052173fc58115198b4668b88990217b908f72098965c1091a2432ab36752d2dc298594a104af
6
+ metadata.gz: 91630baa85b6cbfd88052f7b989a399fe7b5805aa1b7c48954e219ff7e41becc54cb26c234c5c2c8078238b12301440c96ca45ab210d34e66435faf11c116e1a
7
+ data.tar.gz: dd0fad062c70be329554a49963fe50a8224e4dd89aedfbbabfe76f0722e844fe4eb4b76c82a71f896a6d09ab0631dcc2755d4402703ae80cee80a112e2fcb7ba
data/NEWS.md CHANGED
@@ -1,5 +1,19 @@
1
1
  ## News
2
2
 
3
+ ### 0.1.3 (2015-08-31)
4
+
5
+ * Fix an error in how "debug next" notifies the student.
6
+
7
+ The error in question wasn't caught by the test suite
8
+ as the behavior is mocked by the tests. Specifically,
9
+ the test suite is happy to accept a string representing
10
+ the mention name but in real usage a Lita::Source object
11
+ containing a Lita::User is required. *sigh*
12
+
13
+ I'm not sure how to write a regression test for this
14
+ without checking implementation details in a nasty way.
15
+ And I'm on vacation at the beach anyway so time for a walk.
16
+
3
17
  ### 0.1.2 (2015-08-31)
4
18
 
5
19
  * Add docstrings for built-in Lita help.
@@ -56,7 +56,8 @@ module Lita
56
56
  response.reply("The queue is empty. Sounds like you could use a break. :)")
57
57
  else
58
58
  student = @room.next
59
- robot.send_message(student, "@#{student}: You're up. Let's debug :allthethings:!")
59
+ target = target_for(student)
60
+ robot.send_message(target, "@#{student}: You're up. Let's debug :allthethings:!")
60
61
  response.reply("#{student} is up next and has been notified.")
61
62
  end
62
63
  end
@@ -85,6 +86,10 @@ module Lita
85
86
  response.reply_privately("You must be in the class channel to send this message.") unless @room
86
87
  @room
87
88
  end
89
+
90
+ def target_for(name)
91
+ Lita::Source.new(user: Lita::User.find_by_mention_name(name))
92
+ end
88
93
  end
89
94
 
90
95
  Lita.register_handler(DebugQueue)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-debug-queue"
3
- spec.version = "0.1.2"
3
+ spec.version = "0.1.3"
4
4
  spec.authors = ["Brit Butler"]
5
5
  spec.email = ["brit@kingcons.io"]
6
6
  spec.description = "Queue tracking of users who need debugging help with per-channel management"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-debug-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brit Butler