lita-onewheel-automatic-pancake 0.0.0 → 0.1.0

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: c8b58acd60aaeab8ce34111484ea007576d058aa
4
- data.tar.gz: 84653a939172c8d15d9a47f422a94f896f16e79a
3
+ metadata.gz: 5f5727090f8a35b5c340da148571e4727466335b
4
+ data.tar.gz: 53cba07bca9cdcb59ccadb4920dfff1392112f9a
5
5
  SHA512:
6
- metadata.gz: ed3c1c5175cc96f960f1c54d7aa0f49745af274a016f88bdce20f059b4e50b51fa6406a0853a3c77f3a7a93d5ea1358091a1d1efe422de8acded21dd18fb2492
7
- data.tar.gz: 28a20fc20911dbdec5ea20c301779357568b106491786c344faaf9782a965e562d3cfad5bf4452f1c9fafb93c7e1f07208a0182679775ed8edfb65280ba5d456
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.0.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.0.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-13 00:00:00.000000000 Z
11
+ date: 2016-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita