Skip to content

Commit

Permalink
Remove default SSL configuration options and override
Browse files Browse the repository at this point in the history
Closes #399.
  • Loading branch information
sferik committed May 30, 2013
1 parent 8cf5b2d commit 113b14b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 2 additions & 5 deletions lib/twitter/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def put(path, params={})
end

private

# Returns a proc that can be used to setup the Faraday::Request headers
#
# @param method [Symbol]
Expand Down Expand Up @@ -116,11 +117,7 @@ def request(method, path, params={}, signature_params=params)
#
# @return [Faraday::Connection]
def connection
@connection ||= begin
connection_options = {:builder => @middleware}
connection_options[:ssl] = {:verify => true} if @endpoint[0..4] == 'https'
Faraday.new(@endpoint, @connection_options.merge(connection_options))
end
@connection ||= Faraday.new(@endpoint, @connection_options.merge(:builder => @middleware))
end

# Generates authentication header for a bearer token request
Expand Down
3 changes: 0 additions & 3 deletions lib/twitter/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ module Default
:open_timeout => 5,
:timeout => 10,
},
:ssl => {
:verify => false
},
} unless defined? Twitter::Default::CONNECTION_OPTIONS
IDENTITY_MAP = false unless defined? Twitter::Default::IDENTITY_MAP
MIDDLEWARE = Faraday::Builder.new do |builder|
Expand Down

0 comments on commit 113b14b

Please sign in to comment.