lib/elasticsearch/api/actions/ping.rb in elasticsearch-api-7.13.3 vs lib/elasticsearch/api/actions/ping.rb in elasticsearch-api-7.14.0.pre
- old
+ new
@@ -20,11 +20,11 @@
module Actions
# Returns whether the cluster is running.
#
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.13/index.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.14/index.html
#
def ping(arguments = {})
headers = arguments.delete(:headers) || {}
arguments = arguments.clone
@@ -33,17 +33,17 @@
path = ""
params = {}
body = nil
begin
- perform_request(method, path, params, body, headers).status == 200 ? true : false
+ perform_request(method, path, params, body, headers).status == 200 ? true : false
rescue Exception => e
if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i
false
else
raise e
end
- end
+ end
end
end
end
end