lita-debug-queue 0.1.8 → 0.1.9

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: b7b4188cbe4c0ed69f139466b1f6462d1579ae44
4
- data.tar.gz: e4392c2b9b88dd824059585ad85a9c57121882c5
3
+ metadata.gz: 197609338433856720c939f87f4c3d66884e7142
4
+ data.tar.gz: 39b599c089cec86a32aaa3c089ede61464f9c5c8
5
5
  SHA512:
6
- metadata.gz: c0571c628f1a3be1824f26676d71287575b642659415e318c9355bf53fc72a05733264a80256818f6645fe8098e09116d054db05cb66eb08a469f17e76fcb287
7
- data.tar.gz: b0cc7a909a5007f465f2490b381900bada840d4a4f3b983c921a0fe39b995ab11456a8818e7c068241e294428ec2357b1ebd252c1f5eef065e2a245704574965
6
+ metadata.gz: 0b1ecc9e9ba6db3e24ff6aa564f8db187f5cd4ce3be4b03cd42f31f3d60824330081d4cf9dd8415ac6a5417aefabfba6476a946acb953d5211652ac086893c5d
7
+ data.tar.gz: c3c7f599fe5097d6361cab84141a569e0e00ae1038a2c2488da97b04a57b15713700d2ae07f9c9520357bfb7d065aca950fd12c6f70ae29669865951068eeba7
data/NEWS.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## News
2
2
 
3
+ ### 0.1.9 (2015-10-08)
4
+
5
+ * Relax some of the routing requirements and fix the tests.
6
+
3
7
  ### 0.1.8 (2015-09-29)
4
8
 
5
9
  * Add support for TAs using the `next`/`drop` commands
@@ -1,15 +1,17 @@
1
1
  module Lita
2
2
  module Handlers
3
- class DebugQueue < Handler
3
+ class DebugQueue
4
+ extend Lita::Handler::ChatRouter
5
+
4
6
  config :classrooms # A mapping from instructor names to classroom channels.
5
7
 
6
- route(/^debug me$/, :add, command: true,
8
+ route(/debug me/, :add,
7
9
  help: { 'debug me' => 'Put your name in the queue for debugging help.' })
8
- route(/^debug nvm$/, :cancel, command: true,
10
+ route(/debug nvm/, :cancel,
9
11
  help: { 'debug nvm' => 'Remove your name from the queue for debugging help.' })
10
- route(/^debug queue$/, :show, command: true,
12
+ route(/debug queue/i, :show,
11
13
  help: { 'debug queue' => 'Show the current queue for your class.' })
12
- route(/^debug count$/, :count, command: true,
14
+ route(/debug count/i, :count,
13
15
  help: { 'debug count' => 'Count the number of people waiting for help.' })
14
16
  route(/^debug next$/, :next, command: true,
15
17
  restrict_to: [:instructors, :assistants],
@@ -17,7 +19,8 @@ module Lita
17
19
  route(/^debug drop\s+(.+)$/, :drop, command: true,
18
20
  restrict_to: [:instructors, :assistants],
19
21
  help: { 'debug drop NAME' => 'Remove the student with NAME from the queue.' })
20
- route(/^debug clear$/, :clear, command: true, restrict_to: [:instructors],
22
+ route(/^debug clear$/, :clear, command: true,
23
+ restrict_to: [:instructors],
21
24
  help: { 'debug clear' => 'Empty the queue.' })
22
25
 
23
26
  def add(response)
@@ -15,8 +15,6 @@ module Lita
15
15
 
16
16
  # KLUDGE: The following is a hack as the current room_object is incorrect. (lita-slack issue #44)
17
17
  def self.get_room_name(room)
18
- # KLUDGE: And this conditional is a hack since the test rooms are mocked.
19
- # room.id == room.name ? room.name : Lita::Room.find_by_id(room.id).name(room)
20
18
  Lita::Room.find_by_id(room.id).name
21
19
  end
22
20
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-debug-queue"
3
- spec.version = "0.1.8"
3
+ spec.version = "0.1.9"
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"
@@ -5,7 +5,11 @@ describe Lita::Handlers::DebugQueue, lita_handler: true do
5
5
  let(:brit) { Lita::User.create(789, mention_name: "brit") }
6
6
  let(:dylan) { Lita::User.create(123, mention_name: "dylan") }
7
7
  let(:rails) { Lita::Room.new("rails") }
8
+
8
9
  before(:each) do
10
+ allow(Lita::Handlers::RoomFinder).to receive(:get_room_name) do |room|
11
+ room.name
12
+ end
9
13
  registry.config.handlers.debug_queue.classrooms = {
10
14
  'brit' => 'rails'
11
15
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-debug-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brit Butler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2015-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita