geocoder 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of geocoder might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +13 -1
- data/README.md +9 -9
- data/examples/sidekiq_worker.rb +16 -0
- data/lib/geocoder.rb +0 -1
- data/lib/geocoder/exceptions.rb +8 -0
- data/lib/geocoder/lookup.rb +4 -2
- data/lib/geocoder/lookups/base.rb +2 -2
- data/lib/geocoder/lookups/google.rb +2 -1
- data/lib/geocoder/lookups/maxmind_local.rb +8 -1
- data/lib/geocoder/lookups/okf.rb +2 -1
- data/lib/geocoder/results/freegeoip.rb +1 -1
- data/lib/geocoder/results/geocodio.rb +4 -0
- data/lib/geocoder/results/nominatim.rb +1 -1
- data/lib/geocoder/results/yandex.rb +2 -1
- data/lib/geocoder/version.rb +1 -1
- data/test/fixtures/geocodio_1101_pennsylvania_ave +1 -1
- data/test/fixtures/yandex_no_administrative_area +53 -0
- data/test/test_helper.rb +12 -5
- data/test/unit/error_handling_test.rb +23 -0
- data/test/unit/lookups/geocodio_test.rb +3 -2
- data/test/unit/result_test.rb +9 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e80b63580339ffae3893ed71c9cb97081c2b63eb
|
4
|
+
data.tar.gz: a133f7574566f3dccca311af4cac43a9e661533a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1302d7eabd3c367075ae4af684833e9cbb5af3dcce856716ece5bbb5eba4933fc001235b2638861943362678a6187a029c2f6184f285ab4ed525b2d68b9eca4
|
7
|
+
data.tar.gz: 94690e53ca9f0b17f0b56a96b2eb4184c5fe96f2ee769eefc1f5f6ecc07c7a334d9fa6cf6a5ef3f986771c5aeaeae1c8566d21b2fbbaebf4c75e6b62a963836f
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,8 +3,20 @@ Changelog
|
|
3
3
|
|
4
4
|
Major changes to Geocoder for each release. Please see the Git log for complete list of changes.
|
5
5
|
|
6
|
-
1.2.
|
6
|
+
1.2.7 (2015 Jan 24)
|
7
7
|
-------------------
|
8
|
+
* DROP SUPPORT for Ruby 1.9.2.
|
9
|
+
* Use UTF-8 encoding for maxmind_local results (thanks github.com/ellmo).
|
10
|
+
* Update freegeoip response handling (thanks github.com/hosamaly).
|
11
|
+
* Update nominatim response handling (thanks github.com/jsantos).
|
12
|
+
* Update yandex response handling (thanks github.com/wfleming).
|
13
|
+
* Update geocodio response handling (thanks github.com/getsidewalk).
|
14
|
+
* Add ability to raise exception when response parsing fails (thanks github.com/spiderpug).
|
15
|
+
* Fix double-loading of Railtie (thanks github.com/wfleming and zhouguangming).
|
16
|
+
|
17
|
+
|
18
|
+
1.2.6 (2014 Nov 8)
|
19
|
+
------------------
|
8
20
|
* Add :geoip2 lookup (thanks github.com/ChristianHoj).
|
9
21
|
* Add :okf lookup (thanks github.com/kakoni).
|
10
22
|
* Add :postcode_anywhere_uk lookup (thanks github.com/rob-murray).
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Geocoder is a complete geocoding solution for Ruby. With Rails it adds geocoding
|
|
7
7
|
Compatibility
|
8
8
|
-------------
|
9
9
|
|
10
|
-
* Supports multiple Ruby versions: Ruby 1.9.
|
10
|
+
* Supports multiple Ruby versions: Ruby 1.9.3, 2.0.x, 2.1.x, JRuby, and Rubinius.
|
11
11
|
* Supports multiple databases: MySQL, PostgreSQL, SQLite, and MongoDB (1.7.0 and higher).
|
12
12
|
* Supports Rails 3 and 4. If you need to use it with Rails 2 please see the `rails2` branch (no longer maintained, limited feature set).
|
13
13
|
* Works very well outside of Rails, you just need to install either the `json` (for MRI) or `json_pure` (for JRuby) gem.
|
@@ -28,7 +28,7 @@ Install Geocoder like any other Ruby gem:
|
|
28
28
|
|
29
29
|
Or, if you're using Rails/Bundler, add this to your Gemfile:
|
30
30
|
|
31
|
-
gem
|
31
|
+
gem 'geocoder'
|
32
32
|
|
33
33
|
and run at the command prompt:
|
34
34
|
|
@@ -139,8 +139,8 @@ Location-Aware Database Queries
|
|
139
139
|
To find objects by location, use the following scopes:
|
140
140
|
|
141
141
|
Venue.near('Omaha, NE, US', 20) # venues within 20 miles of Omaha
|
142
|
-
Venue.near([40.71, 100.23], 20) # venues within 20 miles of a point
|
143
|
-
Venue.near([40.71, 100.23], 20, :units => :km)
|
142
|
+
Venue.near([40.71, -100.23], 20) # venues within 20 miles of a point
|
143
|
+
Venue.near([40.71, -100.23], 20, :units => :km)
|
144
144
|
# venues within 20 kilometres of a point
|
145
145
|
Venue.geocoded # venues with coordinates
|
146
146
|
Venue.not_geocoded # venues without coordinates
|
@@ -690,7 +690,7 @@ This lookup provides methods for geocoding IP addresses without making a call to
|
|
690
690
|
You can generate ActiveRecord migrations and download and import data via provided rake tasks:
|
691
691
|
|
692
692
|
# generate migration to create tables
|
693
|
-
rails generate geocoder:maxmind:
|
693
|
+
rails generate geocoder:maxmind:geolite_city
|
694
694
|
|
695
695
|
# download, unpack, and import data
|
696
696
|
rake geocoder:maxmind:geolite:load PACKAGE=city
|
@@ -733,7 +733,7 @@ This lookup provides methods for geocoding IP addresses without making a call to
|
|
733
733
|
You must add either the *[hive_geoip2](https://rubygems.org/gems/hive_geoip2)* gem (native extension that relies on libmaxminddb) or the *[maxminddb](http://rubygems.org/gems/maxminddb)* gem (pure Ruby implementation) to your Gemfile or have it installed in your system. The pure Ruby gem (maxminddb) will be used by default. To use `hive_geoip2`:
|
734
734
|
|
735
735
|
Geocoder.configure(
|
736
|
-
ip_lookup: :geoip2,
|
736
|
+
ip_lookup: :geoip2,
|
737
737
|
geoip2: {
|
738
738
|
lib: 'hive_geoip2',
|
739
739
|
file: File.join('folder', 'GeoLite2-City.mmdb')
|
@@ -1034,9 +1034,10 @@ Reporting Issues
|
|
1034
1034
|
|
1035
1035
|
When reporting an issue, please list the version of Geocoder you are using and any relevant information about your application (Rails version, database type and version, etc). Also avoid vague language like "it doesn't work." Please describe as specifically as you can what behavior your are actually seeing (eg: an error message? a nil return value?).
|
1036
1036
|
|
1037
|
+
Please DO NOT use GitHub issues to ask questions about how to use Geocoder. Sites like StackOverflow are a better forum for such discussions.
|
1038
|
+
|
1037
1039
|
|
1038
|
-
Known Issue
|
1039
|
-
-----------
|
1040
|
+
### Known Issue
|
1040
1041
|
|
1041
1042
|
You cannot use the `near` scope with another scope that provides an `includes` option because the `SELECT` clause generated by `near` will overwrite it (or vice versa).
|
1042
1043
|
|
@@ -1064,7 +1065,6 @@ Contributions are welcome via pull requests on Github. Please respect the follow
|
|
1064
1065
|
* Do not add dependencies on other gems.
|
1065
1066
|
* Do not add unnecessary `require` statements which could cause LoadErrors on certain systems.
|
1066
1067
|
* Remember: Geocoder needs to run outside of Rails. Don't assume things like ActiveSupport are available.
|
1067
|
-
* Do not add to base configuration options; instead document required lookup-specific options in the README.
|
1068
1068
|
* Be willing to accept criticism and work on improving your code; Geocoder is used by thousands of developers and care must be taken not to introduce bugs.
|
1069
1069
|
* Be aware that the pull request review process is not immediate, and is generally proportional to the size of the pull request.
|
1070
1070
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This class implements a Sidekiq worker for performing geocoding
|
2
|
+
# asynchronously. Do something like this in your controller:
|
3
|
+
#
|
4
|
+
# if @object.save
|
5
|
+
# GeocoderWorker.perform_async(@object.id)
|
6
|
+
# end
|
7
|
+
#
|
8
|
+
class GeocoderWorker
|
9
|
+
include Sidekiq::Worker
|
10
|
+
|
11
|
+
def perform(object_id)
|
12
|
+
object = Object.find(object_id)
|
13
|
+
object.geocode
|
14
|
+
object.save!
|
15
|
+
end
|
16
|
+
end
|
data/lib/geocoder.rb
CHANGED
data/lib/geocoder/exceptions.rb
CHANGED
data/lib/geocoder/lookup.rb
CHANGED
@@ -20,7 +20,7 @@ module Geocoder
|
|
20
20
|
# All street address lookup services, default first.
|
21
21
|
#
|
22
22
|
def street_services
|
23
|
-
[
|
23
|
+
@street_services ||= [
|
24
24
|
:dstk,
|
25
25
|
:esri,
|
26
26
|
:google,
|
@@ -49,7 +49,7 @@ module Geocoder
|
|
49
49
|
# All IP address lookup services, default first.
|
50
50
|
#
|
51
51
|
def ip_services
|
52
|
-
[
|
52
|
+
@ip_services ||= [
|
53
53
|
:baidu_ip,
|
54
54
|
:freegeoip,
|
55
55
|
:geoip2,
|
@@ -60,6 +60,8 @@ module Geocoder
|
|
60
60
|
]
|
61
61
|
end
|
62
62
|
|
63
|
+
attr_writer :street_services, :ip_services
|
64
|
+
|
63
65
|
##
|
64
66
|
# Retrieve a Lookup object from the store.
|
65
67
|
# Use this instead of Geocoder::Lookup::X.new to get an
|
@@ -182,6 +182,8 @@ module Geocoder
|
|
182
182
|
else
|
183
183
|
JSON.parse(data)
|
184
184
|
end
|
185
|
+
rescue => err
|
186
|
+
raise_error(ResponseParseError.new(data)) or warn "Geocoding API's response was not valid JSON."
|
185
187
|
end
|
186
188
|
|
187
189
|
##
|
@@ -189,8 +191,6 @@ module Geocoder
|
|
189
191
|
#
|
190
192
|
def parse_raw_data(raw_data)
|
191
193
|
parse_json(raw_data)
|
192
|
-
rescue
|
193
|
-
warn "Geocoding API's response was not valid JSON."
|
194
194
|
end
|
195
195
|
|
196
196
|
##
|
@@ -19,7 +19,8 @@ module Geocoder::Lookup
|
|
19
19
|
private # ---------------------------------------------------------------
|
20
20
|
|
21
21
|
def valid_response?(response)
|
22
|
-
|
22
|
+
json = parse_json(response.body)
|
23
|
+
status = json["status"] if json
|
23
24
|
super(response) and ['OK', 'ZERO_RESULTS'].include?(status)
|
24
25
|
end
|
25
26
|
|
@@ -31,7 +31,7 @@ module Geocoder::Lookup
|
|
31
31
|
if configuration[:file]
|
32
32
|
geoip_class = RUBY_PLATFORM == "java" ? JGeoIP : GeoIP
|
33
33
|
result = geoip_class.new(configuration[:file]).city(query.to_s)
|
34
|
-
result.nil? ? [] : [result.to_hash]
|
34
|
+
result.nil? ? [] : [encode_hash(result.to_hash)]
|
35
35
|
elsif configuration[:package] == :city
|
36
36
|
addr = IPAddr.new(query.text).to_i
|
37
37
|
q = "SELECT l.country, l.region, l.city, l.latitude, l.longitude
|
@@ -46,6 +46,13 @@ module Geocoder::Lookup
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
def encode_hash(hash, encoding = "UTF-8")
|
50
|
+
hash.inject({}) do |h,i|
|
51
|
+
h[i[0]] = i[1].is_a?(String) ? i[1].encode(encoding) : i[1]
|
52
|
+
h
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
49
56
|
def format_result(query, attr_names)
|
50
57
|
if r = ActiveRecord::Base.connection.execute(query).first
|
51
58
|
r = r.values if r.is_a?(Hash) # some db adapters return Hash, some Array
|
data/lib/geocoder/lookups/okf.rb
CHANGED
@@ -15,7 +15,8 @@ module Geocoder::Lookup
|
|
15
15
|
private # ---------------------------------------------------------------
|
16
16
|
|
17
17
|
def valid_response?(response)
|
18
|
-
|
18
|
+
json = parse_json(response.body)
|
19
|
+
status = json["status"] if json
|
19
20
|
super(response) and ['OK', 'ZERO_RESULTS'].include?(status)
|
20
21
|
end
|
21
22
|
|
@@ -4,7 +4,7 @@ module Geocoder::Result
|
|
4
4
|
class Nominatim < Base
|
5
5
|
|
6
6
|
def poi
|
7
|
-
%w[stadium bus_stop tram_stop].each do |key|
|
7
|
+
%w[building university school hospital mall hotel restaurant stadium bus_stop tram_stop].each do |key|
|
8
8
|
return @data['address'][key] if @data['address'].key?(key)
|
9
9
|
end
|
10
10
|
return nil
|
@@ -14,7 +14,8 @@ module Geocoder::Result
|
|
14
14
|
def city
|
15
15
|
if state.empty? and address_details.has_key? 'Locality'
|
16
16
|
address_details['Locality']['LocalityName']
|
17
|
-
elsif sub_state.empty? and address_details
|
17
|
+
elsif sub_state.empty? and address_details.has_key? 'AdministrativeArea' and
|
18
|
+
address_details['AdministrativeArea'].has_key? 'Locality'
|
18
19
|
address_details['AdministrativeArea']['Locality']['LocalityName']
|
19
20
|
elsif not sub_state_city.empty?
|
20
21
|
sub_state_city
|
data/lib/geocoder/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"input":{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","city":"Washington","state":"DC"},"formatted_address":"1101 Pennsylvania Ave NW, Washington DC"},"results":[{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","city":"Washington","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington DC
|
1
|
+
{"input":{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","state":"DC"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC"},"results":[{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","county":"District of Columbia","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC 20004","location":{"lat":38.895019,"lng":-77.028095},"accuracy":1,"accuracy_type":"range_interpolation"},{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","county":"District of Columbia","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC 20004","location":{"lat":38.895016122449,"lng":-77.028084377551},"accuracy":0.8,"accuracy_type":"range_interpolation"}]}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
{
|
2
|
+
"response":{
|
3
|
+
"GeoObjectCollection":{
|
4
|
+
"metaDataProperty":{
|
5
|
+
"GeocoderResponseMetaData":{
|
6
|
+
"request":"13.813139,100.560291",
|
7
|
+
"found":"1",
|
8
|
+
"results":"1",
|
9
|
+
"Point":{
|
10
|
+
"pos":"13.813139 100.560291"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"featureMember":[
|
15
|
+
{
|
16
|
+
"GeoObject":{
|
17
|
+
"metaDataProperty":{
|
18
|
+
"GeocoderMetaData":{
|
19
|
+
"kind":"house",
|
20
|
+
"text":"Thailand, Phahon Yothin Road, 1130/5",
|
21
|
+
"precision":"exact",
|
22
|
+
"AddressDetails":{
|
23
|
+
"Country":{
|
24
|
+
"AddressLine":"Phahon Yothin Road, 1130/5",
|
25
|
+
"CountryNameCode":"TH",
|
26
|
+
"CountryName":"Thailand",
|
27
|
+
"Thoroughfare":{
|
28
|
+
"ThoroughfareName":"Phahon Yothin Road",
|
29
|
+
"Premise":{
|
30
|
+
"PremiseNumber":"1130/5"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"description":"Thailand",
|
38
|
+
"name":"Phahon Yothin Road, 1130/5",
|
39
|
+
"boundedBy":{
|
40
|
+
"Envelope":{
|
41
|
+
"lowerCorner":"100.552005 13.805102",
|
42
|
+
"upperCorner":"100.568462 13.821184"
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"Point":{
|
46
|
+
"pos":"100.560234 13.813143"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
data/test/test_helper.rb
CHANGED
@@ -67,6 +67,9 @@ end
|
|
67
67
|
require 'geocoder'
|
68
68
|
require "geocoder/lookups/base"
|
69
69
|
|
70
|
+
# and initialize Railtie manually (since Rails::Railtie doesn't exist)
|
71
|
+
Geocoder::Railtie.insert
|
72
|
+
|
70
73
|
##
|
71
74
|
# Mock HTTP request to geocoding service.
|
72
75
|
#
|
@@ -81,11 +84,7 @@ module Geocoder
|
|
81
84
|
def read_fixture(file)
|
82
85
|
filepath = File.join("test", "fixtures", file)
|
83
86
|
s = File.read(filepath).strip.gsub(/\n\s*/, "")
|
84
|
-
|
85
|
-
def body; self; end
|
86
|
-
def code; "200"; end
|
87
|
-
end
|
88
|
-
s
|
87
|
+
MockHttpResponse.new(body: s, code: "200")
|
89
88
|
end
|
90
89
|
|
91
90
|
##
|
@@ -111,6 +110,10 @@ module Geocoder
|
|
111
110
|
raise TimeoutError if query.text == "timeout"
|
112
111
|
raise SocketError if query.text == "socket_error"
|
113
112
|
raise Errno::ECONNREFUSED if query.text == "connection_refused"
|
113
|
+
if query.text == "invalid_json"
|
114
|
+
return MockHttpResponse.new(:body => 'invalid json', :code => 200)
|
115
|
+
end
|
116
|
+
|
114
117
|
read_fixture fixture_for_query(query)
|
115
118
|
end
|
116
119
|
end
|
@@ -413,4 +416,8 @@ class MockHttpResponse
|
|
413
416
|
@code = options[:code].to_s
|
414
417
|
@body = options[:body]
|
415
418
|
end
|
419
|
+
|
420
|
+
def [](key)
|
421
|
+
send key if respond_to?(key)
|
422
|
+
end
|
416
423
|
end
|
@@ -18,6 +18,29 @@ class ErrorHandlingTest < GeocoderTestCase
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
def test_always_raise_response_parse_error
|
22
|
+
Geocoder.configure(:always_raise => [Geocoder::ResponseParseError])
|
23
|
+
[:freegeoip, :google, :okf].each do |l|
|
24
|
+
lookup = Geocoder::Lookup.get(l)
|
25
|
+
set_api_key!(l)
|
26
|
+
assert_raises Geocoder::ResponseParseError do
|
27
|
+
lookup.send(:results, Geocoder::Query.new("invalid_json"))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_never_raise_response_parse_error
|
33
|
+
[:freegeoip, :google, :okf].each do |l|
|
34
|
+
lookup = Geocoder::Lookup.get(l)
|
35
|
+
set_api_key!(l)
|
36
|
+
silence_warnings do
|
37
|
+
assert_nothing_raised do
|
38
|
+
lookup.send(:results, Geocoder::Query.new("invalid_json"))
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
21
44
|
def test_always_raise_timeout_error
|
22
45
|
Geocoder.configure(:always_raise => [TimeoutError])
|
23
46
|
Geocoder::Lookup.all_services_except_test.each do |l|
|
@@ -13,13 +13,14 @@ class GeocodioTest < GeocoderTestCase
|
|
13
13
|
result = Geocoder.search("1101 Pennsylvania Ave NW, Washington DC").first
|
14
14
|
assert_equal 1.0, result.accuracy
|
15
15
|
assert_equal "1101", result.number
|
16
|
+
assert_equal "1101 Pennsylvania Ave NW", result.street_address
|
16
17
|
assert_equal "Ave", result.suffix
|
17
18
|
assert_equal "DC", result.state
|
18
19
|
assert_equal "20004", result.zip
|
19
20
|
assert_equal "NW", result.postdirectional
|
20
21
|
assert_equal "Washington", result.city
|
21
|
-
assert_equal "1101 Pennsylvania Ave NW, Washington DC
|
22
|
-
assert_equal({ "lat" =>
|
22
|
+
assert_equal "1101 Pennsylvania Ave NW, Washington, DC 20004", result.formatted_address
|
23
|
+
assert_equal({ "lat" => 38.895019, "lng" => -77.028095 }, result.location)
|
23
24
|
end
|
24
25
|
|
25
26
|
def test_no_results
|
data/test/unit/result_test.rb
CHANGED
@@ -22,6 +22,15 @@ class ResultTest < GeocoderTestCase
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_yandex_result_without_admin_area_no_exception
|
26
|
+
assert_nothing_raised do
|
27
|
+
Geocoder.configure(:lookup => :yandex)
|
28
|
+
set_api_key!(:yandex)
|
29
|
+
result = Geocoder.search("no administrative area").first
|
30
|
+
assert_equal "", result.city
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
25
34
|
def test_yandex_result_new_york
|
26
35
|
assert_nothing_raised do
|
27
36
|
Geocoder.configure(:lookup => :yandex)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Reisner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides object geocoding (by street or IP address), reverse geocoding
|
14
14
|
(coordinates to street address), distance queries for ActiveRecord and Mongoid,
|
@@ -31,6 +31,7 @@ files:
|
|
31
31
|
- examples/autoexpire_cache_dalli.rb
|
32
32
|
- examples/autoexpire_cache_redis.rb
|
33
33
|
- examples/cache_bypass.rb
|
34
|
+
- examples/sidekiq_worker.rb
|
34
35
|
- gemfiles/Gemfile.mongoid-2.4.x
|
35
36
|
- lib/generators/geocoder/config/config_generator.rb
|
36
37
|
- lib/generators/geocoder/config/templates/initializer.rb
|
@@ -218,6 +219,7 @@ files:
|
|
218
219
|
- test/fixtures/yandex_invalid_key
|
219
220
|
- test/fixtures/yandex_kremlin
|
220
221
|
- test/fixtures/yandex_new_york
|
222
|
+
- test/fixtures/yandex_no_administrative_area
|
221
223
|
- test/fixtures/yandex_no_city_and_town
|
222
224
|
- test/fixtures/yandex_no_results
|
223
225
|
- test/integration/http_client_test.rb
|
@@ -265,7 +267,8 @@ files:
|
|
265
267
|
- test/unit/result_test.rb
|
266
268
|
- test/unit/test_mode_test.rb
|
267
269
|
homepage: http://www.rubygeocoder.com
|
268
|
-
licenses:
|
270
|
+
licenses:
|
271
|
+
- MIT
|
269
272
|
metadata: {}
|
270
273
|
post_install_message:
|
271
274
|
rdoc_options: []
|
@@ -275,7 +278,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
275
278
|
requirements:
|
276
279
|
- - ">="
|
277
280
|
- !ruby/object:Gem::Version
|
278
|
-
version:
|
281
|
+
version: 1.9.3
|
279
282
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
283
|
requirements:
|
281
284
|
- - ">="
|
@@ -283,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
286
|
version: '0'
|
284
287
|
requirements: []
|
285
288
|
rubyforge_project:
|
286
|
-
rubygems_version: 2.
|
289
|
+
rubygems_version: 2.4.5
|
287
290
|
signing_key:
|
288
291
|
specification_version: 4
|
289
292
|
summary: Complete geocoding solution for Ruby.
|