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 +4 -4
- data/lib/lita/handlers/onewheel_beer_base.rb +6 -3
- data/lita-onewheel-beer-base.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ec86f858197e539d118edbdea723ebfdf062a2a
|
4
|
+
data.tar.gz: c57353af66713af820159b5643fd5fb31b376c8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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+$/)
|
36
|
-
|
37
|
-
|
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)
|