lib/riemann/tools/haproxy.rb in riemann-tools-1.4.0 vs lib/riemann/tools/haproxy.rb in riemann-tools-1.5.0

- old
+ new

@@ -42,18 +42,18 @@ end def csv http = ::Net::HTTP.new(@uri.host, @uri.port) http.use_ssl = true if @uri.scheme == 'https' - http.start do |h| + res = http.start do |h| get = ::Net::HTTP::Get.new(@uri.request_uri) unless @uri.userinfo.nil? userinfo = @uri.userinfo.split(':') get.basic_auth userinfo[0], userinfo[1] end h.request get end - CSV.parse(http.body.split('# ')[1], { headers: true }) + CSV.parse(res.body.split('# ')[1], { headers: true }) end end end end