geokit 1.7.0.rc1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +37 -18
- data/Gemfile +2 -1
- data/README.markdown +4 -5
- data/Rakefile +2 -1
- data/data/GeoLiteCity.dat +0 -0
- data/fixtures/vcr_cassettes/google3_city.yml +104 -0
- data/fixtures/vcr_cassettes/google3_country_code_biased_result.yml +399 -0
- data/fixtures/vcr_cassettes/google3_full.yml +120 -0
- data/fixtures/vcr_cassettes/google3_full_short.yml +104 -0
- data/fixtures/vcr_cassettes/google3_language_response_fr.yml +82 -0
- data/fixtures/vcr_cassettes/google3_multi.yml +391 -0
- data/fixtures/vcr_cassettes/google3_reverse_madrid.yml +454 -0
- data/fixtures/vcr_cassettes/yahoo_city.yml +43 -0
- data/fixtures/vcr_cassettes/yahoo_full.yml +44 -0
- data/fixtures/vcr_cassettes/yahoo_no_results.yml +40 -0
- data/geokit.gemspec +4 -3
- data/lib/geokit/geocoders.rb +6 -3
- data/lib/geokit/mappable.rb +0 -5
- data/lib/geokit/services/google3.rb +17 -10
- data/lib/geokit/services/ip.rb +1 -1
- data/lib/geokit/services/maxmind.rb +41 -0
- data/lib/geokit/services/ripe.rb +32 -0
- data/lib/geokit/services/yahoo.rb +125 -5
- data/lib/geokit/services/yandex.rb +51 -0
- data/lib/geokit/version.rb +1 -1
- data/test/helper.rb +47 -1
- data/test/test_google_geocoder3.rb +71 -432
- data/test/test_maxmind_geocoder.rb +17 -0
- data/test/test_yahoo_geocoder.rb +39 -34
- data/test/test_yandex_geocoder.rb +93 -0
- metadata +66 -8
- data/ext/mkrf_conf.rb +0 -15
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'helper')
|
2
|
+
|
3
|
+
class MaxmindGeocoderTest < BaseGeocoderTest #:nodoc: all
|
4
|
+
|
5
|
+
def setup
|
6
|
+
super
|
7
|
+
@ip = '118.210.47.142'
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_ip
|
11
|
+
VCR.use_cassette('maxmind_ip') do
|
12
|
+
res = Geokit::Geocoders::MaxmindGeocoder.geocode(@ip)
|
13
|
+
assert_equal 'Adelaide', res.city
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/test/test_yahoo_geocoder.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'helper')
|
2
2
|
|
3
|
-
Geokit::Geocoders::
|
3
|
+
Geokit::Geocoders::yahoo_consumer_key = 'dj0yJmk9cXByQVN2WHZmTVhDJmQ9WVdrOVZscG1WVWhOTldrbWNHbzlNakF6TlRJME16UTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD0zNg--'
|
4
|
+
Geokit::Geocoders::yahoo_consumer_secret = 'SECRET'
|
4
5
|
|
5
6
|
class YahooGeocoderTest < BaseGeocoderTest #:nodoc: all
|
6
7
|
YAHOO_FULL=<<-EOF.strip
|
@@ -23,55 +24,59 @@ class YahooGeocoderTest < BaseGeocoderTest #:nodoc: all
|
|
23
24
|
@yahoo_city_loc = Geokit::GeoLoc.new(@yahoo_city_hash)
|
24
25
|
end
|
25
26
|
|
27
|
+
def assert_yahoo_url(expected_url)
|
28
|
+
assert_equal expected_url, TestHelper.get_last_url.gsub(/&oauth_[a-z_]+=[a-zA-Z0-9\-. %]+/, '').gsub('%20', '+')
|
29
|
+
end
|
30
|
+
|
26
31
|
# the testing methods themselves
|
27
32
|
def test_yahoo_full_address
|
28
|
-
|
29
|
-
|
30
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(@full_address)}"
|
31
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
33
|
+
VCR.use_cassette('yahoo_full') do
|
34
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(@full_address)}"
|
32
35
|
do_full_address_assertions(Geokit::Geocoders::YahooGeocoder.geocode(@full_address))
|
36
|
+
assert_yahoo_url url
|
37
|
+
end
|
33
38
|
end
|
34
39
|
|
35
40
|
def test_yahoo_full_address_accuracy
|
36
|
-
|
37
|
-
|
38
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(@full_address)}"
|
39
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
41
|
+
VCR.use_cassette('yahoo_full') do
|
42
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(@full_address)}"
|
40
43
|
res = Geokit::Geocoders::YahooGeocoder.geocode(@full_address)
|
44
|
+
assert_yahoo_url url
|
41
45
|
assert_equal 8, res.accuracy
|
46
|
+
end
|
42
47
|
end
|
43
48
|
|
44
49
|
def test_yahoo_full_address_with_geo_loc
|
45
|
-
|
46
|
-
|
47
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(@full_address)}"
|
48
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
50
|
+
VCR.use_cassette('yahoo_full') do
|
51
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(@full_address)}"
|
49
52
|
do_full_address_assertions(Geokit::Geocoders::YahooGeocoder.geocode(@yahoo_full_loc))
|
53
|
+
assert_yahoo_url url
|
54
|
+
end
|
50
55
|
end
|
51
56
|
|
52
57
|
def test_yahoo_city
|
53
|
-
|
54
|
-
|
55
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(@address)}"
|
56
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
58
|
+
VCR.use_cassette('yahoo_city') do
|
59
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(@address)}"
|
57
60
|
do_city_assertions(Geokit::Geocoders::YahooGeocoder.geocode(@address))
|
61
|
+
assert_yahoo_url url
|
62
|
+
end
|
58
63
|
end
|
59
64
|
|
60
65
|
def test_yahoo_city_accuracy
|
61
|
-
|
62
|
-
|
63
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(@address)}"
|
64
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
66
|
+
VCR.use_cassette('yahoo_city') do
|
67
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(@address)}"
|
65
68
|
res = Geokit::Geocoders::YahooGeocoder.geocode(@address)
|
69
|
+
assert_yahoo_url url
|
66
70
|
assert_equal 4, res.accuracy
|
71
|
+
end
|
67
72
|
end
|
68
73
|
|
69
74
|
def test_yahoo_city_with_geo_loc
|
70
|
-
|
71
|
-
|
72
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(@address)}"
|
73
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
75
|
+
VCR.use_cassette('yahoo_city') do
|
76
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(@address)}"
|
74
77
|
do_city_assertions(Geokit::Geocoders::YahooGeocoder.geocode(@yahoo_city_loc))
|
78
|
+
assert_yahoo_url url
|
79
|
+
end
|
75
80
|
end
|
76
81
|
|
77
82
|
def test_no_results
|
@@ -79,18 +84,17 @@ class YahooGeocoderTest < BaseGeocoderTest #:nodoc: all
|
|
79
84
|
no_results_full_hash = {:street_address=>"ZZ", :city=>"ZZ", :state=>"ZZ"}
|
80
85
|
no_results_full_loc = Geokit::GeoLoc.new(no_results_full_hash)
|
81
86
|
|
82
|
-
|
83
|
-
|
84
|
-
url = "http://where.yahooapis.com/geocode?flags=J&appid=Yahoo&q=#{Geokit::Inflector.url_escape(no_results_address)}"
|
85
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
87
|
+
VCR.use_cassette('yahoo_no_results') do
|
88
|
+
url = "http://yboss.yahooapis.com/geo/placefinder?flags=J&q=#{Geokit::Inflector.url_escape(no_results_address)}"
|
86
89
|
result = Geokit::Geocoders::YahooGeocoder.geocode(no_results_address)
|
90
|
+
assert_yahoo_url url
|
87
91
|
assert_equal ",", result.ll
|
92
|
+
end
|
88
93
|
end
|
89
94
|
|
90
95
|
def test_service_unavailable
|
91
96
|
response = MockFailure.new
|
92
|
-
|
93
|
-
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
97
|
+
Geokit::Geocoders::YahooGeocoder.expects(:call_geocoder_service).returns(response)
|
94
98
|
assert !Geokit::Geocoders::YahooGeocoder.geocode(@yahoo_city_loc).success
|
95
99
|
end
|
96
100
|
|
@@ -98,18 +102,19 @@ class YahooGeocoderTest < BaseGeocoderTest #:nodoc: all
|
|
98
102
|
|
99
103
|
# next two methods do the assertions for both address-level and city-level lookups
|
100
104
|
def do_full_address_assertions(res)
|
105
|
+
|
101
106
|
assert_equal "CA", res.state
|
102
107
|
assert_equal "San Francisco", res.city
|
103
|
-
|
108
|
+
assert_array_in_delta [37.792332, -122.393791], res.to_a
|
104
109
|
assert res.is_us?
|
105
|
-
assert_equal "100 Spear St, San Francisco, CA, 94105-
|
110
|
+
assert_equal "100 Spear St, San Francisco, CA, 94105-1578, US", res.full_address
|
106
111
|
assert_equal "yahoo", res.provider
|
107
112
|
end
|
108
113
|
|
109
114
|
def do_city_assertions(res)
|
110
115
|
assert_equal "CA", res.state
|
111
116
|
assert_equal "San Francisco", res.city
|
112
|
-
|
117
|
+
assert_array_in_delta [37.77713, -122.41964], res.to_a
|
113
118
|
assert res.is_us?
|
114
119
|
assert_equal "San Francisco, CA, US", res.full_address
|
115
120
|
assert_nil res.street_address
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require File.join(File.dirname(__FILE__), 'helper')
|
3
|
+
|
4
|
+
# Geokit::Geocoders::yandex = 'yandex'
|
5
|
+
|
6
|
+
class YandexGeocoderTest < BaseGeocoderTest #:nodoc: all
|
7
|
+
YANDEX_FULL=<<-EOF.strip
|
8
|
+
{"response":{"GeoObjectCollection":{"metaDataProperty":{"GeocoderResponseMetaData":{"request":"Москва, улица Новый Арбат, дом 24","found":"1","results":"10"}},"featureMember":[{"GeoObject":{"metaDataProperty":{"GeocoderMetaData":{"kind":"house","text":"Россия, Москва, улица Новый Арбат, 24","precision":"exact","AddressDetails":{"Country":{"AddressLine":"Москва, улица Новый Арбат, 24","CountryNameCode":"RU","CountryName":"Россия","Locality":{"LocalityName":"Москва","Thoroughfare":{"ThoroughfareName":"улица Новый Арбат","Premise":{"PremiseNumber":"24"}}}}}}},"description":"Москва, Россия","name":"улица Новый Арбат, 24","boundedBy":{"Envelope":{"lowerCorner":"37.585565 55.751928","upperCorner":"37.589662 55.754238"}},"Point":{"pos":"37.587614 55.753083"}}}]}}}
|
9
|
+
EOF
|
10
|
+
|
11
|
+
YANDEX_REGION=<<-EOF.strip
|
12
|
+
{"response":{"GeoObjectCollection":{"metaDataProperty":{"GeocoderResponseMetaData":{"request":"Ростов-на-Дону, ул. Станиславского, д.21","found":"1","results":"10"}},"featureMember":[{"GeoObject":{"metaDataProperty":{"GeocoderMetaData":{"kind":"house","text":"Россия, Ростовская область, город Ростов-на-Дону, улица Станиславского, 21","precision":"exact","AddressDetails":{"Country":{"AddressLine":"Ростовская область, город Ростов-на-Дону, улица Станиславского, 21","CountryNameCode":"RU","CountryName":"Россия","AdministrativeArea":{"AdministrativeAreaName":"Ростовская область","Locality":{"LocalityName":"город Ростов-на-Дону","Thoroughfare":{"ThoroughfareName":"улица Станиславского","Premise":{"PremiseNumber":"21"}}}}}}}},"description":"город Ростов-на-Дону, Ростовская область, Россия","name":"улица Станиславского, 21","boundedBy":{"Envelope":{"lowerCorner":"39.701349 47.214507","upperCorner":"39.705446 47.217298"}},"Point":{"pos":"39.703398 47.215903"}}}]}}}
|
13
|
+
EOF
|
14
|
+
|
15
|
+
YANDEX_CITY=<<-EOF.strip
|
16
|
+
{"response":{"GeoObjectCollection":{"metaDataProperty":{"GeocoderResponseMetaData":{"request":"город Москва","found":"1","results":"10"}},"featureMember":[{"GeoObject":{"metaDataProperty":{"GeocoderMetaData":{"kind":"locality","text":"Россия, Москва","precision":"other","AddressDetails":{"Country":{"AddressLine":"Москва","CountryNameCode":"RU","CountryName":"Россия","Locality":{"LocalityName":"Москва"}}}}},"description":"Россия","name":"Москва","boundedBy":{"Envelope":{"lowerCorner":"37.182743 55.490667","upperCorner":"37.964969 56.01074"}},"Point":{"pos":"37.617761 55.755773"}}}]}}}
|
17
|
+
EOF
|
18
|
+
|
19
|
+
YANDEX_NO_RESULTS=<<-EOF.strip
|
20
|
+
{"response":{"GeoObjectCollection":{"metaDataProperty":{"GeocoderResponseMetaData":{"request":"ZZ, ZZ, ZZ","found":"0","results":"10"}},"featureMember":[]}}}
|
21
|
+
EOF
|
22
|
+
|
23
|
+
def setup
|
24
|
+
super
|
25
|
+
@full_address = "Москва, улица Новый Арбат, дом 24"
|
26
|
+
@address = "город Москва"
|
27
|
+
end
|
28
|
+
|
29
|
+
# the testing methods themselves
|
30
|
+
def test_yandex_full_address
|
31
|
+
response = MockSuccess.new
|
32
|
+
response.expects(:body).returns(YANDEX_FULL)
|
33
|
+
url = "http://geocode-maps.yandex.ru/1.x/?geocode=#{Geokit::Inflector::url_escape(@full_address)}&format=json"
|
34
|
+
Geokit::Geocoders::YandexGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
35
|
+
res = Geokit::Geocoders::YandexGeocoder.geocode(@full_address)
|
36
|
+
|
37
|
+
assert_equal "yandex", res.provider
|
38
|
+
assert_equal "улица Новый Арбат, 24", res.street_address
|
39
|
+
assert_equal "Москва", res.city
|
40
|
+
assert_equal 55.753083, res.lat
|
41
|
+
assert_equal 37.587614, res.lng
|
42
|
+
assert_equal "RU", res.country_code
|
43
|
+
assert res.success
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_yandex_full_address_with_region
|
47
|
+
region_address = "Ростов-на-Дону, ул. Станиславского, д.21"
|
48
|
+
response = MockSuccess.new
|
49
|
+
response.expects(:body).returns(YANDEX_REGION)
|
50
|
+
url = "http://geocode-maps.yandex.ru/1.x/?geocode=#{Geokit::Inflector::url_escape(region_address)}&format=json"
|
51
|
+
Geokit::Geocoders::YandexGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
52
|
+
res = Geokit::Geocoders::YandexGeocoder.geocode(region_address)
|
53
|
+
|
54
|
+
assert_equal "yandex", res.provider
|
55
|
+
assert_equal "улица Станиславского, 21", res.street_address
|
56
|
+
assert_equal "город Ростов на Дону", res.city
|
57
|
+
assert_equal "Ростовская область", res.state
|
58
|
+
assert_equal 47.215903, res.lat
|
59
|
+
assert_equal 39.703398, res.lng
|
60
|
+
assert_equal "RU", res.country_code
|
61
|
+
assert res.success
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_yandex_city
|
65
|
+
response = MockSuccess.new
|
66
|
+
response.expects(:body).returns(YANDEX_CITY)
|
67
|
+
url = "http://geocode-maps.yandex.ru/1.x/?geocode=#{Geokit::Inflector::url_escape(@address)}&format=json"
|
68
|
+
Geokit::Geocoders::YandexGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
69
|
+
res = Geokit::Geocoders::YandexGeocoder.geocode(@address)
|
70
|
+
|
71
|
+
assert_equal "yandex", res.provider
|
72
|
+
assert_equal "city", res.precision
|
73
|
+
assert_equal "Москва", res.city
|
74
|
+
assert_equal 55.755773, res.lat
|
75
|
+
assert_equal 37.617761, res.lng
|
76
|
+
assert_equal "RU", res.country_code
|
77
|
+
assert res.success
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
def test_no_results
|
82
|
+
no_results_address = "ZZ, ZZ, ZZ"
|
83
|
+
# no_results_full_hash = {:street_address=>"ZZ", :city=>"ZZ", :state=>"ZZ"}
|
84
|
+
# no_results_full_loc = Geokit::GeoLoc.new(no_results_full_hash)
|
85
|
+
|
86
|
+
response = MockSuccess.new
|
87
|
+
response.expects(:body).returns(YANDEX_NO_RESULTS)
|
88
|
+
url = "http://geocode-maps.yandex.ru/1.x/?geocode=#{Geokit::Inflector::url_escape(no_results_address)}&format=json"
|
89
|
+
Geokit::Geocoders::YandexGeocoder.expects(:call_geocoder_service).with(url).returns(response)
|
90
|
+
result = Geokit::Geocoders::YandexGeocoder.geocode(no_results_address)
|
91
|
+
assert_equal ",", result.ll
|
92
|
+
end
|
93
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.0
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Noack, James Cox, Andre Lewis & Bill Eisenhauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -94,13 +94,54 @@ dependencies:
|
|
94
94
|
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: vcr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ! '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
97
139
|
description: Geokit provides geocoding and distance calculation in an easy-to-use
|
98
140
|
API
|
99
141
|
email:
|
100
142
|
- michael+geokit@noack.com.au
|
101
143
|
executables: []
|
102
|
-
extensions:
|
103
|
-
- ext/mkrf_conf.rb
|
144
|
+
extensions: []
|
104
145
|
extra_rdoc_files:
|
105
146
|
- README.markdown
|
106
147
|
files:
|
@@ -112,7 +153,17 @@ files:
|
|
112
153
|
- Manifest.txt
|
113
154
|
- README.markdown
|
114
155
|
- Rakefile
|
115
|
-
-
|
156
|
+
- data/GeoLiteCity.dat
|
157
|
+
- fixtures/vcr_cassettes/google3_city.yml
|
158
|
+
- fixtures/vcr_cassettes/google3_country_code_biased_result.yml
|
159
|
+
- fixtures/vcr_cassettes/google3_full.yml
|
160
|
+
- fixtures/vcr_cassettes/google3_full_short.yml
|
161
|
+
- fixtures/vcr_cassettes/google3_language_response_fr.yml
|
162
|
+
- fixtures/vcr_cassettes/google3_multi.yml
|
163
|
+
- fixtures/vcr_cassettes/google3_reverse_madrid.yml
|
164
|
+
- fixtures/vcr_cassettes/yahoo_city.yml
|
165
|
+
- fixtures/vcr_cassettes/yahoo_full.yml
|
166
|
+
- fixtures/vcr_cassettes/yahoo_no_results.yml
|
116
167
|
- geokit.gemspec
|
117
168
|
- lib/geokit.rb
|
118
169
|
- lib/geokit/geocoders.rb
|
@@ -126,9 +177,12 @@ files:
|
|
126
177
|
- lib/geokit/services/google.rb
|
127
178
|
- lib/geokit/services/google3.rb
|
128
179
|
- lib/geokit/services/ip.rb
|
180
|
+
- lib/geokit/services/maxmind.rb
|
129
181
|
- lib/geokit/services/openstreetmap.rb
|
182
|
+
- lib/geokit/services/ripe.rb
|
130
183
|
- lib/geokit/services/us_geocoder.rb
|
131
184
|
- lib/geokit/services/yahoo.rb
|
185
|
+
- lib/geokit/services/yandex.rb
|
132
186
|
- lib/geokit/version.rb
|
133
187
|
- test/helper.rb
|
134
188
|
- test/test_base_geocoder.rb
|
@@ -142,13 +196,15 @@ files:
|
|
142
196
|
- test/test_inflector.rb
|
143
197
|
- test/test_ipgeocoder.rb
|
144
198
|
- test/test_latlng.rb
|
199
|
+
- test/test_maxmind_geocoder.rb
|
145
200
|
- test/test_multi_geocoder.rb
|
146
201
|
- test/test_multi_ip_geocoder.rb
|
147
202
|
- test/test_openstreetmap_geocoder.rb
|
148
203
|
- test/test_polygon_contains.rb
|
149
204
|
- test/test_us_geocoder.rb
|
150
205
|
- test/test_yahoo_geocoder.rb
|
151
|
-
|
206
|
+
- test/test_yandex_geocoder.rb
|
207
|
+
homepage: http://github.com/geokit/geokit
|
152
208
|
licenses:
|
153
209
|
- MIT
|
154
210
|
metadata: {}
|
@@ -165,9 +221,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
221
|
version: '0'
|
166
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
223
|
requirements:
|
168
|
-
- - ! '
|
224
|
+
- - ! '>='
|
169
225
|
- !ruby/object:Gem::Version
|
170
|
-
version:
|
226
|
+
version: '0'
|
171
227
|
requirements: []
|
172
228
|
rubyforge_project:
|
173
229
|
rubygems_version: 2.0.3
|
@@ -187,9 +243,11 @@ test_files:
|
|
187
243
|
- test/test_inflector.rb
|
188
244
|
- test/test_ipgeocoder.rb
|
189
245
|
- test/test_latlng.rb
|
246
|
+
- test/test_maxmind_geocoder.rb
|
190
247
|
- test/test_multi_geocoder.rb
|
191
248
|
- test/test_multi_ip_geocoder.rb
|
192
249
|
- test/test_openstreetmap_geocoder.rb
|
193
250
|
- test/test_polygon_contains.rb
|
194
251
|
- test/test_us_geocoder.rb
|
195
252
|
- test/test_yahoo_geocoder.rb
|
253
|
+
- test/test_yandex_geocoder.rb
|
data/ext/mkrf_conf.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rubygems/command.rb'
|
3
|
-
require 'rubygems/dependency_installer.rb'
|
4
|
-
begin
|
5
|
-
Gem::Command.build_args = ARGV
|
6
|
-
rescue NoMethodError
|
7
|
-
end
|
8
|
-
inst = Gem::DependencyInstaller.new
|
9
|
-
begin
|
10
|
-
if RUBY_VERSION < "1.9"
|
11
|
-
inst.install "iconv"
|
12
|
-
end
|
13
|
-
rescue
|
14
|
-
exit(1)
|
15
|
-
end
|