lita-onewheel-beer-base 2.0.3 → 2.0.4

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: c91410dff2fa0633412b60e6371dbd05093cc960
4
- data.tar.gz: 177c83c84cc9bbf780db20a69c76487a5779d464
3
+ metadata.gz: 7ec86f858197e539d118edbdea723ebfdf062a2a
4
+ data.tar.gz: c57353af66713af820159b5643fd5fb31b376c8e
5
5
  SHA512:
6
- metadata.gz: 17196cf5e745dacc133a21e69dbdaf4bb99075c446046146924e8ec8e199dbb84283a7e1941c68f5a2cf77388f17c56fc3d4e41afebff984d9bb1ecb03a7f153
7
- data.tar.gz: 36fc58d76d8337c5800b13eb7e43b24a408e457c63f6e02dec8a6051d6889fe03e20dc47ea880005781fc618127e48dbafc7e618ecc81bde7d88bd53484acdda
6
+ metadata.gz: 2735f278840935cb0847c667de1de2cb1dc6b13926a9e9ba67e8a37eafab4bd2f59ae6ba250a47d052c6f78d0590bba0d74ebd590be905b26a299ba7418883cb
7
+ data.tar.gz: 2ed80b30a7ce6042cef698acc570a45cf09c5a50457745bb124c99792263ae4867ffc0b645450d9e51ce7220218a74ecadd9ce81f2fb9e9e334db561239a6d35
@@ -32,9 +32,12 @@ module Lita
32
32
  # Search directly by tap number OR full text match.
33
33
  # Let's make cask and nitro taps specific.
34
34
  Lita.logger.debug "Searching for #{query} within #{tap}"
35
- if query.match(/^\d+$/) and tap == query
36
- Lita.logger.debug "#{query} matched #{tap} by number"
37
- send_response(tap, datum, response)
35
+ if query.match(/^\d+$/)
36
+ # Short circuit if we're searching only by number.
37
+ if tap == query
38
+ Lita.logger.debug "#{query} matched #{tap} by number"
39
+ send_response(tap, datum, response)
40
+ end
38
41
  elsif (datum[:search].to_s.match(/#{query}/i)) or (datum[:type].to_s.downcase.match(/#{query}/i)) # Cask and Nitro
39
42
  Lita.logger.debug "#{query} matched #{datum[:search]} by text"
40
43
  send_response(tap, datum, response)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-beer-base'
3
- spec.version = '2.0.3'
3
+ spec.version = '2.0.4'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita base class for beer searches.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-beer-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps