lib/heartcheck/checks/firewall.rb in heartcheck-1.5.0 vs lib/heartcheck/checks/firewall.rb in heartcheck-1.5.1

- old
+ new

@@ -6,24 +6,24 @@ end def validate services.each do |service| begin - Net::Telnet.new(service.params) + Net::Telnet.new(service.params).close rescue Errno::ECONNREFUSED; nil rescue append_error(service) end end end def uri_info - services.map do |s| + services.map do |service| { - host: s.uri.host, - port: s.uri.port, - scheme: s.uri.scheme + host: service.host, + port: service.port, + scheme: service.uri.scheme || '' } end end private @@ -31,10 +31,10 @@ def custom_error(service) error_message = "connection refused on: #{service.host}:#{service.port}" if service.proxy proxy_uri = URI(service.proxy) - error_message << " via proxy: #{proxy_uri.host}:#{proxy_uri.port}" + error_message << " using proxy: #{proxy_uri.host}:#{proxy_uri.port}" end @errors << error_message end end