lib/bard/config.rb in bard-0.58.0 vs lib/bard/config.rb in bard-0.59.0

- old
+ new

@@ -81,10 +81,16 @@ setting :ssh, :path, :ping, :gateway, :ssh_key, :env def default_ping uri = URI.parse("ssh://#{ssh}") - "http://#{uri.host}" + "https://#{uri.host}" + end + + def normalized_ping + normalized = ping || default_ping + normalized = "https://#{normalized}" unless normalized =~ /^http/ + normalized end def path(*args) if args.length == 1 self.path = args.first