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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cc93c1969133762b0b44abc94b947239b35824a
4
- data.tar.gz: 419b374f99fcccb0a6da401a5b0ebaee1c3845cf
3
+ metadata.gz: a0cea0645edd9219f2a7bdf5f8f1bf351f4deb30
4
+ data.tar.gz: 8522dfcf0e5ee1a1ef4c408202a60c9195833e74
5
5
  SHA512:
6
- metadata.gz: d68737ce25cb24a180df160dca960054e838bf970d3ceddf73a39b78238ac77515d8db8c8f70f5dc0a2a7410d96b1e802e4aad79912fd7ead7902747a3ab2fca
7
- data.tar.gz: c32dfa78249bc777a271a081be3416e246317de0e76173051018a838818d1c58393ac32738737dd23b9c511f287df1333a7048bc4ddbd82e11427cf0e43b864f
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
- return response.reply "Large result set. Sending you a direct message."
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
- arguments = response.matches[0][0].delete(':').split
63
+ search = response.matches[0][0]
64
64
 
65
65
  metrics = Librato::Metrics.metrics.map{|v| v["name"] }
66
- response_text = metrics.grep(/#{arguments[1]}/i).join(', ')
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
- return response.reply "Large result set. Sending you a direct message."
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-libratoo"
3
- spec.version = "0.1.1"
3
+ spec.version = "0.1.2"
4
4
  spec.authors = ["Eric Boehs"]
5
5
  spec.email = ["ericboehs@gmail.com"]
6
6
  spec.description = "Query librato metrics from Lita"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-libratoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Boehs