lita-onewheel-baileys 1.3.1 → 1.3.2

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: d407097e9ecdf3d2b4118d6e5fd99ce1b8448207
4
- data.tar.gz: 1376744018d488ada43d7cad31f5d5fe4f949493
3
+ metadata.gz: a6f3771df09c93c3c3759c4ce4a736ee7d8622d1
4
+ data.tar.gz: e7b2ed24c323299b73bfa3f527ed6e137e3cce00
5
5
  SHA512:
6
- metadata.gz: 6b1d8f6f1b6e61b90062ba4bcf7bea6377e61b2c13d87f705823efc5c03b23add02891d648748f6ce424606653d47eb47fc95786d206409f3976d539035b235d
7
- data.tar.gz: 82ac6cbe446cd87c28292e51d9d4a7a01c9c228e680b84a9bad69a82248d5cff42a1bae3b7d3a96c961d34ddc9cd6db810ed83317f6991fce3451d978410f474
6
+ metadata.gz: 3bea4554e008fc4d781d33a3ccd1b6fd76fd94a281b83d1f2633543f9b68b788453471d5df596931a3c29018bbd97e3a6bda19bbc9ac1f799207eba0ae9472ae
7
+ data.tar.gz: c60a51a40bda256476f94d6030aa8a06894e62aa2d99e84b23ea5386735a56b1ccd2449026e04937d3e25d9312cb0cdb34501092d9dfa38281d8aadf10a87a94
@@ -35,7 +35,7 @@ module Lita
35
35
  if tap == query or (query =~ /nitro/i and tap.match('Nitro')) or (query =~ /cask/i and tap.match('Cask'))
36
36
  reply = "Bailey's tap #{tap}) "
37
37
  reply += "#{datum[:brewery]} "
38
- reply += "#{datum[:beer]}"
38
+ reply += "#{datum[:name]} - "
39
39
  reply += "#{datum[:desc]}, "
40
40
  # reply += "Served in a #{datum[1]['glass']} glass. "
41
41
  reply += "#{datum[:prices]}, "
@@ -56,13 +56,12 @@ module Lita
56
56
  noko = Nokogiri.HTML response
57
57
  noko.css('div#boxfielddata').each do |m|
58
58
  # gimme_what_you_got
59
- tap_info = {}
60
59
  tap = m.css('span').first.children.first.to_s.match(/[\w ]+\:/).to_s.sub /\:$/, ''
61
60
  remaining = m.attributes['title']
62
61
  brewery = m.css('span a').first.children.to_s.gsub(/\n/, '')
63
62
  brewery.gsub! /RBBA/, ''
64
63
  brewery.strip!
65
- beer_name = m.css('span i').first.children.to_s
64
+ beer_name = m.css('span i').first.children.to_s.strip
66
65
  beer_desc_matchdata = m.to_s.gsub(/\n/, '').match(/(<br\s*\/*>)(.+%) /)
67
66
  beer_desc = beer_desc_matchdata[2].gsub(/\s+/, ' ').strip
68
67
  prices_str = m.css('div#prices').children.to_s.strip
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-baileys'
3
- spec.version = '1.3.1'
3
+ spec.version = '1.3.2'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita interface to Bailey's Taproom listings.}
@@ -16,21 +16,21 @@ describe Lita::Handlers::OnewheelBaileys, lita_handler: true do
16
16
 
17
17
  it 'displays details for tap 4' do
18
18
  send_command 'taps 4'
19
- expect(replies.last).to eq('Bailey\'s tap 4) Wild Ride Abbey Dubbel – Barrel Aged (Pinot Noir) 8.2%, 4oz Pour – $4 | 12oz – $7, 26% remaining')
19
+ expect(replies.last).to eq('Bailey\'s tap 4) Wild Ride Solidarity - Abbey Dubbel – Barrel Aged (Pinot Noir) 8.2%, 4oz Pour – $4 | 12oz – $7, 26% remaining')
20
20
  end
21
21
 
22
22
  it 'doesn\'t explode on 1' do
23
23
  send_command 'taps 1'
24
- expect(replies.last).to eq('Bailey\'s tap 1) Cider Riot! Apple Cider w/ Irish tea 6.0%, 10oz – $4 | 20oz – $7 | 32oz Crowler $10, 48% remaining')
24
+ expect(replies.last).to eq('Bailey\'s tap 1) Cider Riot! Plastic Paddy - Apple Cider w/ Irish tea 6.0%, 10oz – $4 | 20oz – $7 | 32oz Crowler $10, 48% remaining')
25
25
  end
26
26
 
27
27
  it 'gets nitro' do
28
28
  send_command 'taps nitro'
29
- expect(replies.last).to eq('Bailey\'s tap Nitro 6) Backwoods Brown Ale 6.2%, 10oz – $3 | 20oz – $5, 98% remaining')
29
+ expect(replies.last).to eq('Bailey\'s tap Nitro 6) Backwoods Winchester Brown - Brown Ale 6.2%, 10oz – $3 | 20oz – $5, 98% remaining')
30
30
  end
31
31
 
32
32
  it 'gets cask' do
33
33
  send_command 'taps cask'
34
- expect(replies.last).to eq('Bailey\'s tap Cask 3) Machine House ESB 4.0%, 10oz – $3 | 20oz – $5, 57% remaining')
34
+ expect(replies.last).to eq('Bailey\'s tap Cask 3) Machine House Crystal Maze - ESB 4.0%, 10oz – $3 | 20oz – $5, 57% remaining')
35
35
  end
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-baileys
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
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-03-14 00:00:00.000000000 Z
11
+ date: 2016-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita