google-maps 3.0.0 → 3.0.4
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 +5 -5
- data/.rubocop.yml +4 -0
- data/README.md +2 -2
- data/google-maps.gemspec +2 -2
- data/lib/{google_maps.rb → google-maps.rb} +0 -0
- data/lib/google_maps/api.rb +1 -1
- data/lib/google_maps/configuration.rb +3 -3
- data/lib/google_maps/version.rb +1 -1
- data/spec/google_maps/api_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +12 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3e056b5245079cd1615768b06b6e20b8cefc686d790a064a80d443362fc10714
|
4
|
+
data.tar.gz: f8e5727daf97f14569eea6755830bfc7be5896bf138041b281d455078b1aaa6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120b95e15ef178b833abccf2f451114fb7d2e75052298f42973bf8c93e1d1221b655fb260198bfa498d981228acdf65a0cb1c19307fdb32e4dabf59094c292ff
|
7
|
+
data.tar.gz: fd3ebba90faab9d764f894829d5c2caa0b2e1f7669c95e38c43636d42ea49ac975a9954a8c35472db9a1391875706740c8829c88f81adc397b780d34a333f9d8
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -21,7 +21,7 @@ API key:
|
|
21
21
|
|
22
22
|
```ruby
|
23
23
|
Google::Maps.configure do |config|
|
24
|
-
config.authentication_mode = Google::Maps::
|
24
|
+
config.authentication_mode = Google::Maps::Configuration::API_KEY
|
25
25
|
config.api_key = 'xxxxxxxxxxx'
|
26
26
|
end
|
27
27
|
```
|
@@ -30,7 +30,7 @@ Digital signature:
|
|
30
30
|
|
31
31
|
```ruby
|
32
32
|
Google::Maps.configure do |config|
|
33
|
-
config.authentication_mode = Google::Maps::
|
33
|
+
config.authentication_mode = Google::Maps::Configuration::DIGITAL_SIGNATURE
|
34
34
|
config.client_id = 'xxxxxxxxxxx'
|
35
35
|
config.client_secret = 'xxxxxxxxxxx'
|
36
36
|
end
|
data/google-maps.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
$:.push File.expand_path('../lib', __FILE__)
|
4
4
|
require 'google_maps/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
@@ -32,6 +32,6 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_development_dependency('yard', '~> 0.9', '>= 0.9.11')
|
33
33
|
s.add_dependency('hashie', '~> 3.6', '>= 3.6.0')
|
34
34
|
s.add_dependency('httpclient', '~> 2.7', '>= 2.7.1')
|
35
|
-
s.add_dependency('json', '
|
35
|
+
s.add_dependency('json', '>= 1.7.5')
|
36
36
|
s.add_dependency('ruby-hmac', '~> 0.4.0')
|
37
37
|
end
|
File without changes
|
data/lib/google_maps/api.rb
CHANGED
@@ -54,12 +54,12 @@ module Google
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def validate_api_key
|
57
|
-
raise Google::Maps::InvalidConfigurationError, 'No API key provided' unless api_key
|
57
|
+
raise Google::Maps::InvalidConfigurationError, 'No API key provided' unless api_key
|
58
58
|
end
|
59
59
|
|
60
60
|
def validate_digital_signature
|
61
|
-
raise Google::Maps::InvalidConfigurationError, 'No client id provided' unless client_id
|
62
|
-
raise Google::Maps::InvalidConfigurationError, 'No client secret provided' unless client_secret
|
61
|
+
raise Google::Maps::InvalidConfigurationError, 'No client id provided' unless client_id
|
62
|
+
raise Google::Maps::InvalidConfigurationError, 'No client secret provided' unless client_secret
|
63
63
|
end
|
64
64
|
|
65
65
|
# Create a hash of options and their values
|
data/lib/google_maps/version.rb
CHANGED
@@ -73,7 +73,7 @@ describe Google::Maps::API do
|
|
73
73
|
it 'should sign the url parameters when a client id and premier key is set' do
|
74
74
|
stub_response(
|
75
75
|
'place_details.json',
|
76
|
-
'https://maps.googleapis.com/maps/api/geocode/json?address=New+York&
|
76
|
+
'https://maps.googleapis.com/maps/api/geocode/json?address=New+York&key=api_key123'
|
77
77
|
)
|
78
78
|
Google::Maps::API.query(:geocode_service, address: 'New York')
|
79
79
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-maps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel van Hoesel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -160,22 +160,22 @@ dependencies:
|
|
160
160
|
name: hashie
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '3.6'
|
166
163
|
- - ">="
|
167
164
|
- !ruby/object:Gem::Version
|
168
165
|
version: 3.6.0
|
166
|
+
- - "~>"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '3.6'
|
169
169
|
type: :runtime
|
170
170
|
prerelease: false
|
171
171
|
version_requirements: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
|
-
- - "~>"
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
version: '3.6'
|
176
173
|
- - ">="
|
177
174
|
- !ruby/object:Gem::Version
|
178
175
|
version: 3.6.0
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '3.6'
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: httpclient
|
181
181
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,22 +200,16 @@ dependencies:
|
|
200
200
|
name: json
|
201
201
|
requirement: !ruby/object:Gem::Requirement
|
202
202
|
requirements:
|
203
|
-
- - "~>"
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '2.1'
|
206
203
|
- - ">="
|
207
204
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
205
|
+
version: 1.7.5
|
209
206
|
type: :runtime
|
210
207
|
prerelease: false
|
211
208
|
version_requirements: !ruby/object:Gem::Requirement
|
212
209
|
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '2.1'
|
216
210
|
- - ">="
|
217
211
|
- !ruby/object:Gem::Version
|
218
|
-
version:
|
212
|
+
version: 1.7.5
|
219
213
|
- !ruby/object:Gem::Dependency
|
220
214
|
name: ruby-hmac
|
221
215
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,7 +239,7 @@ files:
|
|
245
239
|
- README.md
|
246
240
|
- Rakefile
|
247
241
|
- google-maps.gemspec
|
248
|
-
- lib/
|
242
|
+
- lib/google-maps.rb
|
249
243
|
- lib/google_maps/api.rb
|
250
244
|
- lib/google_maps/configuration.rb
|
251
245
|
- lib/google_maps/location.rb
|
@@ -291,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
285
|
- !ruby/object:Gem::Version
|
292
286
|
version: '0'
|
293
287
|
requirements: []
|
294
|
-
|
295
|
-
rubygems_version: 2.5.2
|
288
|
+
rubygems_version: 3.0.0
|
296
289
|
signing_key:
|
297
290
|
specification_version: 4
|
298
291
|
summary: Ruby wrapper for the Google Maps API
|