lita-libratoo 0.1.1 → 0.1.2
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/libratoo.rb +4 -4
- data/lita-libratoo.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: a0cea0645edd9219f2a7bdf5f8f1bf351f4deb30
|
4
|
+
data.tar.gz: 8522dfcf0e5ee1a1ef4c408202a60c9195833e74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa204f2e611853bfdb3db7c1585896282a84923f975b7110ad50f0834acc536b5965c36062f4e2ce8fcdec36778ee911159784679275fb43f6fcb12b3676543e
|
7
|
+
data.tar.gz: 8ed83fbcadc5eaff137344b9849e200fcd94256fb94d48cdbdc2328746093ffbb140fe8e6b29511e86a094448a9b9dd28d39081aed54bdc34ae96cfbcf396bc4
|
@@ -20,7 +20,7 @@ module Lita
|
|
20
20
|
response_text = metrics.grep(/#{arguments[1]}/i).join(', ')
|
21
21
|
response_text = "No results" if response_text.empty?
|
22
22
|
if response_text.length > 400 && !response.message.source.private_message
|
23
|
-
|
23
|
+
response.reply "Large result set. Sending you a direct message."
|
24
24
|
return response.reply_privately response_text
|
25
25
|
else
|
26
26
|
return response.reply response_text
|
@@ -60,13 +60,13 @@ module Lita
|
|
60
60
|
def librato_search(response)
|
61
61
|
Librato::Metrics.authenticate config.email, config.api_key
|
62
62
|
|
63
|
-
|
63
|
+
search = response.matches[0][0]
|
64
64
|
|
65
65
|
metrics = Librato::Metrics.metrics.map{|v| v["name"] }
|
66
|
-
response_text = metrics.grep(/#{
|
66
|
+
response_text = metrics.grep(/#{search}/i).join(', ')
|
67
67
|
response_text = "No results" if response_text.empty?
|
68
68
|
if response_text.length > 400 && !response.message.source.private_message
|
69
|
-
|
69
|
+
response.reply "Large result set. Sending you a direct message."
|
70
70
|
return response.reply_privately response_text
|
71
71
|
else
|
72
72
|
return response.reply response_text
|
data/lita-libratoo.gemspec
CHANGED