google-maps 3.0.0 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8c9ea7de658231206acfde4f02867362e4b43953
4
- data.tar.gz: e09e76851c8d3d2f963ade490ebcbff26b44703e
2
+ SHA256:
3
+ metadata.gz: 3e056b5245079cd1615768b06b6e20b8cefc686d790a064a80d443362fc10714
4
+ data.tar.gz: f8e5727daf97f14569eea6755830bfc7be5896bf138041b281d455078b1aaa6d
5
5
  SHA512:
6
- metadata.gz: 603662cd8f896c0145d0d390feac907b909be471848cfb72674717fad7d0d39f22bc57005cb63a19106e14ec3c1f9bf29824c54381f6a269a119179d9f4231e6
7
- data.tar.gz: 8fdf84b4466a49a63ce26ef28f7a77ae79ad291843942534337d869269820ee6f7d29c8e367bf0bcd6f9a7d4d42604c72a3db2d784e32c6ae0080f108bfcf189
6
+ metadata.gz: 120b95e15ef178b833abccf2f451114fb7d2e75052298f42973bf8c93e1d1221b655fb260198bfa498d981228acdf65a0cb1c19307fdb32e4dabf59094c292ff
7
+ data.tar.gz: fd3ebba90faab9d764f894829d5c2caa0b2e1f7669c95e38c43636d42ea49ac975a9954a8c35472db9a1391875706740c8829c88f81adc397b780d34a333f9d8
@@ -16,5 +16,9 @@ Metrics/MethodLength:
16
16
  Metrics/AbcSize:
17
17
  Max: 20
18
18
 
19
+ Naming/FileName:
20
+ Exclude:
21
+ - "lib/google-maps.rb"
22
+
19
23
  Style/Documentation:
20
24
  Enabled: false
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::Authentication::API_KEY
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::Authentication::DIGITAL_SIGNATURE
33
+ config.authentication_mode = Google::Maps::Configuration::DIGITAL_SIGNATURE
34
34
  config.client_id = 'xxxxxxxxxxx'
35
35
  config.client_secret = 'xxxxxxxxxxx'
36
36
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- $LOAD_PATH.push File.expand_path('lib', __dir__)
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', '~> 2.1', '>= 2.1.0')
35
+ s.add_dependency('json', '>= 1.7.5')
36
36
  s.add_dependency('ruby-hmac', '~> 0.4.0')
37
37
  end
File without changes
@@ -73,7 +73,7 @@ module Google
73
73
  end
74
74
 
75
75
  def url_with_api_key(service, args = {})
76
- base_url(service, args.merge(api_key: Google::Maps.api_key))
76
+ base_url(service, args.merge(key: Google::Maps.api_key))
77
77
  end
78
78
 
79
79
  def url_with_digital_signature(service, args = {})
@@ -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.present?
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.present?
62
- raise Google::Maps::InvalidConfigurationError, 'No client secret provided' unless client_secret.present?
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Google
4
4
  module Maps
5
- VERSION = '3.0.0'.freeze
5
+ VERSION = '3.0.4'.freeze
6
6
  end
7
7
  end
@@ -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&api_key=api_key123'
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
@@ -38,4 +38,4 @@ def stub_response(fixture, url = nil)
38
38
  expectation.returns(File.open(fixture_path, 'rb').read)
39
39
  end
40
40
 
41
- load File.expand_path('../lib/google_maps.rb', __dir__)
41
+ load File.expand_path('../lib/google-maps.rb', __dir__)
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.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: 2018-12-21 00:00:00.000000000 Z
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: 2.1.0
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: 2.1.0
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/google_maps.rb
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
- rubyforge_project: google-maps
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