geokit 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +358 -0
- data/.travis.yml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile +3 -3
- data/README.markdown +19 -4
- data/Rakefile +11 -16
- data/fixtures/keys.yml +9 -0
- data/fixtures/vcr_cassettes/google_postal_town.yml +117 -0
- data/fixtures/vcr_cassettes/mapbox_forward_geocode.yml +30 -30
- data/fixtures/vcr_cassettes/mapbox_forward_geocode_city_only.yml +25 -25
- data/fixtures/vcr_cassettes/mapbox_forward_geocode_state_only.yml +71 -0
- data/fixtures/vcr_cassettes/mapbox_reverse_geocode.yml +25 -25
- data/fixtures/vcr_cassettes/test_component_filtering_off.yml +390 -0
- data/fixtures/vcr_cassettes/test_component_filtering_on.yml +164 -0
- data/fixtures/vcr_cassettes/test_component_filtering_on_without_filter.yml +404 -0
- data/geokit.gemspec +24 -23
- data/lib/geokit.rb +7 -7
- data/lib/geokit/core_ext.rb +1 -1
- data/lib/geokit/geo_loc.rb +25 -19
- data/lib/geokit/geocoders.rb +21 -30
- data/lib/geokit/geocoders/bing.rb +5 -4
- data/lib/geokit/geocoders/ca_geocoder.rb +10 -11
- data/lib/geokit/geocoders/fcc.rb +9 -9
- data/lib/geokit/geocoders/free_geo_ip.rb +8 -8
- data/lib/geokit/geocoders/geo_plugin.rb +7 -7
- data/lib/geokit/geocoders/geobytes.rb +10 -10
- data/lib/geokit/geocoders/geocodio.rb +14 -14
- data/lib/geokit/geocoders/geonames.rb +12 -12
- data/lib/geokit/geocoders/google.rb +89 -61
- data/lib/geokit/geocoders/ip.rb +9 -14
- data/lib/geokit/geocoders/mapbox.rb +30 -30
- data/lib/geokit/geocoders/mapquest.rb +12 -12
- data/lib/geokit/geocoders/maxmind.rb +1 -1
- data/lib/geokit/geocoders/opencage.rb +19 -19
- data/lib/geokit/geocoders/openstreetmap.rb +21 -19
- data/lib/geokit/geocoders/ripe.rb +7 -7
- data/lib/geokit/geocoders/us_geocoder.rb +5 -5
- data/lib/geokit/geocoders/yahoo.rb +46 -46
- data/lib/geokit/geocoders/yandex.rb +18 -17
- data/lib/geokit/inflectors.rb +5 -5
- data/lib/geokit/lat_lng.rb +5 -4
- data/lib/geokit/multi_geocoder.rb +4 -2
- data/lib/geokit/net_adapter/net_http.rb +3 -2
- data/lib/geokit/net_adapter/typhoeus.rb +2 -1
- data/lib/geokit/version.rb +1 -1
- data/test/coverage_loader.rb +25 -0
- data/test/helper.rb +18 -87
- data/test/test_base_geocoder.rb +44 -11
- data/test/test_bing_geocoder.rb +40 -48
- data/test/test_bounds.rb +1 -1
- data/test/test_ca_geocoder.rb +15 -15
- data/test/test_fcc_geocoder.rb +8 -9
- data/test/test_free_geo_ip_geocoder.rb +8 -10
- data/test/test_geo_plugin_geocoder.rb +21 -22
- data/test/test_geobytes_geocoder.rb +9 -11
- data/test/test_geocodio_geocoder.rb +12 -14
- data/test/test_geoloc.rb +48 -49
- data/test/test_geonames_geocoder.rb +19 -23
- data/test/test_google_geocoder.rb +197 -189
- data/test/test_inflector.rb +7 -7
- data/test/test_ipgeocoder.rb +32 -31
- data/test/test_latlng.rb +28 -28
- data/test/test_map_quest.rb +23 -27
- data/test/test_mapbox_geocoder.rb +38 -28
- data/test/test_mappable.rb +2 -2
- data/test/test_maxmind_geocoder.rb +16 -16
- data/test/test_multi_geocoder.rb +5 -5
- data/test/test_multi_ip_geocoder.rb +3 -3
- data/test/test_net_adapter.rb +4 -4
- data/test/test_opencage_geocoder.rb +58 -67
- data/test/test_openstreetmap_geocoder.rb +67 -65
- data/test/test_polygon.rb +4 -22
- data/test/test_ripe_geocoder.rb +21 -26
- data/test/test_us_geocoder.rb +21 -21
- data/test/test_useragent.rb +46 -0
- data/test/test_yahoo_geocoder.rb +35 -47
- data/test/test_yandex_geocoder.rb +29 -27
- data/test/vcr_loader.rb +18 -0
- metadata +20 -6
data/Rakefile
CHANGED
@@ -1,30 +1,25 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
3
|
|
4
|
-
task :
|
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 <<
|
9
|
-
t.test_files = FileList[
|
9
|
+
t.libs << 'test'
|
10
|
+
t.test_files = FileList['test/test*.rb']
|
10
11
|
t.verbose = true
|
11
12
|
end
|
12
13
|
|
13
|
-
desc
|
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 =
|
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
|
26
|
-
File.open(
|
27
|
-
open(url,
|
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
|
data/fixtures/keys.yml
ADDED
@@ -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
|
-
|
24
|
-
-
|
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=
|
32
|
+
- max-age=604800
|
33
33
|
Date:
|
34
|
-
-
|
34
|
+
- Sat, 30 Apr 2016 01:04:44 GMT
|
35
35
|
Etag:
|
36
|
-
- '"
|
36
|
+
- '"5f74c0aa7657d0f9681e0179ab3ebb53"'
|
37
37
|
Last-Modified:
|
38
|
-
-
|
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
|
-
- '
|
46
|
+
- '1461978343'
|
49
47
|
Age:
|
50
|
-
- '
|
48
|
+
- '2543'
|
49
|
+
Vary:
|
50
|
+
- Accept-Encoding
|
51
51
|
X-Cache:
|
52
52
|
- Hit from cloudfront
|
53
53
|
Via:
|
54
|
-
- 1.1
|
54
|
+
- 1.1 3a0c9fc3d9b0e35bff1924a1b54094ee.cloudfront.net (CloudFront)
|
55
55
|
X-Amz-Cf-Id:
|
56
|
-
-
|
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,
|
61
|
-
United States","relevance":0.
|
62
|
-
of Columbia"},{"id":"country.
|
63
|
-
St NW","place_name":"14th St NW, Washington,
|
64
|
-
|
65
|
-
of Columbia"},{"id":"country.
|
66
|
-
St NW","place_name":"
|
67
|
-
States","relevance":0.
|
68
|
-
of Columbia"},{"id":"country.
|
69
|
-
St NW","place_name":"14th St NW, Washington,
|
70
|
-
|
71
|
-
of Columbia"},{"id":"country.
|
72
|
-
St
|
73
|
-
States","relevance":0.
|
74
|
-
of Columbia"},{"id":"country.
|
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''>© Mapbox</a>"}'
|
76
76
|
http_version:
|
77
|
-
recorded_at:
|
78
|
-
recorded_with: VCR
|
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
|
-
|
24
|
-
-
|
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=
|
32
|
+
- max-age=604800
|
33
33
|
Date:
|
34
|
-
-
|
34
|
+
- Sat, 30 Apr 2016 01:04:42 GMT
|
35
35
|
Etag:
|
36
|
-
- '"
|
36
|
+
- '"306cdd4db6ec8ddb50a1cdf4160311cb"'
|
37
37
|
Last-Modified:
|
38
|
-
-
|
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
|
-
- '
|
46
|
+
- '1461978342'
|
49
47
|
Age:
|
50
|
-
- '
|
48
|
+
- '2543'
|
49
|
+
Vary:
|
50
|
+
- Accept-Encoding
|
51
51
|
X-Cache:
|
52
52
|
- Hit from cloudfront
|
53
53
|
Via:
|
54
|
-
- 1.1
|
54
|
+
- 1.1 817544e5c34b42096d08b4b82dccd904.cloudfront.net (CloudFront)
|
55
55
|
X-Amz-Cf-Id:
|
56
|
-
-
|
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.
|
61
|
-
of Columbia"},{"id":"country.
|
62
|
-
of Columbia","place_name":"District of Columbia, United States","relevance":0.49,"
|
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]},"
|
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]},"
|
67
|
-
Sussex"},{"id":"country.
|
68
|
-
Irvine, 92606,
|
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''>© Mapbox</a>"}'
|
71
71
|
http_version:
|
72
|
-
recorded_at:
|
73
|
-
recorded_with: VCR
|
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''>© 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
|
-
|
24
|
-
-
|
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=
|
32
|
+
- max-age=604800
|
33
33
|
Date:
|
34
|
-
-
|
34
|
+
- Sat, 30 Apr 2016 01:04:44 GMT
|
35
35
|
Etag:
|
36
|
-
- '"
|
36
|
+
- '"5f74c0aa7657d0f9681e0179ab3ebb53"'
|
37
37
|
Last-Modified:
|
38
|
-
-
|
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
|
-
- '
|
46
|
+
- '1461978344'
|
49
47
|
Age:
|
50
|
-
- '
|
48
|
+
- '2543'
|
49
|
+
Vary:
|
50
|
+
- Accept-Encoding
|
51
51
|
X-Cache:
|
52
52
|
- Hit from cloudfront
|
53
53
|
Via:
|
54
|
-
- 1.1
|
54
|
+
- 1.1 cd36f176a69306a48de77eb7071831f6.cloudfront.net (CloudFront)
|
55
55
|
X-Amz-Cf-Id:
|
56
|
-
-
|
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,
|
61
|
-
United States","relevance":1,"center":[-77.03195228861863,38.91313455636009],"geometry":{"type":"Point","coordinates":[-77.03195228861863,38.91313455636009]},"
|
62
|
-
of Columbia"},{"id":"country.
|
63
|
-
20009, District of Columbia, United States","relevance":1,"center":[-77.
|
64
|
-
of Columbia"},{"id":"country.
|
65
|
-
District of Columbia, United States","relevance":1,"center":[-77.038293,38.92017],"geometry":{"type":"Point","coordinates":[-77.038293,38.92017]},"
|
66
|
-
of Columbia"},{"id":"country.
|
67
|
-
of Columbia","place_name":"District of Columbia, United States","relevance":1,"
|
68
|
-
States"}]},{"id":"country.
|
69
|
-
States","
|
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''>© Mapbox</a>"}'
|
71
71
|
http_version:
|
72
|
-
recorded_at:
|
73
|
-
recorded_with: VCR
|
72
|
+
recorded_at: Sat, 30 Apr 2016 01:47:07 GMT
|
73
|
+
recorded_with: VCR 3.0.1
|