Skip to content

Commit

Permalink
Don't need to use initialize key. Should just pass faraday options di…
Browse files Browse the repository at this point in the history
…rectly
  • Loading branch information
cheerfulstoic committed Mar 14, 2017
1 parent 9e4bef9 commit 3b28dbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/neo4j/core/cypher_session/adaptors/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize(url, options = {})
end

def connect
@requestor = Requestor.new(@url, USER_AGENT_STRING, self.class.method(:instrument_request), @options[:faraday_options] ||= {})
@requestor = Requestor.new(@url, USER_AGENT_STRING, self.class.method(:instrument_request), @options.fetch(:faraday_options, {}))
end

ROW_REST = %w(row REST)
Expand Down Expand Up @@ -106,7 +106,7 @@ def initialize(url, user_agent_string, instrument_proc, faraday_options = {})
@user = user
@password = password
@user_agent_string = user_agent_string
@faraday = wrap_connection_failed! { faraday_connection(faraday_options.fetch(:initialize, {})) }
@faraday = wrap_connection_failed! { faraday_connection(faraday_options) }
@instrument_proc = instrument_proc
end

Expand Down

0 comments on commit 3b28dbc

Please sign in to comment.