lita-onewheel-beer-tin-bucket 0.0.0 → 0.1.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: 061120cae6549f02aee87d16bfe379e5cdc298ec
|
4
|
+
data.tar.gz: d6705c2c9fca42d07d6501429f963e48f349ee88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3363503a3d1db5e84eb20b681cda72546b2a2645ce5db19caf1920f629a2b2e33e13b30cf7f8a78f5df990f2e6e7e9e7634af11a1e9234003361dd8ac3b551f3
|
7
|
+
data.tar.gz: 3c04c02dfb36c06a56b8e405989742c989ef7eced69c4992d9c4a8357805a467b6998b4a0506963e23a7b1c7000a9b55d07fe8cff2aef6827bc8e95c4379a841
|
@@ -42,14 +42,13 @@ module Lita
|
|
42
42
|
help: {'tapslow' => 'Show me the highest abv keg.'}
|
43
43
|
|
44
44
|
def send_response(tap, datum, response)
|
45
|
-
reply = "
|
45
|
+
reply = "Tin Bucket tap #{tap}) #{get_tap_type_text(datum[:type])}"
|
46
46
|
# reply += "#{datum[:brewery]} "
|
47
47
|
reply += "#{datum[:name]} "
|
48
48
|
# reply += "- #{datum[:desc]}, "
|
49
49
|
# reply += "Served in a #{datum[1]['glass']} glass. "
|
50
50
|
# reply += "#{datum[:remaining]}"
|
51
|
-
reply += "#{datum[:abv]}
|
52
|
-
reply += "$#{datum[:price].to_s.sub '.0', ''}"
|
51
|
+
reply += "#{datum[:abv]}%"
|
53
52
|
|
54
53
|
Lita.logger.info "send_response: Replying with #{reply}"
|
55
54
|
|
@@ -85,7 +84,7 @@ module Lita
|
|
85
84
|
beer_name = beer_node.css('.beverageName').children.to_s
|
86
85
|
beer_type = beer_node.css('.beverageStyle').children.to_s
|
87
86
|
beer_location = beer_node.css('.producerLocation').children.to_s
|
88
|
-
abv = beer_node.css('.abv').children.to_s.sub
|
87
|
+
abv = beer_node.css('.abv').children.to_s.sub /%\s*/, ''
|
89
88
|
ibu = beer_node.css('.ibu').children.to_s
|
90
89
|
full_text_search = "#{brewery} #{beer_name} #{beer_type} #{beer_location}" # #{beer_desc.to_s.gsub /\d+\.*\d*%*/, ''}
|
91
90
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-beer-tin-bucket'
|
3
|
-
spec.version = '0.
|
3
|
+
spec.version = '0.1.0'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to Tin Bucket's listings.}
|
@@ -28,7 +28,7 @@ describe Lita::Handlers::OnewheelBeerTinBucket, lita_handler: true do
|
|
28
28
|
|
29
29
|
it 'displays details for tap 4' do
|
30
30
|
send_command 'tinbucket 4'
|
31
|
-
expect(replies.last).to eq('
|
31
|
+
expect(replies.last).to eq('Tin Bucket tap 4) Sticky Hands Hop Experience 8.8%')
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'doesn\'t explode on 1' do
|