lita-onewheel-automatic-pancake 0.0.0 → 0.1.0
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: 5f5727090f8a35b5c340da148571e4727466335b
|
4
|
+
data.tar.gz: 53cba07bca9cdcb59ccadb4920dfff1392112f9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf24181c6e76c56ef8e1763789f01c62555a2b5352a5018f9490b1d8cbd0d1afc90833ea4fe212d1dc79c5d2ffe438907319def62b9a92cdf84ec3c96eb0a292
|
7
|
+
data.tar.gz: 64c31e100627ba4e4b05d4358e9fdd2013ccbd6083544f9c0c72f94b45e406c86c39ba90bd767474a366cc9eeba746be3d986fae679dfe3da5f8d35b3e2e8de4
|
@@ -10,6 +10,11 @@ module Lita
|
|
10
10
|
command: true,
|
11
11
|
help: {'play' => 'Play something with this text.'}
|
12
12
|
|
13
|
+
route /^kill$/i,
|
14
|
+
:kill,
|
15
|
+
command: true,
|
16
|
+
help: {'kill' => 'MAKE IT STOP'}
|
17
|
+
|
13
18
|
def play(response)
|
14
19
|
search_term = response.matches[0][0]
|
15
20
|
Lita.logger.debug "Search term found #{search_term}"
|
@@ -17,6 +22,18 @@ module Lita
|
|
17
22
|
chosen_one = list_of_matches.sample
|
18
23
|
Lita.logger.debug "#{list_of_matches.count} matches, chose #{chosen_one.to_s}"
|
19
24
|
play_file(chosen_one)
|
25
|
+
response.reply "Playing #{chosen_one['name']}!"
|
26
|
+
end
|
27
|
+
|
28
|
+
def kill(response)
|
29
|
+
Lita.logger.debug 'Killing'
|
30
|
+
kill_sound
|
31
|
+
end
|
32
|
+
|
33
|
+
def kill_sound
|
34
|
+
uri = "#{config.pancake_server}/kill"
|
35
|
+
Lita.logger.debug "Killing! #{uri}"
|
36
|
+
RestClient.post uri, {}
|
20
37
|
end
|
21
38
|
|
22
39
|
def get_matches(search_term)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-automatic-pancake'
|
3
|
-
spec.version = '0.
|
3
|
+
spec.version = '0.1.0'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to Automatic Pancake.}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-automatic-pancake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|