lib/deputy.rb in deputy-0.1.25 vs lib/deputy.rb in deputy-0.1.26
- old
+ new
@@ -112,13 +112,11 @@
send_report "Deputies.Error", e.message
raise e
end
def self.send_report(metric, value)
- # TODO sheriff does not accept anything else, fix it...
- metric = metric.split('.',2)
- metric = metric.map{|m| m.gsub(/[^-_a-zA-Z]/, '_') } * '.'
- get "/report/#{metric}?value=#{CGI.escape value.to_s}"
+ raise "separate #{metric} with a ." unless metric.split('.',2).size == 2
+ get "/report/#{CGI.escape metric}?value=#{CGI.escape value.to_s}"
end
def self.get(path)
url = "#{sheriff_url}#{path}"
Timeout.timeout(1) do
\ No newline at end of file