google_maps_api-distance_matrix 0.1.0 → 0.1.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee7184a967b9259da6b107ba8d98045dff588d32
|
4
|
+
data.tar.gz: b7037b7503ab5851c8fddf2b28f66c21024d7cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28a405fef80038efc362d759d38e0ecae345c9d136015b2073caba15c372042a95c7ac49f68c2c67a5605175ad0b918d0b5c33170ca872fb4b954e4502de6a6a
|
7
|
+
data.tar.gz: 167e3005ee27f2e8945338fdbbbda96ebce7784ce2299a1062cdc8086c9cc79191f85e9fc04dbdfa3c0144696da54c3e38039dd65a910154c9d50626321362f2
|
@@ -17,11 +17,14 @@ class GoogleMapsAPI::DistanceMatrix::Request
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def perform
|
20
|
-
|
20
|
+
parsed_url = URI.parse(uri.to_s)
|
21
|
+
http = http_adapter.new(parsed_url.host, parsed_url.port)
|
22
|
+
http.use_ssl = (scheme == "https")
|
23
|
+
response = http.request_get(parsed_url.request_uri)
|
21
24
|
if response.is_a?(Net::HTTPSuccess)
|
22
25
|
return GoogleMapsAPI::DistanceMatrix::Response.from_json(response.body)
|
23
26
|
else
|
24
|
-
msg = "The response was not successful (200). Call #response for
|
27
|
+
msg = "The response was not successful (200). Call #response for details."
|
25
28
|
exception = GoogleMapsAPI::DistanceMatrix::ResponseError.new(msg)
|
26
29
|
exception.response = response
|
27
30
|
raise exception
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_maps_api-distance_matrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felipe Zavan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|