googlemaps-services 1.4.7 → 1.4.8
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/googlemaps/services/client.rb +5 -3
- data/lib/googlemaps/services/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab65f2d525a0036cdc6f0688361a1dc4a1a79ef4
|
|
4
|
+
data.tar.gz: a00bb9f146fe4f01c96fb2fc36dd5479c56f6628
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e0ca5e6e0945688767ccbbf87f04e502614603625cdb9fbfeac29d88971e06745c32504f7855c7c1b3a2c22b8b9284023cd7c965b038927805e9122e5d4ea68
|
|
7
|
+
data.tar.gz: c810e59699689468f2fe40f1b09cb1d602a0af219de44456255cbaad9e37c10c8de632cdc349b7d64833c7575440cb8af0c8fe251328202f534b16f7e97b1f8f
|
|
@@ -99,7 +99,7 @@ module GoogleMaps
|
|
|
99
99
|
# @param [Hash] post_json The request body which will be formatted as JSON.
|
|
100
100
|
#
|
|
101
101
|
# @return [Hash, Array, nil] response body (either in JSON or XML) or nil.
|
|
102
|
-
def request(url:, params:, first_request_time: nil, retry_counter:
|
|
102
|
+
def request(url:, params:, first_request_time: nil, retry_counter: 0, base_url: Constants::DEFAULT_BASE_URL,
|
|
103
103
|
accepts_clientid: true, extract_body: nil, request_headers: nil, post_json: nil)
|
|
104
104
|
first_request_time = Util.current_time unless first_request_time
|
|
105
105
|
|
|
@@ -135,7 +135,8 @@ module GoogleMaps
|
|
|
135
135
|
|
|
136
136
|
if Constants::RETRIABLE_STATUSES.include? resp.code.to_i
|
|
137
137
|
# Retry request
|
|
138
|
-
self.request(url, params, first_request_time, retry_counter + 1, base_url
|
|
138
|
+
self.request(url: url, params: params, first_request_time: first_request_time, retry_counter: retry_counter + 1, base_url: base_url,
|
|
139
|
+
accepts_clientid: accepts_clientid, extract_body: extract_body, request_headers: request_headers, post_json: post_json)
|
|
139
140
|
end
|
|
140
141
|
|
|
141
142
|
# Check if the time of the nth previous query (where n is queries_per_second)
|
|
@@ -167,7 +168,8 @@ module GoogleMaps
|
|
|
167
168
|
return result
|
|
168
169
|
rescue RetriableRequest
|
|
169
170
|
# Retry request
|
|
170
|
-
|
|
171
|
+
self.request(url: url, params: params, first_request_time: first_request_time, retry_counter: retry_counter + 1, base_url: base_url,
|
|
172
|
+
accepts_clientid: accepts_clientid, extract_body: extract_body, request_headers: request_headers, post_json: post_json)
|
|
171
173
|
end
|
|
172
174
|
end
|
|
173
175
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: googlemaps-services
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Faissal Elamraoui
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-03-
|
|
11
|
+
date: 2018-03-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|