lib/geocoder/lookups/base.rb in geocoder-1.3.4 vs lib/geocoder/lookups/base.rb in geocoder-1.3.5
- old
+ new
@@ -272,10 +272,11 @@
#
def make_api_request(query)
uri = URI.parse(query_url(query))
Geocoder.log(:debug, "Geocoder: HTTP request being made for #{uri.to_s}")
http_client.start(uri.host, uri.port, use_ssl: use_ssl?, open_timeout: configuration.timeout, read_timeout: configuration.timeout) do |client|
+ configure_ssl!(client) if use_ssl?
req = Net::HTTP::Get.new(uri.request_uri, configuration.http_headers)
if configuration.basic_auth[:user] and configuration.basic_auth[:password]
req.basic_auth(
configuration.basic_auth[:user],
configuration.basic_auth[:password]
@@ -294,9 +295,11 @@
false
else
configuration.use_https
end
end
+
+ def configure_ssl!(client); end
def check_api_key_configuration!(query)
key_parts = query.lookup.required_api_key_parts
if key_parts.size > Array(configuration.api_key).size
parts_string = key_parts.size == 1 ? key_parts.first : key_parts