mirror of
https://github.com/lostisland/faraday.git
synced 2025-12-09 00:02:49 -05:00
chore: RuboCop lint Naming/MemoizedInstanceVariableName
This commit is contained in:
parent
9e25ee6adc
commit
2fa4043f21
@ -121,13 +121,11 @@ module Faraday
|
||||
return ssl[:cert_store] if ssl[:cert_store]
|
||||
|
||||
# Memoize the cert store so that the same one is passed to
|
||||
# HTTPClient each time, to avoid resyncing SSL sesions when
|
||||
# HTTPClient each time, to avoid resyncing SSL sessions when
|
||||
# it's changed
|
||||
@cert_store ||= begin
|
||||
@ssl_cert_store ||= begin
|
||||
# Use the default cert store by default, i.e. system ca certs
|
||||
cert_store = OpenSSL::X509::Store.new
|
||||
cert_store.set_default_paths
|
||||
cert_store
|
||||
OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ module Faraday
|
||||
NET_HTTP_EXCEPTIONS << Net::OpenTimeout if defined?(Net::OpenTimeout)
|
||||
|
||||
def initialize(app = nil, opts = {}, &block)
|
||||
@cert_store = nil
|
||||
@ssl_cert_store = nil
|
||||
super(app, opts, &block)
|
||||
end
|
||||
|
||||
@ -168,12 +168,11 @@ module Faraday
|
||||
|
||||
def ssl_cert_store(ssl)
|
||||
return ssl[:cert_store] if ssl[:cert_store]
|
||||
return @cert_store if @cert_store
|
||||
|
||||
@ssl_cert_store ||= begin
|
||||
# Use the default cert store by default, i.e. system ca certs
|
||||
@cert_store = OpenSSL::X509::Store.new
|
||||
@cert_store.set_default_paths
|
||||
@cert_store
|
||||
OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
||||
end
|
||||
end
|
||||
|
||||
def ssl_verify_mode(ssl)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user