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: bea15a986c7f70e988e51cb6e58fe488f3a3b1c1
4
- data.tar.gz: 8ca1b25a40f0255c0391705ed0e86d6c6677f768
3
+ metadata.gz: 6f0dfb4a24a24f87f38e9a1ca2db0583728a058a
4
+ data.tar.gz: '08dd842ab24812417f41adc26831847f130ef268'
5
5
  SHA512:
6
- metadata.gz: 6b6e88fcdc39d59bf59c5fa8a0746817fbf05f15cd66cb3827a7712fa73787bdc104d54108f04d861988aa4a93b9c640be40ecf612a195d0e55181d81fcdafc1
7
- data.tar.gz: dd05862b558ce79bc8282fd3b8668efb66544b311e9b6d46beb358b025bd792a3437cd649a7c042e8eae325f98713d4bab51df5197e26f7ecfe683af895b8e4b
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 /^cfp$/i,
9
+ route /^cph$/i,
10
10
  :taps_list,
11
11
  command: true,
12
- help: {'cfp' => 'Display the current Craftpourhouse Bar taps.'}
12
+ help: {'cph' => 'Display the current Craftpourhouse Bar taps.'}
13
13
 
14
- route /^cfp ([\w ]+)$/i,
14
+ route /^cph ([\w ]+)$/i,
15
15
  :taps_deets,
16
16
  command: true,
17
- help: {'cfp 4' => 'Display the Craftpourhouse tap 4 deets, including prices.'}
17
+ help: {'cph 4' => 'Display the Craftpourhouse tap 4 deets, including prices.'}
18
18
 
19
- route /^cfp ([<>=\w.\s]+)%$/i,
19
+ route /^cph ([<>=\w.\s]+)%$/i,
20
20
  :taps_by_abv,
21
21
  command: true,
22
- help: {'cfp >4%' => 'Display Craftpourhouse beers over 4% ABV.'}
22
+ help: {'cph >4%' => 'Display Craftpourhouse beers over 4% ABV.'}
23
23
 
24
- route /^cfp ([<>=\$\w.\s]+)$/i,
24
+ route /^cph ([<>=\$\w.\s]+)$/i,
25
25
  :taps_by_price,
26
26
  command: true,
27
- help: {'cfp <$5' => 'Display Craftpourhouse beers under $5.'}
27
+ help: {'cph <$5' => 'Display Craftpourhouse beers under $5.'}
28
28
 
29
- route /^cfp (roulette|random|rand|ran|ra|r)$/i,
29
+ route /^cph (roulette|random|rand|ran|ra|r)$/i,
30
30
  :taps_by_random,
31
31
  command: true,
32
- help: {'cfp roulette' => 'Can\'t decide what to drink at Craftpourhouse? Let me do it for you!'}
32
+ help: {'cph roulette' => 'Can\'t decide what to drink at Craftpourhouse? Let me do it for you!'}
33
33
 
34
- route /^cfpabvlow$/i,
34
+ route /^cphabvlow$/i,
35
35
  :taps_low_abv,
36
36
  command: true,
37
- help: {'cfpabvlow' => 'Show me the lowest Craftpourhouse abv keg.'}
37
+ help: {'cphabvlow' => 'Show me the lowest Craftpourhouse abv keg.'}
38
38
 
39
- route /^cfpabvhigh$/i,
39
+ route /^cphabvhigh$/i,
40
40
  :taps_high_abv,
41
41
  command: true,
42
- help: {'cfpabvhigh' => 'Show me the highest Craftpourhouse abv keg.'}
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.1'
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('cfp') }
5
- it { is_expected.to route_command('cfp 4') }
6
- it { is_expected.to route_command('cfp nitro') }
7
- it { is_expected.to route_command('cfp CASK') }
8
- it { is_expected.to route_command('cfp <$4') }
9
- it { is_expected.to route_command('cfp < $4') }
10
- it { is_expected.to route_command('cfp <=$4') }
11
- it { is_expected.to route_command('cfp <= $4') }
12
- it { is_expected.to route_command('cfp >4%') }
13
- it { is_expected.to route_command('cfp > 4%') }
14
- it { is_expected.to route_command('cfp >=4%') }
15
- it { is_expected.to route_command('cfp >= 4%') }
16
- it { is_expected.to route_command('cfpabvhigh') }
17
- it { is_expected.to route_command('cfpabvlow') }
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 'cfp'
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 'cfp 4'
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 'cfp ipa'
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 'cfp >9%'
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 'cfp roulette'
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 'cfp random'
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 'cfpabvhigh'
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 'cfpabvlow'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-beer-craftpourhouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps