lib/deputy.rb in deputy-0.1.2 vs lib/deputy.rb in deputy-0.1.3

- old
+ new

@@ -1,7 +1,8 @@ require 'yaml' require 'open-uri' +require 'cgi' def eval_and_fetch_constants(x) old = Module.constants.map{|c| c.to_s} eval(x) new = (Module.constants.map{|c| c.to_s} - old) @@ -30,10 +31,10 @@ content = get("/plugins.rb") Scout.plugins(content).each{|p| p.new.build_report } end def self.send_report(metric, value) - get "/report/#{metric}/#{value}" + get "/report/#{CGI.escape metric}/#{CGI.escape value}" end def self.get(path) url = "#{sheriff_url}#{path}" open(url).read \ No newline at end of file