opencage-geocoder 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/opencage/geocoder.rb +11 -1
- data/lib/opencage/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1016936b8f076dec6b73f93da919989aa11e9368c5faf7a05e622d0635964b90
|
4
|
+
data.tar.gz: 7455a9c6cc3d465b677110338163416c41d1e01eaad0f438bb3ac136c5331401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1777c2b3e8e2c003d28ed9b3828b26b00f1c818da194e9f44357adba0ab7ef44cd5825883755e68d1e795f869bcbd5a73fef9ef3ec63740526e281d9d4bbbab
|
7
|
+
data.tar.gz: cc90bf3ad237f10131aee18db89db986c054aa3d36c072a94f3051147319b7f8ca381606f339164cb358ee80ff7d262d58ee1c77441bee566006cad5fb880c37
|
data/lib/opencage/geocoder.rb
CHANGED
@@ -15,7 +15,17 @@ module OpenCage
|
|
15
15
|
def geocode(location, options = {})
|
16
16
|
request = Request.new(@api_key, location, options)
|
17
17
|
|
18
|
-
|
18
|
+
begin
|
19
|
+
results = fetch(request.to_s)
|
20
|
+
rescue Errno::ECONNREFUSED
|
21
|
+
raise_error("408 Failed to open TCP connection to API #{request}")
|
22
|
+
rescue Errno::ECONNRESET
|
23
|
+
# Connection reset by peer - SSL_connect
|
24
|
+
raise_error("408 Failed to open SSL connection to API #{request}")
|
25
|
+
rescue Net::OpenTimeout
|
26
|
+
raise_error("408 Timeout connecting to API #{request}")
|
27
|
+
end
|
28
|
+
|
19
29
|
return [] unless results
|
20
30
|
|
21
31
|
results.map { |r| Location.new(r) }
|
data/lib/opencage/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opencage-geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Scully
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-02-
|
12
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A client for the OpenCage geocoding API - https://opencagedata.com/
|
15
15
|
email: support@opencagedata.com
|