lita-debug-queue 0.1.8 → 0.1.9
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 +4 -4
- data/NEWS.md +4 -0
- data/lib/lita/handlers/debug_queue.rb +9 -6
- data/lib/lita/handlers/room_finder.rb +0 -2
- data/lita-debug-queue.gemspec +1 -1
- data/spec/lita/handlers/help_queue_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 197609338433856720c939f87f4c3d66884e7142
|
4
|
+
data.tar.gz: 39b599c089cec86a32aaa3c089ede61464f9c5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b1ecc9e9ba6db3e24ff6aa564f8db187f5cd4ce3be4b03cd42f31f3d60824330081d4cf9dd8415ac6a5417aefabfba6476a946acb953d5211652ac086893c5d
|
7
|
+
data.tar.gz: c3c7f599fe5097d6361cab84141a569e0e00ae1038a2c2488da97b04a57b15713700d2ae07f9c9520357bfb7d065aca950fd12c6f70ae29669865951068eeba7
|
data/NEWS.md
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
module Lita
|
2
2
|
module Handlers
|
3
|
-
class DebugQueue
|
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(
|
8
|
+
route(/debug me/, :add,
|
7
9
|
help: { 'debug me' => 'Put your name in the queue for debugging help.' })
|
8
|
-
route(
|
10
|
+
route(/debug nvm/, :cancel,
|
9
11
|
help: { 'debug nvm' => 'Remove your name from the queue for debugging help.' })
|
10
|
-
route(
|
12
|
+
route(/debug queue/i, :show,
|
11
13
|
help: { 'debug queue' => 'Show the current queue for your class.' })
|
12
|
-
route(
|
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,
|
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
|
data/lita-debug-queue.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-debug-queue"
|
3
|
-
spec.version = "0.1.
|
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.
|
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
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|