lita-onewheel-beer-abvpub 0.0.0 → 0.0.1
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: dc7464c85ddb213fe9183c323ae6813450415684
|
4
|
+
data.tar.gz: ffd678c74fa6b532b7f68549f2db6d327c597574
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0405aad88b7f6d6732939f18c5a2f6f8b72ac2143d2143d9b066aef89f72cc77855492dec47e21ff3b3cfc1cde7a24ab2747779012fd1c6dceb0bad71276216b
|
7
|
+
data.tar.gz: 02fa1a75f5c8043b91c4f8560f3e2aa5f175b9fe510320e06d92bedac0cae4ae00e79c2e32450552946a029f61946c7d93de7eeb86034c038cdd6c08c4ae25e5
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
# lita-onewheel-
|
1
|
+
# lita-onewheel-abvpub
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/onewheelskyward/lita-onewheel-abvpub.
|
4
|
-
[![Coverage Status](https://coveralls.io/repos/onewheelskyward/lita-onewheel-abvpub/badge.png)](https://coveralls.io/r/onewheelskyward/lita-onewheel-abvpub)
|
3
|
+
[![Build Status](https://travis-ci.org/onewheelskyward/lita-onewheel-beer-abvpub.svg?branch=master)](https://travis-ci.org/onewheelskyward/lita-onewheel-beer-abvpub)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/onewheelskyward/lita-onewheel-beer-abvpub/badge.png)](https://coveralls.io/r/onewheelskyward/lita-onewheel-beer-abvpub)
|
5
5
|
|
6
6
|
Searches ABVPub's draft list for data and displays it in IRC.
|
7
7
|
http://www.abvpub.com/taps/
|
@@ -45,7 +45,7 @@ module Lita
|
|
45
45
|
reply = "Abvpub tap #{tap}) #{get_tap_type_text(datum[:type])}"
|
46
46
|
# reply += "#{datum[:brewery]} "
|
47
47
|
reply += "#{datum[:name]} "
|
48
|
-
reply += "- #{datum[:desc]}, "
|
48
|
+
reply += "- #{datum[:desc]}, " if datum[:desc]
|
49
49
|
# reply += "Served in a #{datum[1]['glass']} glass. "
|
50
50
|
# reply += "#{datum[:remaining]}"
|
51
51
|
reply += "#{datum[:abv]}%"
|
@@ -93,13 +93,13 @@ module Lita
|
|
93
93
|
abv.sub! /\%/, ''
|
94
94
|
end
|
95
95
|
|
96
|
-
ibu_node = /IBU \d+/.match(beer_node.css('span.abvABV').text)
|
96
|
+
ibu_node = /IBU: \d+/.match(beer_node.css('span.abvABV').text)
|
97
97
|
if ibu_node
|
98
98
|
ibu = ibu_node[0]
|
99
99
|
ibu.sub! /IBU /, ''
|
100
100
|
end
|
101
101
|
|
102
|
-
full_text_search = "#{brewery} #{beer_name.to_s.gsub /(\d+|')/, ''}" # #{beer_desc.to_s.gsub /\d+\.*\d*%*/, ''}
|
102
|
+
full_text_search = "#{brewery} #{beer_name.to_s.gsub /(\d+|')/, ''} #{beer_type}" # #{beer_desc.to_s.gsub /\d+\.*\d*%*/, ''}
|
103
103
|
|
104
104
|
# price_node = beer_node.css('td')[1].children.to_s
|
105
105
|
# price = (price_node.sub /\$/, '').to_f
|
@@ -107,7 +107,7 @@ module Lita
|
|
107
107
|
gimme_what_you_got[tap_name] = {
|
108
108
|
# type: tap_type,
|
109
109
|
# remaining: remaining,
|
110
|
-
|
110
|
+
brewery: brewery.to_s,
|
111
111
|
name: beer_name.to_s,
|
112
112
|
abv: abv.to_f,
|
113
113
|
ibu: ibu.to_i,
|
@@ -23,7 +23,7 @@ describe Lita::Handlers::OnewheelBeerAbvpub, lita_handler: true do
|
|
23
23
|
|
24
24
|
it 'shows the taps' do
|
25
25
|
send_command 'abvpub'
|
26
|
-
expect(replies.last).to include('taps: 1) Pinot Gris 2) Apis')
|
26
|
+
expect(replies.last).to include('taps: 1) Persnickety Pinot Gris 2) Nectar Creek Apis')
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'displays details for tap 4' do
|