lita-onewheel-beer-craftpourhouse 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f0dfb4a24a24f87f38e9a1ca2db0583728a058a
|
4
|
+
data.tar.gz: '08dd842ab24812417f41adc26831847f130ef268'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d53e88f9b8540a8e59e8b1e779619438e0ba183b0b08296833f599f7b346c25c4b8607b4b06fb211663b513c7fab5ffa7d851ffaacb1a273a7318363b6777196
|
7
|
+
data.tar.gz: 26c513ac19bc2c5a47cb810f91d3793bcdcca744aace8e0c1e0c73cea83decdc45afc1a9eb339d473259774da968fae7e7b742e12b14503c86c67d23db9b0b60
|
@@ -6,40 +6,40 @@ require 'lita-onewheel-beer-base'
|
|
6
6
|
module Lita
|
7
7
|
module Handlers
|
8
8
|
class OnewheelBeerCraftpourhouse < OnewheelBeerBase
|
9
|
-
route /^
|
9
|
+
route /^cph$/i,
|
10
10
|
:taps_list,
|
11
11
|
command: true,
|
12
|
-
help: {'
|
12
|
+
help: {'cph' => 'Display the current Craftpourhouse Bar taps.'}
|
13
13
|
|
14
|
-
route /^
|
14
|
+
route /^cph ([\w ]+)$/i,
|
15
15
|
:taps_deets,
|
16
16
|
command: true,
|
17
|
-
help: {'
|
17
|
+
help: {'cph 4' => 'Display the Craftpourhouse tap 4 deets, including prices.'}
|
18
18
|
|
19
|
-
route /^
|
19
|
+
route /^cph ([<>=\w.\s]+)%$/i,
|
20
20
|
:taps_by_abv,
|
21
21
|
command: true,
|
22
|
-
help: {'
|
22
|
+
help: {'cph >4%' => 'Display Craftpourhouse beers over 4% ABV.'}
|
23
23
|
|
24
|
-
route /^
|
24
|
+
route /^cph ([<>=\$\w.\s]+)$/i,
|
25
25
|
:taps_by_price,
|
26
26
|
command: true,
|
27
|
-
help: {'
|
27
|
+
help: {'cph <$5' => 'Display Craftpourhouse beers under $5.'}
|
28
28
|
|
29
|
-
route /^
|
29
|
+
route /^cph (roulette|random|rand|ran|ra|r)$/i,
|
30
30
|
:taps_by_random,
|
31
31
|
command: true,
|
32
|
-
help: {'
|
32
|
+
help: {'cph roulette' => 'Can\'t decide what to drink at Craftpourhouse? Let me do it for you!'}
|
33
33
|
|
34
|
-
route /^
|
34
|
+
route /^cphabvlow$/i,
|
35
35
|
:taps_low_abv,
|
36
36
|
command: true,
|
37
|
-
help: {'
|
37
|
+
help: {'cphabvlow' => 'Show me the lowest Craftpourhouse abv keg.'}
|
38
38
|
|
39
|
-
route /^
|
39
|
+
route /^cphabvhigh$/i,
|
40
40
|
:taps_high_abv,
|
41
41
|
command: true,
|
42
|
-
help: {'
|
42
|
+
help: {'cphabvhigh' => 'Show me the highest Craftpourhouse abv keg.'}
|
43
43
|
|
44
44
|
def send_response(tap, datum, response)
|
45
45
|
reply = "Craftpourhouse tap #{tap}) #{get_tap_type_text(datum[:type])}"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-beer-craftpourhouse'
|
3
|
-
spec.version = '0.0
|
3
|
+
spec.version = '1.0.0'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to Craftpourhouse's Barlistings.}
|
@@ -1,20 +1,20 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Lita::Handlers::OnewheelBeerCraftpourhouse, lita_handler: true do
|
4
|
-
it { is_expected.to route_command('
|
5
|
-
it { is_expected.to route_command('
|
6
|
-
it { is_expected.to route_command('
|
7
|
-
it { is_expected.to route_command('
|
8
|
-
it { is_expected.to route_command('
|
9
|
-
it { is_expected.to route_command('
|
10
|
-
it { is_expected.to route_command('
|
11
|
-
it { is_expected.to route_command('
|
12
|
-
it { is_expected.to route_command('
|
13
|
-
it { is_expected.to route_command('
|
14
|
-
it { is_expected.to route_command('
|
15
|
-
it { is_expected.to route_command('
|
16
|
-
it { is_expected.to route_command('
|
17
|
-
it { is_expected.to route_command('
|
4
|
+
it { is_expected.to route_command('cph') }
|
5
|
+
it { is_expected.to route_command('cph 4') }
|
6
|
+
it { is_expected.to route_command('cph nitro') }
|
7
|
+
it { is_expected.to route_command('cph CASK') }
|
8
|
+
it { is_expected.to route_command('cph <$4') }
|
9
|
+
it { is_expected.to route_command('cph < $4') }
|
10
|
+
it { is_expected.to route_command('cph <=$4') }
|
11
|
+
it { is_expected.to route_command('cph <= $4') }
|
12
|
+
it { is_expected.to route_command('cph >4%') }
|
13
|
+
it { is_expected.to route_command('cph > 4%') }
|
14
|
+
it { is_expected.to route_command('cph >=4%') }
|
15
|
+
it { is_expected.to route_command('cph >= 4%') }
|
16
|
+
it { is_expected.to route_command('cphabvhigh') }
|
17
|
+
it { is_expected.to route_command('cphabvlow') }
|
18
18
|
|
19
19
|
before do
|
20
20
|
mock = File.open('spec/fixtures/craftpourhouse.json').read
|
@@ -22,46 +22,46 @@ describe Lita::Handlers::OnewheelBeerCraftpourhouse, lita_handler: true do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'shows the taps' do
|
25
|
-
send_command '
|
25
|
+
send_command 'cph'
|
26
26
|
expect(replies.last).to include('taps: 3) Nectar Creek Mead Apis 4) Atlas Cider Company Hard Apple Cider')
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'displays details for tap 4' do
|
30
|
-
send_command '
|
30
|
+
send_command 'cph 4'
|
31
31
|
expect(replies.last).to include('Craftpourhouse tap 4) Hard Apple Cider - Our flagship apple cider is a celebration of the Northwest')
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'searches for ipa' do
|
35
|
-
send_command '
|
35
|
+
send_command 'cph ipa'
|
36
36
|
expect(replies.last).to include('Craftpourhouse tap 16) Beak Breaker - Beak Breaker is our newest homage to big, aromatic')
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'searches for abv >9%' do
|
40
|
-
send_command '
|
40
|
+
send_command 'cph >9%'
|
41
41
|
expect(replies.count).to eq(3)
|
42
42
|
expect(replies[0]).to include('Craftpourhouse tap 16) Beak Breaker - Beak Breaker is our newest homage to big, aromatic')
|
43
43
|
expect(replies[1]).to include('Craftpourhouse tap 23) Judgment Day - A massive beer in every sense of the word. A stronger and more')
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'runs a random beer through' do
|
47
|
-
send_command '
|
47
|
+
send_command 'cph roulette'
|
48
48
|
expect(replies.count).to eq(1)
|
49
49
|
expect(replies.last).to include('Craftpourhouse tap')
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'runs a random beer through' do
|
53
|
-
send_command '
|
53
|
+
send_command 'cph random'
|
54
54
|
expect(replies.count).to eq(1)
|
55
55
|
expect(replies.last).to include('Craftpourhouse tap')
|
56
56
|
end
|
57
57
|
|
58
58
|
it 'displays hige abv' do
|
59
|
-
send_command '
|
59
|
+
send_command 'cphabvhigh'
|
60
60
|
expect(replies.last).to include('Craftpourhouse tap 23) Judgment Day - A massive beer in every sense of the word.')
|
61
61
|
end
|
62
62
|
|
63
63
|
it 'displays low abv' do
|
64
|
-
send_command '
|
64
|
+
send_command 'cphabvlow'
|
65
65
|
expect(replies.last).to include('Craftpourhouse tap 7) Sun Made Cucumber Berliner Weisse')
|
66
66
|
end
|
67
67
|
end
|