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: 48c66892c3e8907d48aa2990826a82405471be07
4
- data.tar.gz: f8ac3aca30b63e11503ec511e2a2072556c8103f
3
+ metadata.gz: dc7464c85ddb213fe9183c323ae6813450415684
4
+ data.tar.gz: ffd678c74fa6b532b7f68549f2db6d327c597574
5
5
  SHA512:
6
- metadata.gz: 72837129773caaccac6cf44841b01c7184daf4d8bc59b6f9b878af23251621169ba9d625785d7bb5fecdc268b1cc8474a58157226cdec61adb27b0e3bd02b275
7
- data.tar.gz: 7b67030253288f93b2cc799a6b095eae6984a00c0c7d17c23c498f635e95a6800dd84ef953e84f63a06c653ff6afad09532274ee0a9bd0448b951a2d7f77bbaa
6
+ metadata.gz: 0405aad88b7f6d6732939f18c5a2f6f8b72ac2143d2143d9b066aef89f72cc77855492dec47e21ff3b3cfc1cde7a24ab2747779012fd1c6dceb0bad71276216b
7
+ data.tar.gz: 02fa1a75f5c8043b91c4f8560f3e2aa5f175b9fe510320e06d92bedac0cae4ae00e79c2e32450552946a029f61946c7d93de7eeb86034c038cdd6c08c4ae25e5
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # lita-onewheel-apex-bar
1
+ # lita-onewheel-abvpub
2
2
 
3
- [![Build Status](https://travis-ci.org/onewheelskyward/lita-onewheel-abvpub.png?branch=master)](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
- # brewery: brewery.to_s,
110
+ brewery: brewery.to_s,
111
111
  name: beer_name.to_s,
112
112
  abv: abv.to_f,
113
113
  ibu: ibu.to_i,
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-beer-abvpub'
3
- spec.version = '0.0.0'
3
+ spec.version = '0.0.1'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita interface to ABVPub's Barlistings.}
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-beer-abvpub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps