Skip to content

Commit 0b7f5a8

Browse files
committed
Small styling fixes on the client code
1 parent 609b941 commit 0b7f5a8

File tree

1 file changed

+4
-4
lines changed
  • elasticsearch-transport/lib/elasticsearch/transport

1 file changed

+4
-4
lines changed

elasticsearch-transport/lib/elasticsearch/transport/client.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def initialize(arguments={}, &block)
116116
@send_get_body_as = @arguments[:send_get_body_as] || 'GET'
117117

118118
if @arguments[:request_timeout]
119-
@arguments[:transport_options][:request] = { :timeout => @arguments[:request_timeout] }
119+
@arguments[:transport_options][:request] = { timeout: @arguments[:request_timeout] }
120120
end
121121

122122
@arguments[:transport_options][:headers] ||= {}
@@ -130,21 +130,21 @@ def initialize(arguments={}, &block)
130130
else
131131
transport_class = @arguments[:transport_class] || DEFAULT_TRANSPORT_CLASS
132132
if transport_class == Transport::HTTP::Faraday
133-
@transport = transport_class.new(:hosts => @seeds, :options => @arguments) do |faraday|
133+
@transport = transport_class.new(hosts: @seeds, options: @arguments) do |faraday|
134134
block.call faraday if block
135135
unless (h = faraday.builder.handlers.last) && h.name.start_with?("Faraday::Adapter")
136136
faraday.adapter(@arguments[:adapter] || __auto_detect_adapter)
137137
end
138138
end
139139
else
140-
@transport = transport_class.new(:hosts => @seeds, :options => @arguments)
140+
@transport = transport_class.new(hosts: @seeds, options: @arguments)
141141
end
142142
end
143143
end
144144

145145
# Performs a request through delegation to {#transport}.
146146
#
147-
def perform_request(method, path, params={}, body=nil, headers=nil)
147+
def perform_request(method, path, params = {}, body = nil, headers = nil)
148148
method = @send_get_body_as if 'GET' == method && body
149149
transport.perform_request(method, path, params, body, headers)
150150
end

0 commit comments

Comments
 (0)