geokit 1.10.0 → 1.11.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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.hound.yml +2 -0
  4. data/.rubocop.yml +358 -0
  5. data/.travis.yml +4 -4
  6. data/CHANGELOG.md +16 -0
  7. data/Gemfile +3 -3
  8. data/README.markdown +19 -4
  9. data/Rakefile +11 -16
  10. data/fixtures/keys.yml +9 -0
  11. data/fixtures/vcr_cassettes/google_postal_town.yml +117 -0
  12. data/fixtures/vcr_cassettes/mapbox_forward_geocode.yml +30 -30
  13. data/fixtures/vcr_cassettes/mapbox_forward_geocode_city_only.yml +25 -25
  14. data/fixtures/vcr_cassettes/mapbox_forward_geocode_state_only.yml +71 -0
  15. data/fixtures/vcr_cassettes/mapbox_reverse_geocode.yml +25 -25
  16. data/fixtures/vcr_cassettes/test_component_filtering_off.yml +390 -0
  17. data/fixtures/vcr_cassettes/test_component_filtering_on.yml +164 -0
  18. data/fixtures/vcr_cassettes/test_component_filtering_on_without_filter.yml +404 -0
  19. data/geokit.gemspec +24 -23
  20. data/lib/geokit.rb +7 -7
  21. data/lib/geokit/core_ext.rb +1 -1
  22. data/lib/geokit/geo_loc.rb +25 -19
  23. data/lib/geokit/geocoders.rb +21 -30
  24. data/lib/geokit/geocoders/bing.rb +5 -4
  25. data/lib/geokit/geocoders/ca_geocoder.rb +10 -11
  26. data/lib/geokit/geocoders/fcc.rb +9 -9
  27. data/lib/geokit/geocoders/free_geo_ip.rb +8 -8
  28. data/lib/geokit/geocoders/geo_plugin.rb +7 -7
  29. data/lib/geokit/geocoders/geobytes.rb +10 -10
  30. data/lib/geokit/geocoders/geocodio.rb +14 -14
  31. data/lib/geokit/geocoders/geonames.rb +12 -12
  32. data/lib/geokit/geocoders/google.rb +89 -61
  33. data/lib/geokit/geocoders/ip.rb +9 -14
  34. data/lib/geokit/geocoders/mapbox.rb +30 -30
  35. data/lib/geokit/geocoders/mapquest.rb +12 -12
  36. data/lib/geokit/geocoders/maxmind.rb +1 -1
  37. data/lib/geokit/geocoders/opencage.rb +19 -19
  38. data/lib/geokit/geocoders/openstreetmap.rb +21 -19
  39. data/lib/geokit/geocoders/ripe.rb +7 -7
  40. data/lib/geokit/geocoders/us_geocoder.rb +5 -5
  41. data/lib/geokit/geocoders/yahoo.rb +46 -46
  42. data/lib/geokit/geocoders/yandex.rb +18 -17
  43. data/lib/geokit/inflectors.rb +5 -5
  44. data/lib/geokit/lat_lng.rb +5 -4
  45. data/lib/geokit/multi_geocoder.rb +4 -2
  46. data/lib/geokit/net_adapter/net_http.rb +3 -2
  47. data/lib/geokit/net_adapter/typhoeus.rb +2 -1
  48. data/lib/geokit/version.rb +1 -1
  49. data/test/coverage_loader.rb +25 -0
  50. data/test/helper.rb +18 -87
  51. data/test/test_base_geocoder.rb +44 -11
  52. data/test/test_bing_geocoder.rb +40 -48
  53. data/test/test_bounds.rb +1 -1
  54. data/test/test_ca_geocoder.rb +15 -15
  55. data/test/test_fcc_geocoder.rb +8 -9
  56. data/test/test_free_geo_ip_geocoder.rb +8 -10
  57. data/test/test_geo_plugin_geocoder.rb +21 -22
  58. data/test/test_geobytes_geocoder.rb +9 -11
  59. data/test/test_geocodio_geocoder.rb +12 -14
  60. data/test/test_geoloc.rb +48 -49
  61. data/test/test_geonames_geocoder.rb +19 -23
  62. data/test/test_google_geocoder.rb +197 -189
  63. data/test/test_inflector.rb +7 -7
  64. data/test/test_ipgeocoder.rb +32 -31
  65. data/test/test_latlng.rb +28 -28
  66. data/test/test_map_quest.rb +23 -27
  67. data/test/test_mapbox_geocoder.rb +38 -28
  68. data/test/test_mappable.rb +2 -2
  69. data/test/test_maxmind_geocoder.rb +16 -16
  70. data/test/test_multi_geocoder.rb +5 -5
  71. data/test/test_multi_ip_geocoder.rb +3 -3
  72. data/test/test_net_adapter.rb +4 -4
  73. data/test/test_opencage_geocoder.rb +58 -67
  74. data/test/test_openstreetmap_geocoder.rb +67 -65
  75. data/test/test_polygon.rb +4 -22
  76. data/test/test_ripe_geocoder.rb +21 -26
  77. data/test/test_us_geocoder.rb +21 -21
  78. data/test/test_useragent.rb +46 -0
  79. data/test/test_yahoo_geocoder.rb +35 -47
  80. data/test/test_yandex_geocoder.rb +29 -27
  81. data/test/vcr_loader.rb +18 -0
  82. metadata +20 -6
data/Rakefile CHANGED
@@ -1,30 +1,25 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
3
 
4
- task :default do
4
+ task :console do
5
+ sh "irb -rubygems -I lib -r geokit"
5
6
  end
6
7
 
7
8
  Rake::TestTask.new do |t|
8
- t.libs << "test"
9
- t.test_files = FileList["test/test*.rb"]
9
+ t.libs << 'test'
10
+ t.test_files = FileList['test/test*.rb']
10
11
  t.verbose = true
11
12
  end
12
13
 
13
- desc "Generate SimpleCov test coverage and open in your browser"
14
- task :coverage do
15
- ENV["COVERAGE"] = "true"
16
- Rake::Task["test"].invoke
17
- end
18
-
19
- desc "Downloads GeoLiteCity.dat from maxmind.com"
14
+ desc 'Downloads GeoLiteCity.dat from maxmind.com'
20
15
  task :download_geolitecity do
21
16
  total_size = nil
22
- url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
17
+ url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
23
18
  progress_cb = lambda { |size| print("Downloaded #{size} of #{total_size} bytes\r") if total_size }
24
19
  length_cb = lambda { |content_length| total_size = content_length }
25
- require "open-uri"
26
- File.open("/tmp/GeoLiteCity.dat.gz", "wb") do |f|
27
- open(url, "rb", progress_proc: progress_cb, content_length_proc: length_cb) do |downloaded_file|
20
+ require 'open-uri'
21
+ File.open('/tmp/GeoLiteCity.dat.gz', 'wb') do |f|
22
+ open(url, 'rb', progress_proc: progress_cb, content_length_proc: length_cb) do |downloaded_file|
28
23
  f.write(downloaded_file.read)
29
24
  end
30
25
  end
@@ -0,0 +1,9 @@
1
+ geocodio:
2
+ key: '723d41115152d224fd74727df34727c444537f7'
3
+ mapbox:
4
+ key: 'pk.eyJ1IjoiZ2Vva2l0IiwiYSI6ImNpbm1md3dvdTB6anB0dG0zbW9zd3hlODQifQ.dyskNcYK8DvxyjCO3i7afA'
5
+ map_quest:
6
+ key: 'Fmjtd%7Cluur2d0125%2C2s%3Do5-9a8lhz'
7
+ yahoo:
8
+ key: 'dj0yJmk9cXByQVN2WHZmTVhDJmQ9WVdrOVZscG1WVWhOTldrbWNHbzlNakF6TlRJME16UTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD0zNg--'
9
+ secret: 'SECRET'
@@ -0,0 +1,117 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://maps.google.com/maps/api/geocode/json?address=London%20SE3%200JB,%20UK&sensor=false
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=UTF-8
23
+ Date:
24
+ - Mon, 12 Dec 2016 12:13:46 GMT
25
+ Expires:
26
+ - Tue, 13 Dec 2016 12:13:46 GMT
27
+ Cache-Control:
28
+ - public, max-age=86400
29
+ Vary:
30
+ - Accept-Language
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Server:
34
+ - mafe
35
+ Content-Length:
36
+ - '527'
37
+ X-Xss-Protection:
38
+ - 1; mode=block
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ Alt-Svc:
42
+ - quic=":443"; ma=2592000; v="35,34"
43
+ body:
44
+ encoding: UTF-8
45
+ string: |
46
+ {
47
+ "results" : [
48
+ {
49
+ "address_components" : [
50
+ {
51
+ "long_name" : "SE3 0JB",
52
+ "short_name" : "SE3 0JB",
53
+ "types" : [ "postal_code" ]
54
+ },
55
+ {
56
+ "long_name" : "Kidbrooke Way",
57
+ "short_name" : "Kidbrooke Way",
58
+ "types" : [ "route" ]
59
+ },
60
+ {
61
+ "long_name" : "London",
62
+ "short_name" : "London",
63
+ "types" : [ "postal_town" ]
64
+ },
65
+ {
66
+ "long_name" : "Greater London",
67
+ "short_name" : "Greater London",
68
+ "types" : [ "administrative_area_level_2", "political" ]
69
+ },
70
+ {
71
+ "long_name" : "England",
72
+ "short_name" : "England",
73
+ "types" : [ "administrative_area_level_1", "political" ]
74
+ },
75
+ {
76
+ "long_name" : "United Kingdom",
77
+ "short_name" : "GB",
78
+ "types" : [ "country", "political" ]
79
+ }
80
+ ],
81
+ "formatted_address" : "Kidbrooke Way, London SE3 0JB, UK",
82
+ "geometry" : {
83
+ "bounds" : {
84
+ "northeast" : {
85
+ "lat" : 51.46658900000001,
86
+ "lng" : 0.03074499999999999
87
+ },
88
+ "southwest" : {
89
+ "lat" : 51.4652051,
90
+ "lng" : 0.0282072
91
+ }
92
+ },
93
+ "location" : {
94
+ "lat" : 51.465923,
95
+ "lng" : 0.0290915
96
+ },
97
+ "location_type" : "APPROXIMATE",
98
+ "viewport" : {
99
+ "northeast" : {
100
+ "lat" : 51.4672460302915,
101
+ "lng" : 0.03082508029150203
102
+ },
103
+ "southwest" : {
104
+ "lat" : 51.4645480697085,
105
+ "lng" : 0.02812711970849796
106
+ }
107
+ }
108
+ },
109
+ "place_id" : "ChIJ8yUGzbap2EcRgQoytQpqCos",
110
+ "types" : [ "postal_code" ]
111
+ }
112
+ ],
113
+ "status" : "OK"
114
+ }
115
+ http_version:
116
+ recorded_at: Mon, 12 Dec 2016 12:13:46 GMT
117
+ recorded_with: VCR 3.0.1
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/1714+14th+Street+NW,+Washington,+DC.json?access_token=
5
+ uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/1714+14th+Street+NW,+Washington,+DC.json?access_token=pk.eyJ1IjoiZ2Vva2l0IiwiYSI6ImNpbm1md3dvdTB6anB0dG0zbW9zd3hlODQifQ.dyskNcYK8DvxyjCO3i7afA
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -20,8 +20,8 @@ http_interactions:
20
20
  headers:
21
21
  Content-Type:
22
22
  - application/vnd.geo+json; charset=utf-8
23
- Content-Length:
24
- - '3143'
23
+ Transfer-Encoding:
24
+ - chunked
25
25
  Connection:
26
26
  - keep-alive
27
27
  Access-Control-Allow-Origin:
@@ -29,50 +29,50 @@ http_interactions:
29
29
  Access-Control-Expose-Headers:
30
30
  - x-rate-limit-interval,x-rate-limit-limit,x-rate-limit-remaining,x-rate-limit-reset
31
31
  Cache-Control:
32
- - max-age=3600
32
+ - max-age=604800
33
33
  Date:
34
- - Wed, 05 Aug 2015 17:05:43 GMT
34
+ - Sat, 30 Apr 2016 01:04:44 GMT
35
35
  Etag:
36
- - '"990fe72d1269b3087771d373ba1b92ad"'
36
+ - '"5f74c0aa7657d0f9681e0179ab3ebb53"'
37
37
  Last-Modified:
38
- - Wed, 05 Aug 2015 17:05:43 GMT
38
+ - Fri, 29 Apr 2016 17:17:06 GMT
39
39
  X-Powered-By:
40
40
  - Express
41
41
  X-Rate-Limit-Interval:
42
42
  - '60'
43
43
  X-Rate-Limit-Limit:
44
44
  - '600'
45
- X-Rate-Limit-Remaining:
46
- - '599'
47
45
  X-Rate-Limit-Reset:
48
- - '1438794402'
46
+ - '1461978343'
49
47
  Age:
50
- - '104'
48
+ - '2543'
49
+ Vary:
50
+ - Accept-Encoding
51
51
  X-Cache:
52
52
  - Hit from cloudfront
53
53
  Via:
54
- - 1.1 7e4ecdff0078259d2c1827ec3336b278.cloudfront.net (CloudFront)
54
+ - 1.1 3a0c9fc3d9b0e35bff1924a1b54094ee.cloudfront.net (CloudFront)
55
55
  X-Amz-Cf-Id:
56
- - LiKAQL5YclcLAX7ysTz4FpZqW2_Ns6PVc_cv6jvqO9XdrZODBmkyUQ==
56
+ - qXR-rfh90jddSr7tjjTtcFR875vkZLtg6r8bv3W9sJjJZmWFZhNnTA==
57
57
  body:
58
58
  encoding: UTF-8
59
59
  string: '{"type":"FeatureCollection","query":["1714","14th","street","nw","washington","dc"],"features":[{"id":"address.75018674165319","type":"Feature","text":"14th
60
- St NW","place_name":"1714 14th St NW, Washington, 20009, District of Columbia,
61
- United States","relevance":0.9989999999999999,"center":[-77.031952,38.913184],"geometry":{"type":"Point","coordinates":[-77.031952,38.913184],"interpolated":true},"bbox":[-77.03261199999999,38.91112899999999,-77.03183899999996,38.92880499999998],"address":"1714","properties":{},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.1308149819","text":"20009"},{"id":"province.1190806886","text":"District
62
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"address.9831827761295","type":"Feature","text":"14th
63
- St NW","place_name":"14th St NW, Washington, 20005, District of Columbia,
64
- United States","relevance":0.7323333333333333,"center":[-77.031949,38.904122],"geometry":{"type":"Point","coordinates":[-77.031949,38.904122]},"bbox":[-77.03196299999998,38.89734899999999,-77.03194899999997,38.91112899999999],"properties":{},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.4009156820","text":"20005"},{"id":"province.1190806886","text":"District
65
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"address.206317692383283","type":"Feature","text":"E
66
- St NW","place_name":"E St NW, Washington, 20001, District of Columbia, United
67
- States","relevance":0.7323333333333333,"center":[-77.017227,38.896133],"geometry":{"type":"Point","coordinates":[-77.017227,38.896133]},"bbox":[-77.03196199999996,38.896104999999984,-77.00905899999995,38.89613699999999],"properties":{},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.2700102601","text":"20001"},{"id":"province.1190806886","text":"District
68
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"address.12847447657866","type":"Feature","text":"14th
69
- St NW","place_name":"14th St NW, Washington, 20004, District of Columbia,
70
- United States","relevance":0.7323333333333333,"center":[-77.031942,38.893377],"geometry":{"type":"Point","coordinates":[-77.031942,38.893377]},"bbox":[-77.03196699999998,38.89041599999999,-77.03194199999999,38.89734899999999],"properties":{},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.858369517","text":"20004"},{"id":"province.1190806886","text":"District
71
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"address.68742434139344","type":"Feature","text":"S
72
- St NW","place_name":"S St NW, Washington, 20001, District of Columbia, United
73
- States","relevance":0.7323333333333333,"center":[-77.018178,38.914085],"geometry":{"type":"Point","coordinates":[-77.018178,38.914085]},"bbox":[-77.02703499999998,38.913971999999994,-77.00901299999997,38.91420799999999],"properties":{},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.2700102601","text":"20001"},{"id":"province.1190806886","text":"District
74
- of Columbia"},{"id":"country.4150104525","text":"United States"}]}],"attribution":"<a
60
+ St NW","place_name":"1714 14th St NW, Washington, District of Columbia 20009,
61
+ United States","relevance":0.999,"properties":{},"center":[-77.031952,38.913184],"geometry":{"type":"Point","coordinates":[-77.031952,38.913184],"interpolated":true},"address":"1714","context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.7725140869021840","text":"20009"},{"id":"province.6884744206035790","text":"District
62
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"address.9831827761295","type":"Feature","text":"14th
63
+ St NW","place_name":"14th St NW, Washington, District of Columbia 20005, United
64
+ States","relevance":0.699,"properties":{},"center":[-77.031949,38.904122],"geometry":{"type":"Point","coordinates":[-77.031949,38.904122]},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.6357608463978320","text":"20005"},{"id":"province.6884744206035790","text":"District
65
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"address.12847447657866","type":"Feature","text":"14th
66
+ St NW","place_name":"14th St NW, Washington, District of Columbia 20004, United
67
+ States","relevance":0.699,"properties":{},"center":[-77.031942,38.893377],"geometry":{"type":"Point","coordinates":[-77.031942,38.893377]},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.5938390858952870","text":"20004"},{"id":"province.6884744206035790","text":"District
68
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"address.46125876154105","type":"Feature","text":"14th
69
+ St NW","place_name":"14th St NW, Washington, District of Columbia 20011, United
70
+ States","relevance":0.699,"properties":{},"center":[-77.033424,38.952315],"geometry":{"type":"Point","coordinates":[-77.033424,38.952315]},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.14002903001913600","text":"20011"},{"id":"province.6884744206035790","text":"District
71
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"address.21060397140948","type":"Feature","text":"14th
72
+ St SE","place_name":"1714 14th St SE, Washington, District of Columbia 20020,
73
+ United States","relevance":0.699,"properties":{},"center":[-76.985123,38.868953],"geometry":{"type":"Point","coordinates":[-76.985123,38.868953],"interpolated":true},"address":"1714","context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.4598518735000000","text":"20020"},{"id":"province.6884744206035790","text":"District
74
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]}],"attribution":"<a
75
75
  href=''https://www.mapbox.com/about/maps/'' target=''_blank''>&copy; Mapbox</a>"}'
76
76
  http_version:
77
- recorded_at: Wed, 05 Aug 2015 17:07:27 GMT
78
- recorded_with: VCR 2.9.3
77
+ recorded_at: Sat, 30 Apr 2016 01:47:07 GMT
78
+ recorded_with: VCR 3.0.1
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/Washington,+DC.json?access_token=
5
+ uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/Washington,+DC.json?access_token=pk.eyJ1IjoiZ2Vva2l0IiwiYSI6ImNpbm1md3dvdTB6anB0dG0zbW9zd3hlODQifQ.dyskNcYK8DvxyjCO3i7afA
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -20,8 +20,8 @@ http_interactions:
20
20
  headers:
21
21
  Content-Type:
22
22
  - application/vnd.geo+json; charset=utf-8
23
- Content-Length:
24
- - '2416'
23
+ Transfer-Encoding:
24
+ - chunked
25
25
  Connection:
26
26
  - keep-alive
27
27
  Access-Control-Allow-Origin:
@@ -29,45 +29,45 @@ http_interactions:
29
29
  Access-Control-Expose-Headers:
30
30
  - x-rate-limit-interval,x-rate-limit-limit,x-rate-limit-remaining,x-rate-limit-reset
31
31
  Cache-Control:
32
- - max-age=3600
32
+ - max-age=604800
33
33
  Date:
34
- - Wed, 05 Aug 2015 16:44:17 GMT
34
+ - Sat, 30 Apr 2016 01:04:42 GMT
35
35
  Etag:
36
- - '"68acbd95bd4b36ee26faa707a34f1631"'
36
+ - '"306cdd4db6ec8ddb50a1cdf4160311cb"'
37
37
  Last-Modified:
38
- - Wed, 05 Aug 2015 16:44:17 GMT
38
+ - Fri, 29 Apr 2016 17:17:06 GMT
39
39
  X-Powered-By:
40
40
  - Express
41
41
  X-Rate-Limit-Interval:
42
42
  - '60'
43
43
  X-Rate-Limit-Limit:
44
44
  - '600'
45
- X-Rate-Limit-Remaining:
46
- - '599'
47
45
  X-Rate-Limit-Reset:
48
- - '1438793117'
46
+ - '1461978342'
49
47
  Age:
50
- - '1390'
48
+ - '2543'
49
+ Vary:
50
+ - Accept-Encoding
51
51
  X-Cache:
52
52
  - Hit from cloudfront
53
53
  Via:
54
- - 1.1 b7fb0f8de9924b1b44ffa1e559f19091.cloudfront.net (CloudFront)
54
+ - 1.1 817544e5c34b42096d08b4b82dccd904.cloudfront.net (CloudFront)
55
55
  X-Amz-Cf-Id:
56
- - JE9owG-k8ZOi37ZOQbXs6jzdELdtEQikt6gtTdlW-iPnKHgaHzCH6Q==
56
+ - JbJjZpAwjjNP9FrGEgL6-MSnocMhNb3wHcW5QfvsHGZLHJgpWJipnQ==
57
57
  body:
58
58
  encoding: UTF-8
59
59
  string: '{"type":"FeatureCollection","query":["washington","dc"],"features":[{"id":"city.20001","type":"Feature","text":"Washington","place_name":"Washington,
60
- 20004, District of Columbia, United States","relevance":0.999,"center":[-77.0364,38.8951],"geometry":{"type":"Point","coordinates":[-77.0364,38.8951]},"bbox":[-77.1197590084041,38.80311299006593,-76.90939299,38.99554800807594],"properties":{},"context":[{"id":"postcode.858369517","text":"20004"},{"id":"province.1190806886","text":"District
61
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"province.1190806886","type":"Feature","text":"District
62
- of Columbia","place_name":"District of Columbia, United States","relevance":0.49,"center":[-77.009289,38.909152],"geometry":{"type":"Point","coordinates":[-77.009289,38.909152]},"bbox":[-77.11975899999999,38.79164499999999,-76.90939299999997,38.99554799999999],"properties":{},"context":[{"id":"country.4150104525","text":"United
63
- States"}]},{"id":"city.39246","type":"Feature","text":"Washington","place_name":"Washington,
64
- Sunderland, United Kingdom","relevance":0.49,"center":[-1.519344,54.904404],"geometry":{"type":"Point","coordinates":[-1.519344,54.904404]},"bbox":[-1.572074,54.873852,-1.471309,54.935104],"properties":{},"context":[{"id":"province.972624862","text":"Sunderland"},{"id":"country.2794958072","text":"United
65
- Kingdom"}]},{"id":"city.39247","type":"Feature","text":"Washington","place_name":"Washington,
66
- West Sussex, United Kingdom","relevance":0.49,"center":[-0.393505,50.888378],"geometry":{"type":"Point","coordinates":[-0.393505,50.888378]},"bbox":[-0.42587,50.86474599999999,-0.3537509999999999,50.916752],"properties":{},"context":[{"id":"province.2373165042","text":"West
67
- Sussex"},{"id":"country.2794958072","text":"United Kingdom"}]},{"id":"address.56461051138823","type":"Feature","text":"Washington","place_name":"Washington,
68
- Irvine, 92606, California, United States","relevance":0.39,"center":[-117.792586,33.71292],"geometry":{"type":"Point","coordinates":[-117.792586,33.71292]},"bbox":[-117.79281099999997,33.711665999999994,-117.791035,33.714770999999985],"properties":{},"context":[{"id":"city.92602","text":"Irvine"},{"id":"postcode.1397213125","text":"92606"},{"id":"province.1112151813","text":"California"},{"id":"country.4150104525","text":"United
69
- States"}]}],"attribution":"<a href=''https://www.mapbox.com/about/maps/''
60
+ 20004, District of Columbia, United States","relevance":0.999,"properties":{},"bbox":[-77.1197590084041,38.8031129900659,-76.90939299,38.9955480080759],"center":[-77.0366,38.895],"geometry":{"type":"Point","coordinates":[-77.0366,38.895]},"context":[{"id":"postcode.5938390858952870","text":"20004"},{"id":"province.6884744206035790","text":"District
61
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"province.6884744206035790","type":"Feature","text":"District
62
+ of Columbia","place_name":"District of Columbia, United States","relevance":0.49,"properties":{},"bbox":[-77.2081379659453,38.7177026348658,-76.909393,38.995548],"center":[-76.990661,38.89657],"geometry":{"type":"Point","coordinates":[-76.990661,38.89657]},"context":[{"id":"country.12862386938302570","text":"United
63
+ States","short_code":"us"}]},{"id":"city.39246","type":"Feature","text":"Washington","place_name":"Washington,
64
+ Sunderland, United Kingdom","relevance":0.49,"properties":{},"bbox":[-1.572074,54.873852,-1.471309,54.935104],"center":[-1.519344,54.904404],"geometry":{"type":"Point","coordinates":[-1.519344,54.904404]},"context":[{"id":"province.7215096038101180","text":"Sunderland"},{"id":"country.15810817285148820","text":"United
65
+ Kingdom","short_code":"gb"}]},{"id":"city.39247","type":"Feature","text":"Washington","place_name":"Washington,
66
+ West Sussex, United Kingdom","relevance":0.49,"properties":{},"bbox":[-0.42587,50.864746,-0.353751,50.916752],"center":[-0.393505,50.888378],"geometry":{"type":"Point","coordinates":[-0.393505,50.888378]},"context":[{"id":"province.9813570008215190","text":"West
67
+ Sussex"},{"id":"country.15810817285148820","text":"United Kingdom","short_code":"gb"}]},{"id":"address.56461051138823","type":"Feature","text":"Washington","place_name":"Washington,
68
+ Irvine, California 92606, United States","relevance":0.39,"properties":{},"center":[-117.792586,33.71292],"geometry":{"type":"Point","coordinates":[-117.792586,33.71292]},"context":[{"id":"city.92602","text":"Irvine"},{"id":"postcode.13114402634797550","text":"92606"},{"id":"province.6020809690311220","text":"California"},{"id":"country.12862386938302570","text":"United
69
+ States","short_code":"us"}]}],"attribution":"<a href=''https://www.mapbox.com/about/maps/''
70
70
  target=''_blank''>&copy; Mapbox</a>"}'
71
71
  http_version:
72
- recorded_at: Wed, 05 Aug 2015 17:07:27 GMT
73
- recorded_with: VCR 2.9.3
72
+ recorded_at: Sat, 30 Apr 2016 01:47:06 GMT
73
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,71 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/District+of+Columbia.json?access_token=pk.eyJ1IjoiZ2Vva2l0IiwiYSI6ImNpbm1md3dvdTB6anB0dG0zbW9zd3hlODQifQ.dyskNcYK8DvxyjCO3i7afA
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/vnd.geo+json; charset=utf-8
23
+ Transfer-Encoding:
24
+ - chunked
25
+ Connection:
26
+ - keep-alive
27
+ Date:
28
+ - Mon, 10 Oct 2016 09:43:54 GMT
29
+ X-Powered-By:
30
+ - Express
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - x-rate-limit-interval,x-rate-limit-limit,x-rate-limit-remaining,x-rate-limit-reset
35
+ Cache-Control:
36
+ - max-age=604800
37
+ X-Rate-Limit-Limit:
38
+ - '600'
39
+ X-Rate-Limit-Interval:
40
+ - '60'
41
+ X-Rate-Limit-Reset:
42
+ - '1476092693'
43
+ Last-Modified:
44
+ - Sat, 08 Oct 2016 20:41:24 GMT
45
+ Etag:
46
+ - '"5308502a7f73289748f66fa980fd2bab"'
47
+ Vary:
48
+ - Accept-Encoding
49
+ Age:
50
+ - '2918'
51
+ X-Cache:
52
+ - Hit from cloudfront
53
+ Via:
54
+ - 1.1 f27473d71ae79f24b43c80017fa9f378.cloudfront.net (CloudFront)
55
+ X-Amz-Cf-Id:
56
+ - JhVC6jy8VoZUf9gZTVHeEbxVY1uFnLPFgGuPspN9aMHr0T9Ln8t11Q==
57
+ body:
58
+ encoding: UTF-8
59
+ string: '{"type":"FeatureCollection","query":["district","of","columbia"],"features":[{"id":"province.6884744206035790","type":"Feature","text":"District
60
+ of Columbia","place_name":"District of Columbia, United States","relevance":0.99,"properties":{},"bbox":[-77.2081379659453,38.7177026348658,-76.909393,38.995548],"center":[-76.990661,38.89657],"geometry":{"type":"Point","coordinates":[-76.990661,38.89657]},"context":[{"id":"country.12862386938302570","text":"United
61
+ States","short_code":"us"}]},{"id":"country.8835466214338060","type":"Feature","text":"Colombia","place_name":"Colombia","relevance":0.3233333333333333,"properties":{"short_code":"co"},"bbox":[-81.837165383,-4.227109972,-66.851922971,14.571956242],"center":[-73.073215,3.900749],"geometry":{"type":"Point","coordinates":[-73.073215,3.900749]}},{"id":"city.2344293","type":"Feature","text":"Of","place_name":"Of,
62
+ Trabzon, Turkey","relevance":0.3233333333333333,"properties":{},"bbox":[40.262833,40.924538,40.275879,40.953457],"center":[40.273192,40.942694],"geometry":{"type":"Point","coordinates":[40.273192,40.942694]},"context":[{"id":"province.10752643295121960","text":"Trabzon"},{"id":"country.5756443905483080","text":"Turkey","short_code":"tr"}]},{"id":"city.3115255809","type":"Feature","text":"District","place_name":"District,
63
+ 19512, Pennsylvania, United States","relevance":0.3233333333333333,"properties":{},"bbox":[-75.7464660091927,40.2594929937439,-75.6185319935606,40.4340610099705],"center":[-75.6586,40.3467],"geometry":{"type":"Point","coordinates":[-75.6586,40.3467]},"context":[{"id":"postcode.6499893554605550","text":"19512"},{"id":"province.7664490979218730","text":"Pennsylvania"},{"id":"country.12862386938302570","text":"United
64
+ States","short_code":"us"}]},{"id":"address.9369877000360","type":"Feature","text":"Columbia
65
+ Rd NW","place_name":"Columbia Rd NW, Washington, District of Columbia 20009,
66
+ United States","relevance":0.25666666666666665,"properties":{},"center":[-77.038825,38.925133],"geometry":{"type":"Point","coordinates":[-77.038825,38.925133]},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.7725140869021840","text":"20009"},{"id":"province.6884744206035790","text":"District
67
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]}],"attribution":"<a
68
+ href=''https://www.mapbox.com/about/maps/'' target=''_blank''>&copy; Mapbox</a>"}'
69
+ http_version:
70
+ recorded_at: Mon, 10 Oct 2016 10:32:32 GMT
71
+ recorded_with: VCR 3.0.1
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/-77.032458,38.913175.json?access_token=
5
+ uri: https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/-77.032458,38.913175.json?access_token=pk.eyJ1IjoiZ2Vva2l0IiwiYSI6ImNpbm1md3dvdTB6anB0dG0zbW9zd3hlODQifQ.dyskNcYK8DvxyjCO3i7afA
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -20,8 +20,8 @@ http_interactions:
20
20
  headers:
21
21
  Content-Type:
22
22
  - application/vnd.geo+json; charset=utf-8
23
- Content-Length:
24
- - '2408'
23
+ Transfer-Encoding:
24
+ - chunked
25
25
  Connection:
26
26
  - keep-alive
27
27
  Access-Control-Allow-Origin:
@@ -29,45 +29,45 @@ http_interactions:
29
29
  Access-Control-Expose-Headers:
30
30
  - x-rate-limit-interval,x-rate-limit-limit,x-rate-limit-remaining,x-rate-limit-reset
31
31
  Cache-Control:
32
- - max-age=3600
32
+ - max-age=604800
33
33
  Date:
34
- - Wed, 05 Aug 2015 17:05:43 GMT
34
+ - Sat, 30 Apr 2016 01:04:44 GMT
35
35
  Etag:
36
- - '"990fe72d1269b3087771d373ba1b92ad"'
36
+ - '"5f74c0aa7657d0f9681e0179ab3ebb53"'
37
37
  Last-Modified:
38
- - Wed, 05 Aug 2015 17:05:43 GMT
38
+ - Fri, 29 Apr 2016 17:17:06 GMT
39
39
  X-Powered-By:
40
40
  - Express
41
41
  X-Rate-Limit-Interval:
42
42
  - '60'
43
43
  X-Rate-Limit-Limit:
44
44
  - '600'
45
- X-Rate-Limit-Remaining:
46
- - '598'
47
45
  X-Rate-Limit-Reset:
48
- - '1438794403'
46
+ - '1461978344'
49
47
  Age:
50
- - '104'
48
+ - '2543'
49
+ Vary:
50
+ - Accept-Encoding
51
51
  X-Cache:
52
52
  - Hit from cloudfront
53
53
  Via:
54
- - 1.1 bd90418f9d3315c701732d0fc172cfc6.cloudfront.net (CloudFront)
54
+ - 1.1 cd36f176a69306a48de77eb7071831f6.cloudfront.net (CloudFront)
55
55
  X-Amz-Cf-Id:
56
- - hhva3mOpSO_ZfHDs2ie3vaxjhQtmommN_UTrOx9tHi8MV5Xtpl19XA==
56
+ - X-YBk8u2Y1V5FX0Q2_X-ocIX4BvMAA3fiR7pAK2wYq-cwEFamYhG6g==
57
57
  body:
58
58
  encoding: UTF-8
59
59
  string: '{"type":"FeatureCollection","query":[-77.032458,38.913175],"features":[{"id":"address.75018674165319","type":"Feature","text":"14th
60
- St NW","place_name":"1712 14th St NW, Washington, 20009, District of Columbia,
61
- United States","relevance":1,"center":[-77.03195228861863,38.91313455636009],"geometry":{"type":"Point","coordinates":[-77.03195228861863,38.91313455636009]},"bbox":[-77.03261199999999,38.91112899999999,-77.03183899999996,38.92880499999998],"address":1712,"properties":{},"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.1308149819","text":"20009"},{"id":"province.1190806886","text":"District
62
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"city.20001","type":"Feature","text":"Washington","place_name":"Washington,
63
- 20009, District of Columbia, United States","relevance":1,"center":[-77.0364,38.8951],"geometry":{"type":"Point","coordinates":[-77.0364,38.8951]},"bbox":[-77.1197590084041,38.80311299006593,-76.90939299,38.99554800807594],"properties":{},"context":[{"id":"postcode.1308149819","text":"20009"},{"id":"province.1190806886","text":"District
64
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"postcode.1308149819","type":"Feature","text":"20009","place_name":"20009,
65
- District of Columbia, United States","relevance":1,"center":[-77.038293,38.92017],"geometry":{"type":"Point","coordinates":[-77.038293,38.92017]},"bbox":[-77.05021599999999,38.911125,-77.027035,38.929744],"properties":{},"context":[{"id":"province.1190806886","text":"District
66
- of Columbia"},{"id":"country.4150104525","text":"United States"}]},{"id":"province.1190806886","type":"Feature","text":"District
67
- of Columbia","place_name":"District of Columbia, United States","relevance":1,"center":[-77.009289,38.909152],"geometry":{"type":"Point","coordinates":[-77.009289,38.909152]},"bbox":[-77.11975899999999,38.79164499999999,-76.90939299999997,38.99554799999999],"properties":{},"context":[{"id":"country.4150104525","text":"United
68
- States"}]},{"id":"country.4150104525","type":"Feature","text":"United States","place_name":"United
69
- States","relevance":1,"center":[-98.958425,36.778951],"geometry":{"type":"Point","coordinates":[-98.958425,36.778951]},"bbox":[-179.23023299999997,18.866158999999996,179.85968099999994,71.43776899999999],"properties":{}}],"attribution":"<a
60
+ St NW","place_name":"1712 14th St NW, Washington, District of Columbia 20009,
61
+ United States","relevance":1,"properties":{},"center":[-77.03195228861863,38.91313455636009],"geometry":{"type":"Point","coordinates":[-77.03195228861863,38.91313455636009]},"address":1712,"context":[{"id":"city.20001","text":"Washington"},{"id":"postcode.7725140869021840","text":"20009"},{"id":"province.6884744206035790","text":"District
62
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"city.20001","type":"Feature","text":"Washington","place_name":"Washington,
63
+ 20009, District of Columbia, United States","relevance":1,"properties":{},"bbox":[-77.1197590084041,38.8031129900659,-76.90939299,38.9955480080759],"center":[-77.0366,38.895],"geometry":{"type":"Point","coordinates":[-77.0366,38.895]},"context":[{"id":"postcode.7725140869021840","text":"20009"},{"id":"province.6884744206035790","text":"District
64
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"postcode.7725140869021840","type":"Feature","text":"20009","place_name":"20009,
65
+ District of Columbia, United States","relevance":1,"properties":{},"bbox":[-77.050216,38.911125,-77.027035,38.929744],"center":[-77.038293,38.92017],"geometry":{"type":"Point","coordinates":[-77.038293,38.92017]},"context":[{"id":"province.6884744206035790","text":"District
66
+ of Columbia"},{"id":"country.12862386938302570","text":"United States","short_code":"us"}]},{"id":"province.6884744206035790","type":"Feature","text":"District
67
+ of Columbia","place_name":"District of Columbia, United States","relevance":1,"properties":{},"bbox":[-77.2081379659453,38.7177026348658,-76.909393,38.995548],"center":[-76.990661,38.89657],"geometry":{"type":"Point","coordinates":[-76.990661,38.89657]},"context":[{"id":"country.12862386938302570","text":"United
68
+ States","short_code":"us"}]},{"id":"country.12862386938302570","type":"Feature","text":"United
69
+ States","place_name":"United States","relevance":1,"properties":{"short_code":"us"},"bbox":[-179.330950579,18.765563302,179.959578044,71.540723637],"center":[-97.922211,39.381266],"geometry":{"type":"Point","coordinates":[-97.922211,39.381266]}}],"attribution":"<a
70
70
  href=''https://www.mapbox.com/about/maps/'' target=''_blank''>&copy; Mapbox</a>"}'
71
71
  http_version:
72
- recorded_at: Wed, 05 Aug 2015 17:07:27 GMT
73
- recorded_with: VCR 2.9.3
72
+ recorded_at: Sat, 30 Apr 2016 01:47:07 GMT
73
+ recorded_with: VCR 3.0.1