geokit 1.12.0 → 1.13.0

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: 45cd130b831e467dddf0f1ee196ad1a9c454709d
4
- data.tar.gz: abc3aae596ba4407b204936be4f5af7b7cc07ff6
3
+ metadata.gz: b1691dc33f515a09d9431feb7dd7e27c269a5758
4
+ data.tar.gz: 1fdefbe0c8ab0a0cd87f6fc77b1043b03d331f63
5
5
  SHA512:
6
- metadata.gz: f38b92f2a28271fe715528a4508af36f388b7303f54f1fd9423e939e36771912dadbbe84b88ff40a5a69f20596b9e14e12bd95bb1479cc450636c583796b6d0b
7
- data.tar.gz: 6713c52093f575b38576a426586447f4b921d5df80f53f277145d82de36e8e1ad7f126bfdadf328d5772f4cbb450988036701753f9e69796ecd392376cb58e57
6
+ metadata.gz: a541accf3c238702d5ac93ca705aa6a4bc848539bee8a7ae0a0c0b9b85317ae21dc890fed73e43dcb816bb8db08dfbcb1cdc32b9cb6a20f24bf0a19322dc9754
7
+ data.tar.gz: 97e24c8f53e37a1fb3762177ae0dd78daf4b089bb44417f01ac2400daee9851c4ba920d55814e36fbab36dbafec0fee532b40a8a2fb651196897a9a190575936
@@ -1,3 +1,9 @@
1
+ ## 1.13.0
2
+
3
+ **Existing Geocoder Changes**
4
+ * Ipstack: Fix success where city can be nil
5
+ * FCC: Update to new API
6
+
1
7
  ## 1.12.0
2
8
 
3
9
  **Existing Geocoder Changes**
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://data.fcc.gov/api/block/find?format=json&latitude=34.05&longitude=-118.25
5
+ uri: https://geo.fcc.gov/api/census/block/find?format=json&latitude=34.05&longitude=-118.25
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
12
  Accept:
13
- - '*/*'
13
+ - "*/*"
14
14
  User-Agent:
15
15
  - Ruby
16
16
  response:
@@ -18,22 +18,36 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Server:
22
- - Sun-Java-System-Web-Server/7.0
23
21
  Date:
24
- - Sun, 26 Jan 2014 05:57:32 GMT
22
+ - Wed, 06 Jun 2018 23:16:19 GMT
25
23
  Content-Type:
26
- - application/json
27
- Via:
28
- - 1.1 https-data
29
- Proxy-Agent:
30
- - Sun-Java-System-Web-Server/7.0
31
- Transfer-Encoding:
32
- - chunked
24
+ - application/json; charset=utf-8
25
+ Content-Length:
26
+ - '318'
27
+ Connection:
28
+ - keep-alive
29
+ Server:
30
+ - Apache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Etag:
34
+ - W/"1b9-TirplOWInFVSA/jLG2kuS95iDQU"
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ X-Dns-Prefetch-Control:
38
+ - 'off'
39
+ X-Download-Options:
40
+ - noopen
41
+ X-Frame-Options:
42
+ - SAMEORIGIN
43
+ X-Xss-Protection:
44
+ - 1; mode=block
33
45
  body:
34
46
  encoding: UTF-8
35
- string: '{"Block":{"FIPS":"060372073012003"},"County":{"FIPS":"06037","name":"Los
36
- Angeles"},"State":{"FIPS":"06","code":"CA","name":"California"},"status":"OK","executionTime":"11"}'
47
+ string: '{"messages":["FCC0001: The coordinate lies on the boundary of mulitple
48
+ blocks, the block contains the clicked location is selected. For a complete
49
+ list use showall=true to display ''intersection'' element in the Block"],"Block":{"FIPS":"060372073012003","bbox":[-118.250429,34.049521,-118.248017,34.051658]},"County":{"FIPS":"06037","name":"Los
50
+ Angeles"},"State":{"FIPS":"06","code":"CA","name":"California"},"status":"OK","executionTime":"0"}'
37
51
  http_version:
38
- recorded_at: Sun, 26 Jan 2014 05:57:38 GMT
39
- recorded_with: VCR 2.8.0
52
+ recorded_at: Wed, 06 Jun 2018 23:16:19 GMT
53
+ recorded_with: VCR 4.0.0
@@ -8,7 +8,7 @@ module Geokit
8
8
  # Template method which does the reverse-geocode lookup.
9
9
  def self.do_reverse_geocode(latlng)
10
10
  latlng = LatLng.normalize(latlng)
11
- url = "#{protocol}://data.fcc.gov/api/block/find?format=json&latitude=#{Geokit::Inflector.url_escape(latlng.lat.to_s)}&longitude=#{Geokit::Inflector.url_escape(latlng.lng.to_s)}"
11
+ url = "#{protocol}://geo.fcc.gov/api/census/block/find?format=json&latitude=#{Geokit::Inflector.url_escape(latlng.lat.to_s)}&longitude=#{Geokit::Inflector.url_escape(latlng.lng.to_s)}"
12
12
  process :json, url
13
13
  end
14
14
 
@@ -27,7 +27,7 @@ module Geokit
27
27
  loc.lng = result['longitude']
28
28
  loc.country_code = result['country_code']
29
29
  loc.country = result['country_name']
30
- loc.success = !loc.city.nil?
30
+ loc.success = !loc.country_code.nil?
31
31
 
32
32
  loc
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module Geokit
2
- VERSION = '1.12.0'
2
+ VERSION = '1.13.0'
3
3
  end
@@ -4,7 +4,7 @@ class FCCGeocoderTest < BaseGeocoderTest #:nodoc: all
4
4
  def setup
5
5
  super
6
6
  @la = Geokit::LatLng.new(34.05, -118.25)
7
- @base_url = 'https://data.fcc.gov/api/block/find'
7
+ @base_url = 'https://geo.fcc.gov/api/census/block/find'
8
8
  end
9
9
 
10
10
  def assert_url(expected_url)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-05-10 00:00:00.000000000 Z
14
+ date: 2018-06-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
341
  version: '0'
342
342
  requirements: []
343
343
  rubyforge_project:
344
- rubygems_version: 2.6.14.1
344
+ rubygems_version: 2.4.5.1
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: 'Geokit: encoding and distance calculation gem'