graticule 2.6.0 → 2.7.0

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
2
  SHA1:
3
- metadata.gz: 91485c3b1e3be348db8ebfaafa69e7ce5b47f613
4
- data.tar.gz: 60d765a0b7303994a982035ff0e0370ac36d02c6
3
+ metadata.gz: 65057608d579147a37338bae8b605a84056b5c2b
4
+ data.tar.gz: 6e5e436540bb10726f7c0f543d59d38e02bc804c
5
5
  SHA512:
6
- metadata.gz: 00eb32e2692ceae1a75b517c91b7ee73c0f7c360c3c95ab217af12cdde92a3c3532f52f1df28d658c7c9d260fdf3e497f1e860797d11abdbbb1fb1ae6435ae8d
7
- data.tar.gz: f521c98c1472fcfd8331c22c9d593478b8136385047e4a7c3bc4dd4d690d690258ab4b47ad926a7f44eb5691f5d1b7c0c14d143dbac26fa3046442c9cbb397fc
6
+ metadata.gz: 79e097684736d54958dbf7264ff3632640513f477624e6fd261223c1ce93464aab32513e1f4fcb43c333e51463b6aded4a33933593f193cd57141c580c2f6672
7
+ data.tar.gz: 29e3fe53bf1b7297685c591fda096b1ce93c753253338d424785ea43dcfa2750eb67918b0da0d517415f5887b433841a47e7dec96aac6926d61fa37927c59969
@@ -1,3 +1,6 @@
1
+ 2.7.0 (2018-05-31)
2
+ * Update Google to use https and include API key
3
+
1
4
  2.6.0 (2018-05-31)
2
5
  * Update Mapbox to use the current v5 API
3
6
 
@@ -17,12 +17,12 @@ module Graticule #:nodoc:
17
17
  def initialize(key=nil, client_id=nil)
18
18
  @key = key
19
19
  @client_id = client_id
20
- @url = URI.parse 'http://maps.googleapis.com/maps/api/geocode/json'
20
+ @url = URI.parse 'https://maps.googleapis.com/maps/api/geocode/json'
21
21
  end
22
22
 
23
23
  # Locates +address+ returning a Location
24
24
  def locate(address)
25
- get :address => address.is_a?(String) ? address : location_from_params(address).to_s
25
+ get :key => @key, :address => address.is_a?(String) ? address : location_from_params(address).to_s
26
26
  end
27
27
 
28
28
  private
@@ -45,7 +45,7 @@ module Graticule #:nodoc:
45
45
  when "route"
46
46
  @route = component["short_name"]
47
47
  when "locality", "sublocality"
48
- @locality = component["long_name"]
48
+ @locality = component["long_name"]
49
49
  when "administrative_area_level_1"
50
50
  @region = component["short_name"]
51
51
  when "country"
@@ -139,7 +139,7 @@ module Graticule #:nodoc:
139
139
  # the url as required by v3 of the library:
140
140
  #
141
141
  # https://developers.google.com/maps/documentation/business/webservices#digital_signatures
142
- #
142
+ #
143
143
  def make_url(params) #:nodoc:
144
144
  if @key && @client_id
145
145
  url = super params.merge(:sensor => false, :client => @client_id)
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Graticule
3
- VERSION = '2.6.0' unless defined?(::Graticule::VERSION)
3
+ VERSION = '2.7.0' unless defined?(::Graticule::VERSION)
4
4
  end
@@ -5,14 +5,14 @@ class GoogleTest < Test::Unit::TestCase
5
5
  def test_url_is_signed_for_business_accounts
6
6
  geocoder = Graticule.service(:google).new("e7-fake-account-R911GuLecpVqA=", 'gme-example')
7
7
  url = geocoder.send :make_url, :address => 'New York'
8
- expected = "http://maps.googleapis.com/maps/api/geocode/json?address=New%20York&client=gme-example&sensor=false&signature=EJNTEh9SqstO1FLcbFsQ0aJrWHA="
8
+ expected = "https://maps.googleapis.com/maps/api/geocode/json?address=New%20York&client=gme-example&sensor=false&signature=EJNTEh9SqstO1FLcbFsQ0aJrWHA="
9
9
  assert_equal expected, url.to_s
10
10
  end
11
11
 
12
12
  def test_url_is_not_signed_for_normal_accounts
13
13
  geocoder = Graticule.service(:google).new()
14
14
  url = geocoder.send :make_url, :address => 'New York'
15
- expected = "http://maps.googleapis.com/maps/api/geocode/json?address=New%20York&sensor=false"
15
+ expected = "https://maps.googleapis.com/maps/api/geocode/json?address=New%20York&sensor=false"
16
16
  assert_equal expected, url.to_s
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graticule
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-05-31 00:00:00.000000000 Z
14
+ date: 2018-10-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project:
193
- rubygems_version: 2.6.3
193
+ rubygems_version: 2.6.13
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: API for using all the popular geocoding services