Skip to content

Commit

Permalink
Fixed desc display.
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Jul 6, 2016
1 parent 4dc6188 commit 5a27a3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/lita/handlers/onewheel_beer_pints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def send_response(tap, datum, response)
reply += "#{datum[:name]} "
reply += datum[:abv].to_s + '% ABV '
reply += datum[:ibu].to_s + ' IBU '
reply += "- #{datum[:desc]}, "
reply += "- #{datum[:desc]}"

Lita.logger.info "send_response: Replying with #{reply}"

Expand Down Expand Up @@ -93,6 +93,7 @@ def parse_response(response)
# gimme_what_you_got
if got_beer
beer_desc = beer_node.children.to_s

got_beer = false
full_text_search = "#{beer_name} #{beer_desc.to_s.gsub /\d+\.*\d*%*/, ''}"

Expand Down
2 changes: 1 addition & 1 deletion lita-onewheel-beer-pints.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-beer-pints'
spec.version = '0.0.0'
spec.version = '0.0.1'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = %q{Lita interface to Pints Taproom listings.}
Expand Down
2 changes: 1 addition & 1 deletion spec/lita/handlers/onewheel_beer_pints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

it 'displays details for tap brick' do
send_command 'pints brick'
expect(replies.last).to eq("Pints's tap 1) Brick House Blonde 5.0% ABV 18 IBU - She’s blonde and refreshing! She’s mighty mighty! Brewed with perfect proportions of Northwest hops and malts for a beer that makes an old man wish for younger days. This session ale lets it all hang out with easy drinkability and a light malt finish. …what a winning hand!, ")
expect(replies.last).to eq("Pints's tap 1) Brick House Blonde 5.0% ABV 18 IBU - She’s blonde and refreshing! She’s mighty mighty! Brewed with perfect proportions of Northwest hops and malts for a beer that makes an old man wish for younger days. This session ale lets it all hang out with easy drinkability and a light malt finish. …what a winning hand!")
end

it 'displays details for tap 7' do
Expand Down

0 comments on commit 5a27a3c

Please sign in to comment.