lita-onewheel-beer-base 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/onewheel_beer_base.rb +6 -40
- data/lita-onewheel-beer-base.gemspec +1 -1
- 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: 655f558100bc6c61d7b8cf1ae4a0736ee8287c16
|
4
|
+
data.tar.gz: 5006b37ed1ef65b208ad3094b8e6b454d3c3dc4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 080ef9d9c492b98c6a27651971c2f1a04a43cbbcd5fbc5df9f3864456985b1a87f18a7594c945430e47581ca877caf5af46d657b77b023b528b5dd9393c7e82a
|
7
|
+
data.tar.gz: dfd4c84a4e0ba59001943c59ef9f4a3a89ee890483bb34d6bc1524ff15f3a913e2c992b2ca2040e5cc2033528c5563f28cc6592a5b0206bd3b343bea3e95ad4c
|
@@ -5,48 +5,10 @@ require 'sanitize'
|
|
5
5
|
module Lita
|
6
6
|
module Handlers
|
7
7
|
class OnewheelBeerBase < Handler
|
8
|
-
route /^taps$/i,
|
9
|
-
:taps_list,
|
10
|
-
command: true,
|
11
|
-
help: {'taps' => 'Display the current taps.'}
|
12
|
-
|
13
|
-
route /^taps ([\w ]+)$/i,
|
14
|
-
:taps_deets,
|
15
|
-
command: true,
|
16
|
-
help: {'taps 4' => 'Display the tap 4 deets, including prices.'}
|
17
|
-
|
18
|
-
route /^taps ([<>=\w.\s]+)%$/i,
|
19
|
-
:taps_by_abv,
|
20
|
-
command: true,
|
21
|
-
help: {'taps >4%' => 'Display beers over 4% ABV.'}
|
22
|
-
|
23
|
-
route /^taps ([<>=\$\w.\s]+)$/i,
|
24
|
-
:taps_by_price,
|
25
|
-
command: true,
|
26
|
-
help: {'taps <$5' => 'Display beers under $5.'}
|
27
|
-
|
28
|
-
route /^taps (roulette|random)$/i,
|
29
|
-
:taps_by_random,
|
30
|
-
command: true,
|
31
|
-
help: {'taps roulette' => 'Can\'t decide? Let me do it for you!'}
|
32
|
-
|
33
|
-
route /^tapslow$/i,
|
34
|
-
:taps_by_remaining,
|
35
|
-
command: true,
|
36
|
-
help: {'tapslow' => 'Show me the kegs at <10% remaining, or the lowest one available.'}
|
37
|
-
|
38
|
-
route /^tapsabvlow$/i,
|
39
|
-
:taps_low_abv,
|
40
|
-
command: true,
|
41
|
-
help: {'tapslow' => 'Show me the lowest abv keg.'}
|
42
|
-
|
43
|
-
route /^tapsabvhigh$/i,
|
44
|
-
:taps_high_abv,
|
45
|
-
command: true,
|
46
|
-
help: {'tapslow' => 'Show me the highest abv keg.'}
|
47
8
|
|
48
9
|
def taps_list(response)
|
49
|
-
|
10
|
+
# wakka wakka
|
11
|
+
beers = self.get_source
|
50
12
|
reply = "Bailey's taps: "
|
51
13
|
beers.each do |tap, datum|
|
52
14
|
reply += "#{tap}) "
|
@@ -198,6 +160,10 @@ module Lita
|
|
198
160
|
(type.empty?) ? '' : "(#{type}) "
|
199
161
|
end
|
200
162
|
|
163
|
+
def get_source
|
164
|
+
raise Exception
|
165
|
+
end
|
166
|
+
|
201
167
|
Lita.register_handler(self)
|
202
168
|
end
|
203
169
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-beer-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.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-05-
|
11
|
+
date: 2016-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|