geocoder-kb 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.travis.yml +31 -0
- data/CHANGELOG.md +384 -0
- data/LICENSE +20 -0
- data/README.md +1085 -0
- data/Rakefile +25 -0
- data/bin/geocode +5 -0
- data/examples/autoexpire_cache_dalli.rb +62 -0
- data/examples/autoexpire_cache_redis.rb +28 -0
- data/examples/cache_bypass.rb +48 -0
- data/examples/sidekiq_worker.rb +16 -0
- data/gemfiles/Gemfile.mongoid-2.4.x +16 -0
- data/lib/generators/geocoder/config/config_generator.rb +14 -0
- data/lib/generators/geocoder/config/templates/initializer.rb +21 -0
- data/lib/generators/geocoder/maxmind/geolite_city_generator.rb +28 -0
- data/lib/generators/geocoder/maxmind/geolite_country_generator.rb +28 -0
- data/lib/generators/geocoder/maxmind/templates/migration/geolite_city.rb +30 -0
- data/lib/generators/geocoder/maxmind/templates/migration/geolite_country.rb +17 -0
- data/lib/geocoder.rb +47 -0
- data/lib/geocoder/cache.rb +90 -0
- data/lib/geocoder/calculations.rb +428 -0
- data/lib/geocoder/cli.rb +121 -0
- data/lib/geocoder/configuration.rb +124 -0
- data/lib/geocoder/configuration_hash.rb +11 -0
- data/lib/geocoder/exceptions.rb +21 -0
- data/lib/geocoder/ip_address.rb +21 -0
- data/lib/geocoder/lookup.rb +102 -0
- data/lib/geocoder/lookups/amap.rb +55 -0
- data/lib/geocoder/lookups/baidu.rb +55 -0
- data/lib/geocoder/lookups/baidu_ip.rb +54 -0
- data/lib/geocoder/lookups/base.rb +302 -0
- data/lib/geocoder/lookups/bing.rb +59 -0
- data/lib/geocoder/lookups/dstk.rb +20 -0
- data/lib/geocoder/lookups/esri.rb +48 -0
- data/lib/geocoder/lookups/freegeoip.rb +47 -0
- data/lib/geocoder/lookups/geocoder_ca.rb +54 -0
- data/lib/geocoder/lookups/geocoder_us.rb +39 -0
- data/lib/geocoder/lookups/geocodio.rb +42 -0
- data/lib/geocoder/lookups/geoip2.rb +40 -0
- data/lib/geocoder/lookups/google.rb +67 -0
- data/lib/geocoder/lookups/google_places_details.rb +50 -0
- data/lib/geocoder/lookups/google_premier.rb +47 -0
- data/lib/geocoder/lookups/here.rb +62 -0
- data/lib/geocoder/lookups/mapquest.rb +60 -0
- data/lib/geocoder/lookups/maxmind.rb +90 -0
- data/lib/geocoder/lookups/maxmind_local.rb +58 -0
- data/lib/geocoder/lookups/nominatim.rb +52 -0
- data/lib/geocoder/lookups/okf.rb +43 -0
- data/lib/geocoder/lookups/opencagedata.rb +58 -0
- data/lib/geocoder/lookups/ovi.rb +62 -0
- data/lib/geocoder/lookups/pointpin.rb +68 -0
- data/lib/geocoder/lookups/postcode_anywhere_uk.rb +51 -0
- data/lib/geocoder/lookups/smarty_streets.rb +45 -0
- data/lib/geocoder/lookups/telize.rb +40 -0
- data/lib/geocoder/lookups/test.rb +44 -0
- data/lib/geocoder/lookups/yahoo.rb +88 -0
- data/lib/geocoder/lookups/yandex.rb +54 -0
- data/lib/geocoder/models/active_record.rb +50 -0
- data/lib/geocoder/models/base.rb +39 -0
- data/lib/geocoder/models/mongo_base.rb +64 -0
- data/lib/geocoder/models/mongo_mapper.rb +26 -0
- data/lib/geocoder/models/mongoid.rb +32 -0
- data/lib/geocoder/query.rb +111 -0
- data/lib/geocoder/railtie.rb +26 -0
- data/lib/geocoder/request.rb +25 -0
- data/lib/geocoder/results/amap.rb +85 -0
- data/lib/geocoder/results/baidu.rb +79 -0
- data/lib/geocoder/results/baidu_ip.rb +62 -0
- data/lib/geocoder/results/base.rb +67 -0
- data/lib/geocoder/results/bing.rb +48 -0
- data/lib/geocoder/results/dstk.rb +6 -0
- data/lib/geocoder/results/esri.rb +51 -0
- data/lib/geocoder/results/freegeoip.rb +45 -0
- data/lib/geocoder/results/geocoder_ca.rb +60 -0
- data/lib/geocoder/results/geocoder_us.rb +39 -0
- data/lib/geocoder/results/geocodio.rb +66 -0
- data/lib/geocoder/results/geoip2.rb +64 -0
- data/lib/geocoder/results/google.rb +124 -0
- data/lib/geocoder/results/google_places_details.rb +35 -0
- data/lib/geocoder/results/google_premier.rb +6 -0
- data/lib/geocoder/results/here.rb +62 -0
- data/lib/geocoder/results/mapquest.rb +51 -0
- data/lib/geocoder/results/maxmind.rb +135 -0
- data/lib/geocoder/results/maxmind_local.rb +49 -0
- data/lib/geocoder/results/nominatim.rb +94 -0
- data/lib/geocoder/results/okf.rb +106 -0
- data/lib/geocoder/results/opencagedata.rb +82 -0
- data/lib/geocoder/results/ovi.rb +62 -0
- data/lib/geocoder/results/pointpin.rb +44 -0
- data/lib/geocoder/results/postcode_anywhere_uk.rb +42 -0
- data/lib/geocoder/results/smarty_streets.rb +106 -0
- data/lib/geocoder/results/telize.rb +45 -0
- data/lib/geocoder/results/test.rb +33 -0
- data/lib/geocoder/results/yahoo.rb +55 -0
- data/lib/geocoder/results/yandex.rb +84 -0
- data/lib/geocoder/sql.rb +107 -0
- data/lib/geocoder/stores/active_record.rb +289 -0
- data/lib/geocoder/stores/base.rb +127 -0
- data/lib/geocoder/stores/mongo_base.rb +89 -0
- data/lib/geocoder/stores/mongo_mapper.rb +13 -0
- data/lib/geocoder/stores/mongoid.rb +13 -0
- data/lib/geocoder/version.rb +3 -0
- data/lib/hash_recursive_merge.rb +74 -0
- data/lib/maxmind_database.rb +109 -0
- data/lib/oauth_util.rb +112 -0
- data/lib/tasks/geocoder.rake +29 -0
- data/lib/tasks/maxmind.rake +73 -0
- data/test/fixtures/baidu_invalid_key +1 -0
- data/test/fixtures/baidu_ip_202_198_16_3 +19 -0
- data/test/fixtures/baidu_ip_invalid_key +1 -0
- data/test/fixtures/baidu_ip_no_results +1 -0
- data/test/fixtures/baidu_no_results +1 -0
- data/test/fixtures/baidu_reverse +1 -0
- data/test/fixtures/baidu_shanghai_pearl_tower +12 -0
- data/test/fixtures/bing_invalid_key +1 -0
- data/test/fixtures/bing_madison_square_garden +40 -0
- data/test/fixtures/bing_no_results +16 -0
- data/test/fixtures/bing_reverse +42 -0
- data/test/fixtures/cloudmade_invalid_key +1 -0
- data/test/fixtures/cloudmade_madison_square_garden +1 -0
- data/test/fixtures/cloudmade_no_results +1 -0
- data/test/fixtures/esri_madison_square_garden +59 -0
- data/test/fixtures/esri_no_results +8 -0
- data/test/fixtures/esri_reverse +21 -0
- data/test/fixtures/freegeoip_74_200_247_59 +12 -0
- data/test/fixtures/freegeoip_no_results +1 -0
- data/test/fixtures/geocoder_ca_madison_square_garden +1 -0
- data/test/fixtures/geocoder_ca_no_results +1 -0
- data/test/fixtures/geocoder_ca_reverse +34 -0
- data/test/fixtures/geocoder_us_madison_square_garden +1 -0
- data/test/fixtures/geocoder_us_no_results +1 -0
- data/test/fixtures/geocodio_1101_pennsylvania_ave +1 -0
- data/test/fixtures/geocodio_bad_api_key +3 -0
- data/test/fixtures/geocodio_invalid +4 -0
- data/test/fixtures/geocodio_no_results +1 -0
- data/test/fixtures/geocodio_over_query_limit +4 -0
- data/test/fixtures/google_garbage +456 -0
- data/test/fixtures/google_madison_square_garden +57 -0
- data/test/fixtures/google_no_city_data +44 -0
- data/test/fixtures/google_no_locality +51 -0
- data/test/fixtures/google_no_results +4 -0
- data/test/fixtures/google_over_limit +4 -0
- data/test/fixtures/google_places_details_invalid_request +4 -0
- data/test/fixtures/google_places_details_madison_square_garden +120 -0
- data/test/fixtures/google_places_details_no_results +4 -0
- data/test/fixtures/google_places_details_no_reviews +60 -0
- data/test/fixtures/google_places_details_no_types +66 -0
- data/test/fixtures/here_madison_square_garden +72 -0
- data/test/fixtures/here_no_results +8 -0
- data/test/fixtures/mapquest_error +16 -0
- data/test/fixtures/mapquest_invalid_api_key +16 -0
- data/test/fixtures/mapquest_invalid_request +16 -0
- data/test/fixtures/mapquest_madison_square_garden +52 -0
- data/test/fixtures/mapquest_no_results +16 -0
- data/test/fixtures/maxmind_24_24_24_21 +1 -0
- data/test/fixtures/maxmind_24_24_24_22 +1 -0
- data/test/fixtures/maxmind_24_24_24_23 +1 -0
- data/test/fixtures/maxmind_24_24_24_24 +1 -0
- data/test/fixtures/maxmind_74_200_247_59 +1 -0
- data/test/fixtures/maxmind_invalid_key +1 -0
- data/test/fixtures/maxmind_no_results +1 -0
- data/test/fixtures/nominatim_madison_square_garden +150 -0
- data/test/fixtures/nominatim_no_results +1 -0
- data/test/fixtures/nominatim_over_limit +1 -0
- data/test/fixtures/okf_kirstinmaki +67 -0
- data/test/fixtures/okf_no_results +4 -0
- data/test/fixtures/opencagedata_invalid_api_key +25 -0
- data/test/fixtures/opencagedata_invalid_request +26 -0
- data/test/fixtures/opencagedata_madison_square_garden +73 -0
- data/test/fixtures/opencagedata_no_results +29 -0
- data/test/fixtures/opencagedata_over_limit +31 -0
- data/test/fixtures/ovi_madison_square_garden +72 -0
- data/test/fixtures/ovi_no_results +8 -0
- data/test/fixtures/pointpin_10_10_10_10 +1 -0
- data/test/fixtures/pointpin_555_555_555_555 +1 -0
- data/test/fixtures/pointpin_80_111_555_555 +1 -0
- data/test/fixtures/pointpin_no_results +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_WR26NJ +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_generic_error +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_hampshire +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_key_limit_exceeded +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_no_results +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_romsey +1 -0
- data/test/fixtures/postcode_anywhere_uk_geocode_v2_00_unknown_key +1 -0
- data/test/fixtures/smarty_streets_11211 +1 -0
- data/test/fixtures/smarty_streets_madison_square_garden +47 -0
- data/test/fixtures/smarty_streets_no_results +1 -0
- data/test/fixtures/telize_10_10_10_10 +1 -0
- data/test/fixtures/telize_555_555_555_555 +4 -0
- data/test/fixtures/telize_74_200_247_59 +1 -0
- data/test/fixtures/telize_no_results +1 -0
- data/test/fixtures/yahoo_error +1 -0
- data/test/fixtures/yahoo_invalid_key +2 -0
- data/test/fixtures/yahoo_madison_square_garden +52 -0
- data/test/fixtures/yahoo_no_results +10 -0
- data/test/fixtures/yahoo_over_limit +2 -0
- data/test/fixtures/yandex_canada_rue_dupuis_14 +446 -0
- data/test/fixtures/yandex_invalid_key +1 -0
- data/test/fixtures/yandex_kremlin +48 -0
- data/test/fixtures/yandex_new_york +1 -0
- data/test/fixtures/yandex_no_city_and_town +112 -0
- data/test/fixtures/yandex_no_results +16 -0
- data/test/integration/http_client_test.rb +31 -0
- data/test/mongoid_test_helper.rb +43 -0
- data/test/test_helper.rb +416 -0
- data/test/unit/active_record_test.rb +16 -0
- data/test/unit/cache_test.rb +37 -0
- data/test/unit/calculations_test.rb +220 -0
- data/test/unit/configuration_test.rb +55 -0
- data/test/unit/error_handling_test.rb +56 -0
- data/test/unit/geocoder_test.rb +78 -0
- data/test/unit/https_test.rb +17 -0
- data/test/unit/ip_address_test.rb +27 -0
- data/test/unit/lookup_test.rb +153 -0
- data/test/unit/lookups/bing_test.rb +68 -0
- data/test/unit/lookups/dstk_test.rb +26 -0
- data/test/unit/lookups/esri_test.rb +48 -0
- data/test/unit/lookups/freegeoip_test.rb +27 -0
- data/test/unit/lookups/geocoder_ca_test.rb +17 -0
- data/test/unit/lookups/geocodio_test.rb +55 -0
- data/test/unit/lookups/geoip2_test.rb +27 -0
- data/test/unit/lookups/google_places_details_test.rb +122 -0
- data/test/unit/lookups/google_premier_test.rb +22 -0
- data/test/unit/lookups/google_test.rb +84 -0
- data/test/unit/lookups/mapquest_test.rb +60 -0
- data/test/unit/lookups/maxmind_local_test.rb +28 -0
- data/test/unit/lookups/maxmind_test.rb +63 -0
- data/test/unit/lookups/nominatim_test.rb +31 -0
- data/test/unit/lookups/okf_test.rb +38 -0
- data/test/unit/lookups/opencagedata_test.rb +64 -0
- data/test/unit/lookups/pointpin_test.rb +30 -0
- data/test/unit/lookups/postcode_anywhere_uk_test.rb +70 -0
- data/test/unit/lookups/smarty_streets_test.rb +71 -0
- data/test/unit/lookups/telize_test.rb +36 -0
- data/test/unit/lookups/yahoo_test.rb +35 -0
- data/test/unit/method_aliases_test.rb +26 -0
- data/test/unit/model_test.rb +38 -0
- data/test/unit/mongoid_test.rb +47 -0
- data/test/unit/near_test.rb +87 -0
- data/test/unit/oauth_util_test.rb +31 -0
- data/test/unit/proxy_test.rb +37 -0
- data/test/unit/query_test.rb +52 -0
- data/test/unit/rake_task_test.rb +21 -0
- data/test/unit/request_test.rb +35 -0
- data/test/unit/result_test.rb +72 -0
- data/test/unit/test_mode_test.rb +70 -0
- metadata +294 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
require 'cgi'
|
5
|
+
require 'uri'
|
6
|
+
|
7
|
+
class OauthUtilTest < GeocoderTestCase
|
8
|
+
def test_query_string_escapes_single_quote
|
9
|
+
base_url = "http://example.com?location=d'iberville"
|
10
|
+
|
11
|
+
o = OauthUtil.new
|
12
|
+
o.consumer_key = 'consumer_key'
|
13
|
+
o.consumer_secret = 'consumer_secret'
|
14
|
+
|
15
|
+
query_string = o.sign(URI.parse(base_url)).query_string
|
16
|
+
|
17
|
+
assert_match "location=d%27iberville", query_string
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_query_string_sorts_url_keys
|
21
|
+
base_url = "http://example.com?a_param=a&z_param=b&b_param=c&n_param=d"
|
22
|
+
|
23
|
+
o = OauthUtil.new
|
24
|
+
o.consumer_key = 'consumer_key'
|
25
|
+
o.consumer_secret = 'consumer_secret'
|
26
|
+
|
27
|
+
query_string = o.sign(URI.parse(base_url)).query_string
|
28
|
+
|
29
|
+
assert_match(/.*a_param=.*b_param=.*n_param=.*z_param=.*/, query_string)
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class ProxyTest < GeocoderTestCase
|
6
|
+
|
7
|
+
def test_uses_proxy_when_specified
|
8
|
+
Geocoder.configure(:http_proxy => 'localhost')
|
9
|
+
lookup = Geocoder::Lookup::Google.new
|
10
|
+
assert lookup.send(:http_client).proxy_class?
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_doesnt_use_proxy_when_not_specified
|
14
|
+
lookup = Geocoder::Lookup::Google.new
|
15
|
+
assert !lookup.send(:http_client).proxy_class?
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_exception_raised_on_bad_proxy_url
|
19
|
+
Geocoder.configure(:http_proxy => ' \\_O< Quack Quack')
|
20
|
+
assert_raise Geocoder::ConfigurationError do
|
21
|
+
Geocoder::Lookup::Google.new.send(:http_client)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_accepts_proxy_with_http_protocol
|
26
|
+
Geocoder.configure(:http_proxy => 'http://localhost')
|
27
|
+
lookup = Geocoder::Lookup::Google.new
|
28
|
+
assert lookup.send(:http_client).proxy_class?
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_accepts_proxy_with_https_protocol
|
32
|
+
Geocoder.configure(:https_proxy => 'https://localhost')
|
33
|
+
Geocoder.configure(:use_https => true)
|
34
|
+
lookup = Geocoder::Lookup::Google.new
|
35
|
+
assert lookup.send(:http_client).proxy_class?
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class QueryTest < GeocoderTestCase
|
6
|
+
|
7
|
+
def test_ip_address_detection
|
8
|
+
assert Geocoder::Query.new("232.65.123.94").ip_address?
|
9
|
+
assert Geocoder::Query.new("3ffe:0b00:0000:0000:0001:0000:0000:000a").ip_address?
|
10
|
+
assert !Geocoder::Query.new("232.65.123.94.43").ip_address?
|
11
|
+
assert !Geocoder::Query.new("::ffff:123.456.789").ip_address?
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_blank_query_detection
|
15
|
+
assert Geocoder::Query.new(nil).blank?
|
16
|
+
assert Geocoder::Query.new("").blank?
|
17
|
+
assert Geocoder::Query.new("\t ").blank?
|
18
|
+
assert !Geocoder::Query.new("a").blank?
|
19
|
+
assert !Geocoder::Query.new("Москва").blank? # no ASCII characters
|
20
|
+
assert !Geocoder::Query.new("\na").blank?
|
21
|
+
|
22
|
+
assert Geocoder::Query.new(nil, :params => {}).blank?
|
23
|
+
assert !Geocoder::Query.new(nil, :params => {:woeid => 1234567}).blank?
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_blank_query_detection_for_coordinates
|
27
|
+
assert Geocoder::Query.new([nil,nil]).blank?
|
28
|
+
assert Geocoder::Query.new([87,nil]).blank?
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_coordinates_detection
|
32
|
+
assert Geocoder::Query.new("51.178844,5").coordinates?
|
33
|
+
assert Geocoder::Query.new("51.178844, -1.826189").coordinates?
|
34
|
+
assert !Geocoder::Query.new("232.65.123").coordinates?
|
35
|
+
assert !Geocoder::Query.new("Test\n51.178844, -1.826189").coordinates?
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_loopback_ip_address
|
39
|
+
assert Geocoder::Query.new("127.0.0.1").loopback_ip_address?
|
40
|
+
assert !Geocoder::Query.new("232.65.123.234").loopback_ip_address?
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_sanitized_text_with_array
|
44
|
+
q = Geocoder::Query.new([43.1313,11.3131])
|
45
|
+
assert_equal "43.1313,11.3131", q.sanitized_text
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_custom_lookup
|
49
|
+
query = Geocoder::Query.new("address", :lookup => :nominatim)
|
50
|
+
assert_equal Geocoder::Lookup::Nominatim, query.lookup.class
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class RakeTaskTest < GeocoderTestCase
|
6
|
+
def setup
|
7
|
+
Rake.application.rake_require "tasks/geocoder"
|
8
|
+
Rake::Task.define_task(:environment)
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_rake_task_geocode_raise_specify_class_message
|
12
|
+
assert_raise(RuntimeError, "Please specify a CLASS (model)") do
|
13
|
+
Rake.application.invoke_task("geocode:all")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_rake_task_geocode_specify_class
|
18
|
+
ENV['CLASS'] = 'Place'
|
19
|
+
assert_nil Rake.application.invoke_task("geocode:all")
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class RequestTest < GeocoderTestCase
|
6
|
+
class MockRequest
|
7
|
+
include Geocoder::Request
|
8
|
+
attr_accessor :env, :ip
|
9
|
+
def initialize(env={}, ip="")
|
10
|
+
@env = env
|
11
|
+
@ip = ip
|
12
|
+
end
|
13
|
+
end
|
14
|
+
def test_http_x_real_ip
|
15
|
+
req = MockRequest.new({"HTTP_X_REAL_IP" => "74.200.247.59"})
|
16
|
+
assert req.location.is_a?(Geocoder::Result::Freegeoip)
|
17
|
+
end
|
18
|
+
def test_http_x_forwarded_for_without_proxy
|
19
|
+
req = MockRequest.new({"HTTP_X_FORWARDED_FOR" => "74.200.247.59"})
|
20
|
+
assert req.location.is_a?(Geocoder::Result::Freegeoip)
|
21
|
+
end
|
22
|
+
def test_http_x_forwarded_for_with_proxy
|
23
|
+
req = MockRequest.new({"HTTP_X_FORWARDED_FOR" => "74.200.247.59, 74.200.247.59"})
|
24
|
+
assert req.location.is_a?(Geocoder::Result::Freegeoip)
|
25
|
+
end
|
26
|
+
def test_with_request_ip
|
27
|
+
req = MockRequest.new({}, "74.200.247.59")
|
28
|
+
assert req.location.is_a?(Geocoder::Result::Freegeoip)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_with_loopback_x_forwarded_for
|
32
|
+
req = MockRequest.new({"HTTP_X_FORWARDED_FOR" => "127.0.0.1"}, "74.200.247.59")
|
33
|
+
assert_equal "US", req.location.country_code
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class ResultTest < GeocoderTestCase
|
6
|
+
|
7
|
+
def test_result_has_required_attributes
|
8
|
+
Geocoder::Lookup.all_services_except_test.each do |l|
|
9
|
+
Geocoder.configure(:lookup => l)
|
10
|
+
set_api_key!(l)
|
11
|
+
result = Geocoder.search([45.423733, -75.676333]).first
|
12
|
+
assert_result_has_required_attributes(result)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_yandex_result_without_city_does_not_raise_exception
|
17
|
+
assert_nothing_raised do
|
18
|
+
Geocoder.configure(:lookup => :yandex)
|
19
|
+
set_api_key!(:yandex)
|
20
|
+
result = Geocoder.search("no city and town").first
|
21
|
+
assert_equal "", result.city
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_yandex_result_new_york
|
26
|
+
assert_nothing_raised do
|
27
|
+
Geocoder.configure(:lookup => :yandex)
|
28
|
+
set_api_key!(:yandex)
|
29
|
+
result = Geocoder.search("new york").first
|
30
|
+
assert_equal "", result.city
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_yandex_result_kind
|
35
|
+
assert_nothing_raised do
|
36
|
+
Geocoder.configure(:lookup => :yandex)
|
37
|
+
set_api_key!(:yandex)
|
38
|
+
["new york", [45.423733, -75.676333], "no city and town"].each do |query|
|
39
|
+
Geocoder.search("new york").first.kind
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_yandex_result_without_locality_name
|
45
|
+
assert_nothing_raised do
|
46
|
+
Geocoder.configure(:lookup => :yandex)
|
47
|
+
set_api_key!(:yandex)
|
48
|
+
result = Geocoder.search("canada rue dupuis 14")[6]
|
49
|
+
assert_equal "", result.city
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
private # ------------------------------------------------------------------
|
54
|
+
|
55
|
+
def assert_result_has_required_attributes(result)
|
56
|
+
m = "Lookup #{Geocoder.config.lookup} does not support %s attribute."
|
57
|
+
assert result.coordinates.is_a?(Array), m % "coordinates"
|
58
|
+
assert result.latitude.is_a?(Float), m % "latitude"
|
59
|
+
assert result.latitude != 0.0, m % "latitude"
|
60
|
+
assert result.longitude.is_a?(Float), m % "longitude"
|
61
|
+
assert result.longitude != 0.0, m % "longitude"
|
62
|
+
assert result.city.is_a?(String), m % "city"
|
63
|
+
assert result.state.is_a?(String), m % "state"
|
64
|
+
assert result.state_code.is_a?(String), m % "state_code"
|
65
|
+
assert result.province.is_a?(String), m % "province"
|
66
|
+
assert result.province_code.is_a?(String), m % "province_code"
|
67
|
+
assert result.postal_code.is_a?(String), m % "postal_code"
|
68
|
+
assert result.country.is_a?(String), m % "country"
|
69
|
+
assert result.country_code.is_a?(String), m % "country_code"
|
70
|
+
assert_not_nil result.address, m % "address"
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$: << File.join(File.dirname(__FILE__), "..")
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class TestModeTest < GeocoderTestCase
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@_original_lookup = Geocoder.config.lookup
|
9
|
+
Geocoder.configure(:lookup => :test)
|
10
|
+
end
|
11
|
+
|
12
|
+
def teardown
|
13
|
+
Geocoder::Lookup::Test.reset
|
14
|
+
Geocoder.configure(:lookup => @_original_lookup)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_search_with_known_stub
|
18
|
+
Geocoder::Lookup::Test.add_stub("New York, NY", [mock_attributes])
|
19
|
+
|
20
|
+
results = Geocoder.search("New York, NY")
|
21
|
+
result = results.first
|
22
|
+
|
23
|
+
assert_equal 1, results.size
|
24
|
+
mock_attributes.each_key do |attr|
|
25
|
+
assert_equal mock_attributes[attr], result.send(attr)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_search_with_unknown_stub_without_default
|
30
|
+
assert_raise ArgumentError do
|
31
|
+
Geocoder.search("New York, NY")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_search_with_unknown_stub_with_default
|
36
|
+
Geocoder::Lookup::Test.set_default_stub([mock_attributes])
|
37
|
+
|
38
|
+
results = Geocoder.search("Atlantis, OC")
|
39
|
+
result = results.first
|
40
|
+
|
41
|
+
assert_equal 1, results.size
|
42
|
+
mock_attributes.keys.each do |attr|
|
43
|
+
assert_equal mock_attributes[attr], result.send(attr)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_search_with_custom_attributes
|
48
|
+
custom_attributes = mock_attributes.merge(:custom => 'NY, NY')
|
49
|
+
Geocoder::Lookup::Test.add_stub("New York, NY", [custom_attributes])
|
50
|
+
|
51
|
+
result = Geocoder.search("New York, NY").first
|
52
|
+
|
53
|
+
assert_equal 'NY, NY', result.custom
|
54
|
+
end
|
55
|
+
|
56
|
+
private
|
57
|
+
def mock_attributes
|
58
|
+
coordinates = [40.7143528, -74.0059731]
|
59
|
+
@mock_attributes ||= {
|
60
|
+
'coordinates' => coordinates,
|
61
|
+
'latitude' => coordinates[0],
|
62
|
+
'longitude' => coordinates[1],
|
63
|
+
'address' => 'New York, NY, USA',
|
64
|
+
'state' => 'New York',
|
65
|
+
'state_code' => 'NY',
|
66
|
+
'country' => 'United States',
|
67
|
+
'country_code' => 'US',
|
68
|
+
}
|
69
|
+
end
|
70
|
+
end
|
metadata
ADDED
@@ -0,0 +1,294 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: geocoder-kb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Reisner
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Provides object geocoding (by street or IP address), reverse geocoding
|
14
|
+
(coordinates to street address), distance queries for ActiveRecord and Mongoid,
|
15
|
+
result caching, and more. Designed for Rails but works with Sinatra and other Rack
|
16
|
+
frameworks too.
|
17
|
+
email:
|
18
|
+
- alex@alexreisner.com
|
19
|
+
executables:
|
20
|
+
- geocode
|
21
|
+
extensions: []
|
22
|
+
extra_rdoc_files: []
|
23
|
+
files:
|
24
|
+
- ".gitignore"
|
25
|
+
- ".travis.yml"
|
26
|
+
- CHANGELOG.md
|
27
|
+
- LICENSE
|
28
|
+
- README.md
|
29
|
+
- Rakefile
|
30
|
+
- bin/geocode
|
31
|
+
- examples/autoexpire_cache_dalli.rb
|
32
|
+
- examples/autoexpire_cache_redis.rb
|
33
|
+
- examples/cache_bypass.rb
|
34
|
+
- examples/sidekiq_worker.rb
|
35
|
+
- gemfiles/Gemfile.mongoid-2.4.x
|
36
|
+
- lib/generators/geocoder/config/config_generator.rb
|
37
|
+
- lib/generators/geocoder/config/templates/initializer.rb
|
38
|
+
- lib/generators/geocoder/maxmind/geolite_city_generator.rb
|
39
|
+
- lib/generators/geocoder/maxmind/geolite_country_generator.rb
|
40
|
+
- lib/generators/geocoder/maxmind/templates/migration/geolite_city.rb
|
41
|
+
- lib/generators/geocoder/maxmind/templates/migration/geolite_country.rb
|
42
|
+
- lib/geocoder.rb
|
43
|
+
- lib/geocoder/cache.rb
|
44
|
+
- lib/geocoder/calculations.rb
|
45
|
+
- lib/geocoder/cli.rb
|
46
|
+
- lib/geocoder/configuration.rb
|
47
|
+
- lib/geocoder/configuration_hash.rb
|
48
|
+
- lib/geocoder/exceptions.rb
|
49
|
+
- lib/geocoder/ip_address.rb
|
50
|
+
- lib/geocoder/lookup.rb
|
51
|
+
- lib/geocoder/lookups/amap.rb
|
52
|
+
- lib/geocoder/lookups/baidu.rb
|
53
|
+
- lib/geocoder/lookups/baidu_ip.rb
|
54
|
+
- lib/geocoder/lookups/base.rb
|
55
|
+
- lib/geocoder/lookups/bing.rb
|
56
|
+
- lib/geocoder/lookups/dstk.rb
|
57
|
+
- lib/geocoder/lookups/esri.rb
|
58
|
+
- lib/geocoder/lookups/freegeoip.rb
|
59
|
+
- lib/geocoder/lookups/geocoder_ca.rb
|
60
|
+
- lib/geocoder/lookups/geocoder_us.rb
|
61
|
+
- lib/geocoder/lookups/geocodio.rb
|
62
|
+
- lib/geocoder/lookups/geoip2.rb
|
63
|
+
- lib/geocoder/lookups/google.rb
|
64
|
+
- lib/geocoder/lookups/google_places_details.rb
|
65
|
+
- lib/geocoder/lookups/google_premier.rb
|
66
|
+
- lib/geocoder/lookups/here.rb
|
67
|
+
- lib/geocoder/lookups/mapquest.rb
|
68
|
+
- lib/geocoder/lookups/maxmind.rb
|
69
|
+
- lib/geocoder/lookups/maxmind_local.rb
|
70
|
+
- lib/geocoder/lookups/nominatim.rb
|
71
|
+
- lib/geocoder/lookups/okf.rb
|
72
|
+
- lib/geocoder/lookups/opencagedata.rb
|
73
|
+
- lib/geocoder/lookups/ovi.rb
|
74
|
+
- lib/geocoder/lookups/pointpin.rb
|
75
|
+
- lib/geocoder/lookups/postcode_anywhere_uk.rb
|
76
|
+
- lib/geocoder/lookups/smarty_streets.rb
|
77
|
+
- lib/geocoder/lookups/telize.rb
|
78
|
+
- lib/geocoder/lookups/test.rb
|
79
|
+
- lib/geocoder/lookups/yahoo.rb
|
80
|
+
- lib/geocoder/lookups/yandex.rb
|
81
|
+
- lib/geocoder/models/active_record.rb
|
82
|
+
- lib/geocoder/models/base.rb
|
83
|
+
- lib/geocoder/models/mongo_base.rb
|
84
|
+
- lib/geocoder/models/mongo_mapper.rb
|
85
|
+
- lib/geocoder/models/mongoid.rb
|
86
|
+
- lib/geocoder/query.rb
|
87
|
+
- lib/geocoder/railtie.rb
|
88
|
+
- lib/geocoder/request.rb
|
89
|
+
- lib/geocoder/results/amap.rb
|
90
|
+
- lib/geocoder/results/baidu.rb
|
91
|
+
- lib/geocoder/results/baidu_ip.rb
|
92
|
+
- lib/geocoder/results/base.rb
|
93
|
+
- lib/geocoder/results/bing.rb
|
94
|
+
- lib/geocoder/results/dstk.rb
|
95
|
+
- lib/geocoder/results/esri.rb
|
96
|
+
- lib/geocoder/results/freegeoip.rb
|
97
|
+
- lib/geocoder/results/geocoder_ca.rb
|
98
|
+
- lib/geocoder/results/geocoder_us.rb
|
99
|
+
- lib/geocoder/results/geocodio.rb
|
100
|
+
- lib/geocoder/results/geoip2.rb
|
101
|
+
- lib/geocoder/results/google.rb
|
102
|
+
- lib/geocoder/results/google_places_details.rb
|
103
|
+
- lib/geocoder/results/google_premier.rb
|
104
|
+
- lib/geocoder/results/here.rb
|
105
|
+
- lib/geocoder/results/mapquest.rb
|
106
|
+
- lib/geocoder/results/maxmind.rb
|
107
|
+
- lib/geocoder/results/maxmind_local.rb
|
108
|
+
- lib/geocoder/results/nominatim.rb
|
109
|
+
- lib/geocoder/results/okf.rb
|
110
|
+
- lib/geocoder/results/opencagedata.rb
|
111
|
+
- lib/geocoder/results/ovi.rb
|
112
|
+
- lib/geocoder/results/pointpin.rb
|
113
|
+
- lib/geocoder/results/postcode_anywhere_uk.rb
|
114
|
+
- lib/geocoder/results/smarty_streets.rb
|
115
|
+
- lib/geocoder/results/telize.rb
|
116
|
+
- lib/geocoder/results/test.rb
|
117
|
+
- lib/geocoder/results/yahoo.rb
|
118
|
+
- lib/geocoder/results/yandex.rb
|
119
|
+
- lib/geocoder/sql.rb
|
120
|
+
- lib/geocoder/stores/active_record.rb
|
121
|
+
- lib/geocoder/stores/base.rb
|
122
|
+
- lib/geocoder/stores/mongo_base.rb
|
123
|
+
- lib/geocoder/stores/mongo_mapper.rb
|
124
|
+
- lib/geocoder/stores/mongoid.rb
|
125
|
+
- lib/geocoder/version.rb
|
126
|
+
- lib/hash_recursive_merge.rb
|
127
|
+
- lib/maxmind_database.rb
|
128
|
+
- lib/oauth_util.rb
|
129
|
+
- lib/tasks/geocoder.rake
|
130
|
+
- lib/tasks/maxmind.rake
|
131
|
+
- test/fixtures/baidu_invalid_key
|
132
|
+
- test/fixtures/baidu_ip_202_198_16_3
|
133
|
+
- test/fixtures/baidu_ip_invalid_key
|
134
|
+
- test/fixtures/baidu_ip_no_results
|
135
|
+
- test/fixtures/baidu_no_results
|
136
|
+
- test/fixtures/baidu_reverse
|
137
|
+
- test/fixtures/baidu_shanghai_pearl_tower
|
138
|
+
- test/fixtures/bing_invalid_key
|
139
|
+
- test/fixtures/bing_madison_square_garden
|
140
|
+
- test/fixtures/bing_no_results
|
141
|
+
- test/fixtures/bing_reverse
|
142
|
+
- test/fixtures/cloudmade_invalid_key
|
143
|
+
- test/fixtures/cloudmade_madison_square_garden
|
144
|
+
- test/fixtures/cloudmade_no_results
|
145
|
+
- test/fixtures/esri_madison_square_garden
|
146
|
+
- test/fixtures/esri_no_results
|
147
|
+
- test/fixtures/esri_reverse
|
148
|
+
- test/fixtures/freegeoip_74_200_247_59
|
149
|
+
- test/fixtures/freegeoip_no_results
|
150
|
+
- test/fixtures/geocoder_ca_madison_square_garden
|
151
|
+
- test/fixtures/geocoder_ca_no_results
|
152
|
+
- test/fixtures/geocoder_ca_reverse
|
153
|
+
- test/fixtures/geocoder_us_madison_square_garden
|
154
|
+
- test/fixtures/geocoder_us_no_results
|
155
|
+
- test/fixtures/geocodio_1101_pennsylvania_ave
|
156
|
+
- test/fixtures/geocodio_bad_api_key
|
157
|
+
- test/fixtures/geocodio_invalid
|
158
|
+
- test/fixtures/geocodio_no_results
|
159
|
+
- test/fixtures/geocodio_over_query_limit
|
160
|
+
- test/fixtures/google_garbage
|
161
|
+
- test/fixtures/google_madison_square_garden
|
162
|
+
- test/fixtures/google_no_city_data
|
163
|
+
- test/fixtures/google_no_locality
|
164
|
+
- test/fixtures/google_no_results
|
165
|
+
- test/fixtures/google_over_limit
|
166
|
+
- test/fixtures/google_places_details_invalid_request
|
167
|
+
- test/fixtures/google_places_details_madison_square_garden
|
168
|
+
- test/fixtures/google_places_details_no_results
|
169
|
+
- test/fixtures/google_places_details_no_reviews
|
170
|
+
- test/fixtures/google_places_details_no_types
|
171
|
+
- test/fixtures/here_madison_square_garden
|
172
|
+
- test/fixtures/here_no_results
|
173
|
+
- test/fixtures/mapquest_error
|
174
|
+
- test/fixtures/mapquest_invalid_api_key
|
175
|
+
- test/fixtures/mapquest_invalid_request
|
176
|
+
- test/fixtures/mapquest_madison_square_garden
|
177
|
+
- test/fixtures/mapquest_no_results
|
178
|
+
- test/fixtures/maxmind_24_24_24_21
|
179
|
+
- test/fixtures/maxmind_24_24_24_22
|
180
|
+
- test/fixtures/maxmind_24_24_24_23
|
181
|
+
- test/fixtures/maxmind_24_24_24_24
|
182
|
+
- test/fixtures/maxmind_74_200_247_59
|
183
|
+
- test/fixtures/maxmind_invalid_key
|
184
|
+
- test/fixtures/maxmind_no_results
|
185
|
+
- test/fixtures/nominatim_madison_square_garden
|
186
|
+
- test/fixtures/nominatim_no_results
|
187
|
+
- test/fixtures/nominatim_over_limit
|
188
|
+
- test/fixtures/okf_kirstinmaki
|
189
|
+
- test/fixtures/okf_no_results
|
190
|
+
- test/fixtures/opencagedata_invalid_api_key
|
191
|
+
- test/fixtures/opencagedata_invalid_request
|
192
|
+
- test/fixtures/opencagedata_madison_square_garden
|
193
|
+
- test/fixtures/opencagedata_no_results
|
194
|
+
- test/fixtures/opencagedata_over_limit
|
195
|
+
- test/fixtures/ovi_madison_square_garden
|
196
|
+
- test/fixtures/ovi_no_results
|
197
|
+
- test/fixtures/pointpin_10_10_10_10
|
198
|
+
- test/fixtures/pointpin_555_555_555_555
|
199
|
+
- test/fixtures/pointpin_80_111_555_555
|
200
|
+
- test/fixtures/pointpin_no_results
|
201
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_WR26NJ
|
202
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_generic_error
|
203
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_hampshire
|
204
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_key_limit_exceeded
|
205
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_no_results
|
206
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_romsey
|
207
|
+
- test/fixtures/postcode_anywhere_uk_geocode_v2_00_unknown_key
|
208
|
+
- test/fixtures/smarty_streets_11211
|
209
|
+
- test/fixtures/smarty_streets_madison_square_garden
|
210
|
+
- test/fixtures/smarty_streets_no_results
|
211
|
+
- test/fixtures/telize_10_10_10_10
|
212
|
+
- test/fixtures/telize_555_555_555_555
|
213
|
+
- test/fixtures/telize_74_200_247_59
|
214
|
+
- test/fixtures/telize_no_results
|
215
|
+
- test/fixtures/yahoo_error
|
216
|
+
- test/fixtures/yahoo_invalid_key
|
217
|
+
- test/fixtures/yahoo_madison_square_garden
|
218
|
+
- test/fixtures/yahoo_no_results
|
219
|
+
- test/fixtures/yahoo_over_limit
|
220
|
+
- test/fixtures/yandex_canada_rue_dupuis_14
|
221
|
+
- test/fixtures/yandex_invalid_key
|
222
|
+
- test/fixtures/yandex_kremlin
|
223
|
+
- test/fixtures/yandex_new_york
|
224
|
+
- test/fixtures/yandex_no_city_and_town
|
225
|
+
- test/fixtures/yandex_no_results
|
226
|
+
- test/integration/http_client_test.rb
|
227
|
+
- test/mongoid_test_helper.rb
|
228
|
+
- test/test_helper.rb
|
229
|
+
- test/unit/active_record_test.rb
|
230
|
+
- test/unit/cache_test.rb
|
231
|
+
- test/unit/calculations_test.rb
|
232
|
+
- test/unit/configuration_test.rb
|
233
|
+
- test/unit/error_handling_test.rb
|
234
|
+
- test/unit/geocoder_test.rb
|
235
|
+
- test/unit/https_test.rb
|
236
|
+
- test/unit/ip_address_test.rb
|
237
|
+
- test/unit/lookup_test.rb
|
238
|
+
- test/unit/lookups/bing_test.rb
|
239
|
+
- test/unit/lookups/dstk_test.rb
|
240
|
+
- test/unit/lookups/esri_test.rb
|
241
|
+
- test/unit/lookups/freegeoip_test.rb
|
242
|
+
- test/unit/lookups/geocoder_ca_test.rb
|
243
|
+
- test/unit/lookups/geocodio_test.rb
|
244
|
+
- test/unit/lookups/geoip2_test.rb
|
245
|
+
- test/unit/lookups/google_places_details_test.rb
|
246
|
+
- test/unit/lookups/google_premier_test.rb
|
247
|
+
- test/unit/lookups/google_test.rb
|
248
|
+
- test/unit/lookups/mapquest_test.rb
|
249
|
+
- test/unit/lookups/maxmind_local_test.rb
|
250
|
+
- test/unit/lookups/maxmind_test.rb
|
251
|
+
- test/unit/lookups/nominatim_test.rb
|
252
|
+
- test/unit/lookups/okf_test.rb
|
253
|
+
- test/unit/lookups/opencagedata_test.rb
|
254
|
+
- test/unit/lookups/pointpin_test.rb
|
255
|
+
- test/unit/lookups/postcode_anywhere_uk_test.rb
|
256
|
+
- test/unit/lookups/smarty_streets_test.rb
|
257
|
+
- test/unit/lookups/telize_test.rb
|
258
|
+
- test/unit/lookups/yahoo_test.rb
|
259
|
+
- test/unit/method_aliases_test.rb
|
260
|
+
- test/unit/model_test.rb
|
261
|
+
- test/unit/mongoid_test.rb
|
262
|
+
- test/unit/near_test.rb
|
263
|
+
- test/unit/oauth_util_test.rb
|
264
|
+
- test/unit/proxy_test.rb
|
265
|
+
- test/unit/query_test.rb
|
266
|
+
- test/unit/rake_task_test.rb
|
267
|
+
- test/unit/request_test.rb
|
268
|
+
- test/unit/result_test.rb
|
269
|
+
- test/unit/test_mode_test.rb
|
270
|
+
homepage: https://github.com/huacnlee/geocoder
|
271
|
+
licenses: []
|
272
|
+
metadata: {}
|
273
|
+
post_install_message:
|
274
|
+
rdoc_options: []
|
275
|
+
require_paths:
|
276
|
+
- lib
|
277
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
278
|
+
requirements:
|
279
|
+
- - ">="
|
280
|
+
- !ruby/object:Gem::Version
|
281
|
+
version: '0'
|
282
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
283
|
+
requirements:
|
284
|
+
- - ">="
|
285
|
+
- !ruby/object:Gem::Version
|
286
|
+
version: '0'
|
287
|
+
requirements: []
|
288
|
+
rubyforge_project:
|
289
|
+
rubygems_version: 2.4.2
|
290
|
+
signing_key:
|
291
|
+
specification_version: 4
|
292
|
+
summary: Complete geocoding solution for Ruby.
|
293
|
+
test_files: []
|
294
|
+
has_rdoc:
|