lita-standups 1.0.2 → 1.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9150d72ab74a0bd9956df37c29028e6d506aa89a
|
4
|
+
data.tar.gz: c014370721a2908ef58d345e1ddc65f03e9df005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fecd14554ccd128b44d5fdd385ef57dd8c1555e3eea5c5c33f3a5995437454c8062da4d0697c871ff4e7304f2ffae9f558aa34ebfe97c64bb94adbd1f206f874
|
7
|
+
data.tar.gz: 4671f26d54cb3b3292fb9cf448eb843cbf0c5ce7bb09245befe18f851bdabb8e2901a7ce54bfce23a199dea8312d156fafd57227d090a3b500ff4addd20ba854
|
@@ -2,6 +2,9 @@ module Lita
|
|
2
2
|
module Handlers
|
3
3
|
class Standups < Handler
|
4
4
|
|
5
|
+
route(/^debug standups$/, :debug_standups,
|
6
|
+
command: true)
|
7
|
+
|
5
8
|
route(/^list standups$/, :list_standups,
|
6
9
|
command: true,
|
7
10
|
help: { 'list standups' => 'list configured standups' })
|
@@ -149,6 +152,25 @@ module Lita
|
|
149
152
|
Lita::Standups.const_defined?(name) ? Lita::Standups.const_get(name) : super
|
150
153
|
end
|
151
154
|
|
155
|
+
def debug_standups(request)
|
156
|
+
request.reply "*Standups*"
|
157
|
+
Models::Standup.all.each do |standup|
|
158
|
+
request.reply ">>> \n" + standup.description
|
159
|
+
request.reply "```\n#{standup.inspect}\n```"
|
160
|
+
end
|
161
|
+
|
162
|
+
request.reply "*Scheduled Standups*"
|
163
|
+
Models::StandupSchedule.all.each do |schedule|
|
164
|
+
request.reply ">>> \n" + schedule.description
|
165
|
+
request.reply "```\n#{schedule.inspect}\n```"
|
166
|
+
end
|
167
|
+
|
168
|
+
request.reply "*Rufus Schedule*"
|
169
|
+
request.reply robot.jobs_info.map{|j| "```\n" + j.join("\n") + "\n```" }.join("\n\n")
|
170
|
+
|
171
|
+
request.reply "*Server time*: #{Time.now}"
|
172
|
+
end
|
173
|
+
|
152
174
|
Lita.register_handler(self)
|
153
175
|
end
|
154
176
|
end
|
@@ -65,6 +65,19 @@ module Lita
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def jobs_info
|
69
|
+
scheduler.jobs.map do |job|
|
70
|
+
[
|
71
|
+
"Type: #{job.class}",
|
72
|
+
"ID: #{job.job_id}",
|
73
|
+
"Tags: #{job.tags.join(', ')}",
|
74
|
+
("Options: #{job.opts.except(:tags).inspect}" if job.opts.except(:tags).size > 0),
|
75
|
+
"Next Run: #{job.next_time} (#{job.next_time - Time.now} seconds from now)",
|
76
|
+
"Schedule: #{job.try(:original)}"
|
77
|
+
].compact
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
68
81
|
# :nocov:
|
69
82
|
def run
|
70
83
|
schedule_standups
|
@@ -13,7 +13,7 @@ module Lita
|
|
13
13
|
if: ->(wizard) { value_for(:repeat) == 'weekly' }
|
14
14
|
|
15
15
|
step :time,
|
16
|
-
label: 'At what time? (ex 9am)',
|
16
|
+
label: 'At what time? (ex 9am - time will be considered GMT time)',
|
17
17
|
validate: /^([1-9]|1[0-2]|0[1-9])?(:[0-5][0-9])?\s?([aApP][mM])?$/
|
18
18
|
|
19
19
|
step :recipients,
|
data/lita-standups.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-standups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristian Bica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|