Skip to content

Commit

Permalink
EmHttp adapter: drop superfluous loaded? check (#1213)
Browse files Browse the repository at this point in the history
We are loaded in this section.
  • Loading branch information
olleolleolle committed Dec 1, 2020
1 parent ebbbab5 commit 47411d8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions lib/faraday/adapter/em_http.rb
Expand Up @@ -93,17 +93,15 @@ def request_options(env)
dependency do
require 'em-http'

if Faraday::Adapter::EMHttp.loaded?
begin
require 'openssl'
rescue LoadError
warn 'Warning: no such file to load -- openssl. ' \
'Make sure it is installed if you want HTTPS support'
else
require 'em-http/version'
if EventMachine::HttpRequest::VERSION < '1.1.6'
require 'faraday/adapter/em_http_ssl_patch'
end
begin
require 'openssl'
rescue LoadError
warn 'Warning: no such file to load -- openssl. ' \
'Make sure it is installed if you want HTTPS support'
else
require 'em-http/version'
if EventMachine::HttpRequest::VERSION < '1.1.6'
require 'faraday/adapter/em_http_ssl_patch'
end
end
end
Expand Down

0 comments on commit 47411d8

Please sign in to comment.