Permalink
Browse files

Remove default SSL configuration options and override

Closes #399.
  • Loading branch information...
1 parent 8cf5b2d commit 113b14bc05a9f8e513245fda057e7f16f8965357 @sferik committed May 30, 2013
Showing with 2 additions and 8 deletions.
  1. +2 −5 lib/twitter/client.rb
  2. +0 −3 lib/twitter/default.rb
View
@@ -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]
@@ -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
View
@@ -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|

0 comments on commit 113b14b

Please sign in to comment.