lita-updates 0.1.0 → 0.1.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 +4 -4
- data/.travis.yml +4 -1
- data/README.md +3 -1
- data/lib/lita-updates.rb +1 -1
- data/lib/lita/handlers/updates.rb +2 -2
- data/lita-updates.gemspec +1 -1
- data/spec/lita/handlers/updates_spec.rb +95 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f59397eb1fbff658f077c1c81afa18e2e28b8bd59de16e6fdc6808e96880a366
|
4
|
+
data.tar.gz: c9727618ed475f9466466ed3441f9497b78d03bd24b2fc8fd549ffddab7b2c2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04f63295b844584c104fc48888d25223c774b3bc0fe55229ab878fe9bdede549ef369aa4a36a2a9b4950be992d36c498449122d46884b9767c22cb8e0c3732da
|
7
|
+
data.tar.gz: 9cb574c862db0c65ef3a7ad6d248127d163b5c02d5a28d0533062eba3cf263f7fb260d75b25e7b09b84193a584ca41db763829074e67366e15b831469a4cfeb1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# lita-updates
|
2
2
|
|
3
|
+
[](https://travis-ci.com/limbrapp/lita-updates)
|
4
|
+
|
3
5
|
Provides a structured standup discussion to share amongst team members, along with scheduling at specific times/days for each user.
|
4
6
|
|
5
7
|
The original code for this library was constructed by [Josh Bassett](https://twitter.com/nullobject) and others at [The Conversation](https://theconversation.com/au), and then generously shared with myself to extend and open source.
|
@@ -26,7 +28,7 @@ This handler adds the following public commands via direct messages to your Lita
|
|
26
28
|
If you want to get stuck into the internals of this handler, there are two hidden commands that may be useful:
|
27
29
|
|
28
30
|
* `standup export` – returns the JSON of each person's schedules.
|
29
|
-
* `standup import JSON` – sets up everyone's schedules. Don't use this command unless you're absolutely sure of what you're doing.
|
31
|
+
* `standup import JSON` – sets up everyone's schedules. Don't use this command unless you're absolutely sure of what you're doing (and [make sure smart quotes aren't enabled by your operating system](https://twitter.com/SlackHQ/status/898272637020852224)).
|
30
32
|
|
31
33
|
## Installation
|
32
34
|
|
data/lib/lita-updates.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Lita
|
2
2
|
module Handlers
|
3
|
-
class
|
3
|
+
class Updates < Handler
|
4
4
|
MINUTE = 60 # seconds
|
5
5
|
|
6
6
|
config :target
|
@@ -59,4 +59,4 @@ module Lita
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
Lita.register_handler(Lita::Handlers::
|
62
|
+
Lita.register_handler(Lita::Handlers::Updates)
|
data/lita-updates.gemspec
CHANGED
@@ -1,4 +1,98 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe Lita::Handlers::
|
3
|
+
RSpec.describe Lita::Handlers::Updates, :lita_handler => true do
|
4
|
+
it "runs through the standup flow" do
|
5
|
+
send_command "standup", :privately => true
|
6
|
+
|
7
|
+
expect(replies.last).to include("time for our standup meeting")
|
8
|
+
|
9
|
+
send_message "many things", :privately => true
|
10
|
+
|
11
|
+
expect(replies.last).to include("What are you working on next?")
|
12
|
+
|
13
|
+
send_message "other things", :privately => true
|
14
|
+
|
15
|
+
expect(replies.last).to include("What blockers")
|
16
|
+
|
17
|
+
send_message "nothing much", :privately => true
|
18
|
+
|
19
|
+
expect(replies.last).to include("Test User posted a status update")
|
20
|
+
expect(replies.last).to include("What have you just been working on?")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "skips answers of None" do
|
24
|
+
send_command "standup", :privately => true
|
25
|
+
|
26
|
+
expect(replies.last).to include("time for our standup meeting")
|
27
|
+
|
28
|
+
send_message "None", :privately => true
|
29
|
+
|
30
|
+
expect(replies.last).to include("What are you working on next?")
|
31
|
+
|
32
|
+
send_message "other things", :privately => true
|
33
|
+
|
34
|
+
expect(replies.last).to include("What blockers")
|
35
|
+
|
36
|
+
send_message "nothing much", :privately => true
|
37
|
+
|
38
|
+
expect(replies.last).to_not include("What have you just been working on?")
|
39
|
+
end
|
40
|
+
|
41
|
+
it "skips sharing when cancelled" do
|
42
|
+
send_command "standup", :privately => true
|
43
|
+
|
44
|
+
expect(replies.last).to include("time for our standup meeting")
|
45
|
+
|
46
|
+
send_message "many things", :privately => true
|
47
|
+
|
48
|
+
expect(replies.last).to include("What are you working on next?")
|
49
|
+
|
50
|
+
send_message "Cancel", :privately => true
|
51
|
+
|
52
|
+
expect(replies.last).to_not include("What blockers")
|
53
|
+
expect(replies.last).to_not include("Test User posted a status update")
|
54
|
+
end
|
55
|
+
|
56
|
+
it "allows for scheduling of standups" do
|
57
|
+
send_command "standup schedule 12:00 monday friday", :privately => true
|
58
|
+
|
59
|
+
expect(replies.last).
|
60
|
+
to include("Standup scheduled for 12:00 on monday, friday")
|
61
|
+
end
|
62
|
+
|
63
|
+
it "allows for clearing of schedules" do
|
64
|
+
send_command "standup schedule 12:00 monday friday", :privately => true
|
65
|
+
send_command "standup schedule clear", :privately => true
|
66
|
+
|
67
|
+
expect(replies.last).to include("No standup scheduled")
|
68
|
+
end
|
69
|
+
|
70
|
+
it "reports on the current schedule" do
|
71
|
+
send_command "standup schedule", :privately => true
|
72
|
+
|
73
|
+
expect(replies.last).to include("No standup scheduled")
|
74
|
+
end
|
75
|
+
|
76
|
+
it "can export schedules" do
|
77
|
+
send_command "standup schedule 12:00 monday friday", :privately => true
|
78
|
+
send_command "standup export", :privately => true
|
79
|
+
|
80
|
+
expect(replies.last).to include(
|
81
|
+
JSON.dump(
|
82
|
+
"Test User" => {"time" => "12:00", "days" => ["monday", "friday"]}
|
83
|
+
)
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
it "can import schedules" do
|
88
|
+
json = JSON.dump(
|
89
|
+
"Test User" => {"time" => "12:00", "days" => ["monday", "friday"]}
|
90
|
+
)
|
91
|
+
|
92
|
+
send_command "standup import #{json}", :privately => true
|
93
|
+
send_command "standup schedule", :privately => true
|
94
|
+
|
95
|
+
expect(replies.last).
|
96
|
+
to include("Standup scheduled for 12:00 on monday, friday")
|
97
|
+
end
|
4
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-updates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|