geokit-rails 2.0.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of geokit-rails might be problematic. Click here for more details.
- checksums.yaml +6 -14
- data/.gitignore +37 -0
- data/.travis.yml +29 -0
- data/CHANGELOG.md +96 -0
- data/CONFIG.markdown +67 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +20 -0
- data/README.markdown +726 -0
- data/Rakefile +17 -0
- data/gemfiles/rails3.gemfile +7 -0
- data/gemfiles/rails4.gemfile +8 -0
- data/gemfiles/rails5.gemfile +8 -0
- data/geokit-rails.gemspec +33 -0
- data/lib/generators/geokit_rails/install_generator.rb +13 -0
- data/lib/generators/templates/geokit_config.rb +100 -0
- data/lib/geokit-rails.rb +0 -1
- data/lib/geokit-rails/acts_as_mappable.rb +87 -37
- data/lib/geokit-rails/adapters/oracleenhanced.rb +32 -0
- data/lib/geokit-rails/adapters/sqlite.rb +2 -2
- data/lib/geokit-rails/adapters/sqlserver.rb +19 -17
- data/lib/geokit-rails/geocoder_control.rb +7 -6
- data/lib/geokit-rails/ip_geocode_lookup.rb +17 -13
- data/lib/geokit-rails/railtie.rb +0 -1
- data/lib/geokit-rails/version.rb +1 -1
- data/test/acts_as_mappable_test.rb +30 -6
- data/test/boot.rb +3 -3
- data/test/fixtures/companies.yml +3 -1
- data/test/fixtures/custom_locations.yml +8 -1
- data/test/fixtures/locations.yml +8 -1
- data/test/schema.rb +1 -0
- data/test/test_helper.rb +17 -5
- metadata +120 -92
- data/lib/geokit-rails/defaults.rb +0 -21
- data/test/mysql-debug.log +0 -1057
- data/test/mysql2-debug.log +0 -2758
- data/test/mysql2spatial-debug.log +0 -3619
- data/test/postgres-debug.log +0 -1
- data/test/postgresql-debug.log +0 -1
- data/test/sqlite-debug.log +0 -67286
- data/test/test.sqlite3 +0 -0
@@ -3,7 +3,7 @@ module Geokit
|
|
3
3
|
class SQLite < Abstract
|
4
4
|
|
5
5
|
def self.add_numeric(name)
|
6
|
-
@@connection.create_function name, 1,
|
6
|
+
@@connection.create_function name, 1, SQLite3::Constants::TextRep::ANY do |func, *args|
|
7
7
|
func.result = yield(*args)
|
8
8
|
end
|
9
9
|
end
|
@@ -50,4 +50,4 @@ module Geokit
|
|
50
50
|
|
51
51
|
end
|
52
52
|
end
|
53
|
-
end
|
53
|
+
end
|
@@ -1,28 +1,30 @@
|
|
1
1
|
module Geokit
|
2
2
|
module Adapters
|
3
3
|
class SQLServer < Abstract
|
4
|
-
|
4
|
+
|
5
5
|
class << self
|
6
|
-
|
6
|
+
|
7
7
|
def load(klass)
|
8
|
-
klass.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
klass.transaction do
|
9
|
+
klass.connection.execute <<-EOS
|
10
|
+
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[geokit_least]') and xtype in (N'FN', N'IF', N'TF'))
|
11
|
+
drop function [dbo].[geokit_least]
|
12
|
+
EOS
|
13
|
+
|
14
|
+
klass.connection.execute <<-EOS
|
15
|
+
CREATE FUNCTION [dbo].geokit_least (@value1 float,@value2 float) RETURNS float AS BEGIN
|
16
|
+
return (SELECT CASE WHEN @value1 < @value2 THEN @value1 ELSE @value2 END) END
|
17
|
+
EOS
|
18
|
+
end
|
17
19
|
self.loaded = true
|
18
20
|
end
|
19
|
-
|
21
|
+
|
20
22
|
end
|
21
|
-
|
23
|
+
|
22
24
|
def initialize(*args)
|
23
25
|
super(*args)
|
24
26
|
end
|
25
|
-
|
27
|
+
|
26
28
|
def sphere_distance_sql(lat, lng, multiplier)
|
27
29
|
%|
|
28
30
|
(ACOS([dbo].geokit_least(1,COS(#{lat})*COS(#{lng})*COS(RADIANS(#{qualified_lat_column_name}))*COS(RADIANS(#{qualified_lng_column_name}))+
|
@@ -30,14 +32,14 @@ module Geokit
|
|
30
32
|
SIN(#{lat})*SIN(RADIANS(#{qualified_lat_column_name}))))*#{multiplier})
|
31
33
|
|
|
32
34
|
end
|
33
|
-
|
35
|
+
|
34
36
|
def flat_distance_sql(origin, lat_degree_units, lng_degree_units)
|
35
37
|
%|
|
36
38
|
SQRT(POWER(#{lat_degree_units}*(#{origin.lat}-#{qualified_lat_column_name}),2)+
|
37
39
|
POWER(#{lng_degree_units}*(#{origin.lng}-#{qualified_lng_column_name}),2))
|
38
40
|
|
|
39
41
|
end
|
40
|
-
|
42
|
+
|
41
43
|
end
|
42
44
|
end
|
43
|
-
end
|
45
|
+
end
|
@@ -3,16 +3,17 @@ require 'active_support/concern'
|
|
3
3
|
module Geokit
|
4
4
|
module GeocoderControl
|
5
5
|
extend ActiveSupport::Concern
|
6
|
-
|
6
|
+
|
7
7
|
included do
|
8
|
-
if
|
9
|
-
|
8
|
+
if respond_to? :before_action
|
9
|
+
send :before_action, :set_geokit_domain
|
10
|
+
elsif respond_to? :before_filter
|
11
|
+
send :before_filter, :set_geokit_domain
|
10
12
|
end
|
11
13
|
end
|
12
|
-
|
14
|
+
|
13
15
|
def set_geokit_domain
|
14
16
|
Geokit::Geocoders::domain = request.domain
|
15
|
-
logger.debug("Geokit is using the domain: #{Geokit::Geocoders::domain}")
|
16
17
|
end
|
17
18
|
end
|
18
|
-
end
|
19
|
+
end
|
@@ -1,40 +1,44 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'active_support/concern'
|
3
3
|
|
4
|
-
module Geokit
|
4
|
+
module Geokit
|
5
5
|
# Contains a class method geocode_ip_address which can be used to enable automatic geocoding
|
6
|
-
# for request IP addresses. The geocoded information is stored in a cookie and in the
|
6
|
+
# for request IP addresses. The geocoded information is stored in a cookie and in the
|
7
7
|
# session to minimize web service calls. The point of the helper is to enable location-based
|
8
8
|
# websites to have a best-guess for new visitors.
|
9
9
|
module IpGeocodeLookup
|
10
10
|
extend ActiveSupport::Concern
|
11
|
-
|
11
|
+
|
12
12
|
# Class method to mix into active record.
|
13
13
|
module ClassMethods # :nodoc:
|
14
14
|
def geocode_ip_address(filter_options = {})
|
15
|
-
|
15
|
+
if respond_to? :before_action
|
16
|
+
before_action :store_ip_location, filter_options
|
17
|
+
else
|
18
|
+
before_filter :store_ip_location, filter_options
|
19
|
+
end
|
16
20
|
end
|
17
21
|
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
# Places the IP address' geocode location into the session if it
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
# Places the IP address' geocode location into the session if it
|
22
26
|
# can be found. Otherwise, looks for a geo location cookie and
|
23
27
|
# uses that value. The last resort is to call the web service to
|
24
28
|
# get the value.
|
25
29
|
def store_ip_location
|
26
30
|
session[:geo_location] ||= retrieve_location_from_cookie_or_service
|
27
31
|
cookies[:geo_location] = { :value => session[:geo_location].to_yaml, :expires => 30.days.from_now } if session[:geo_location]
|
28
|
-
end
|
29
|
-
|
32
|
+
end
|
33
|
+
|
30
34
|
# Uses the stored location value from the cookie if it exists. If
|
31
|
-
# no cookie exists, calls out to the web service to get the location.
|
35
|
+
# no cookie exists, calls out to the web service to get the location.
|
32
36
|
def retrieve_location_from_cookie_or_service
|
33
|
-
return YAML.load(cookies[:geo_location]) if cookies[:geo_location]
|
37
|
+
return GeoLoc.new(YAML.load(cookies[:geo_location])) if cookies[:geo_location]
|
34
38
|
location = Geocoders::MultiGeocoder.geocode(get_ip_address)
|
35
39
|
return location.success ? location : nil
|
36
40
|
end
|
37
|
-
|
41
|
+
|
38
42
|
# Returns the real ip address, though this could be the localhost ip
|
39
43
|
# address. No special handling here anymore.
|
40
44
|
def get_ip_address
|
data/lib/geokit-rails/railtie.rb
CHANGED
data/lib/geokit-rails/version.rb
CHANGED
@@ -108,6 +108,12 @@ class ActsAsMappableTest < GeokitTestCase
|
|
108
108
|
assert_equal 5, locations.count
|
109
109
|
end
|
110
110
|
|
111
|
+
def test_find_within_with_column_as_distance
|
112
|
+
locations = Location.joins(:company).within(Company.arel_table[:max_distance], origin: @loc_a)
|
113
|
+
assert_equal 4, locations.to_a.size
|
114
|
+
assert_equal 4, locations.count
|
115
|
+
end
|
116
|
+
|
111
117
|
def test_find_with_compound_condition
|
112
118
|
#locations = Location.geo_scope(:origin => @loc_a).where("distance < 5 and city = 'Coppell'")
|
113
119
|
locations = Location.within(5, :origin => @loc_a).where("city = 'Coppell'")
|
@@ -175,6 +181,10 @@ class ActsAsMappableTest < GeokitTestCase
|
|
175
181
|
assert_equal @loc_a, Location.nearest(:origin =>[@loc_a.lat, @loc_a.lng]).first
|
176
182
|
end
|
177
183
|
|
184
|
+
def test_find_nearest_is_scope
|
185
|
+
assert Location.nearest(:origin => @loc_a).respond_to? :where
|
186
|
+
end
|
187
|
+
|
178
188
|
def test_find_farthest
|
179
189
|
assert_equal @loc_e, Location.farthest(:origin => @loc_a).first
|
180
190
|
end
|
@@ -183,6 +193,10 @@ class ActsAsMappableTest < GeokitTestCase
|
|
183
193
|
assert_equal @loc_e, Location.farthest(:origin =>[@loc_a.lat, @loc_a.lng]).first
|
184
194
|
end
|
185
195
|
|
196
|
+
def test_find_farthest_is_scope
|
197
|
+
assert Location.farthest(:origin => @loc_a).respond_to? :where
|
198
|
+
end
|
199
|
+
|
186
200
|
def test_scoped_distance_column_in_select
|
187
201
|
#locations = @starbucks.locations.geo_scope(:origin => @loc_a).order("distance ASC")
|
188
202
|
locations = @starbucks.locations.by_distance(:origin => @loc_a)
|
@@ -233,28 +247,28 @@ class ActsAsMappableTest < GeokitTestCase
|
|
233
247
|
end
|
234
248
|
|
235
249
|
def test_ip_geocoded_find_with_distance_condition
|
236
|
-
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).returns(@location_a)
|
250
|
+
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).twice.returns(@location_a)
|
237
251
|
locations = Location.within(3.97, :origin => LOCATION_A_IP)
|
238
252
|
assert_equal 5, locations.to_a.size
|
239
253
|
assert_equal 5, locations.count
|
240
254
|
end
|
241
255
|
|
242
256
|
def test_ip_geocoded_find_within
|
243
|
-
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).returns(@location_a)
|
257
|
+
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).twice.returns(@location_a)
|
244
258
|
locations = Location.within(3.97, :origin => LOCATION_A_IP)
|
245
259
|
assert_equal 5, locations.to_a.size
|
246
260
|
assert_equal 5, locations.count
|
247
261
|
end
|
248
262
|
|
249
263
|
def test_ip_geocoded_find_with_compound_condition
|
250
|
-
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).returns(@location_a)
|
264
|
+
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).twice.returns(@location_a)
|
251
265
|
locations = Location.within(5, :origin => LOCATION_A_IP).where("city = 'Coppell'")
|
252
266
|
assert_equal 2, locations.to_a.size
|
253
267
|
assert_equal 2, locations.count
|
254
268
|
end
|
255
269
|
|
256
270
|
def test_ip_geocoded_find_with_secure_compound_condition
|
257
|
-
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).returns(@location_a)
|
271
|
+
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with(LOCATION_A_IP).twice.returns(@location_a)
|
258
272
|
locations = Location.within(5, :origin => LOCATION_A_IP).where(["city = ?", 'Coppell'])
|
259
273
|
assert_equal 2, locations.to_a.size
|
260
274
|
assert_equal 2, locations.count
|
@@ -285,7 +299,7 @@ class ActsAsMappableTest < GeokitTestCase
|
|
285
299
|
end
|
286
300
|
|
287
301
|
def test_address_geocode
|
288
|
-
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with('Irving, TX').returns(@location_a)
|
302
|
+
Geokit::Geocoders::MultiGeocoder.expects(:geocode).with('Irving, TX').twice.returns(@location_a)
|
289
303
|
#locations = Location.geo_scope(:origin => 'Irving, TX').where(["distance < ? and city = ?", 5, 'Coppell'])
|
290
304
|
locations = Location.within(5, :origin => 'Irving, TX').where(["city = ?", 'Coppell'])
|
291
305
|
assert_equal 2, locations.to_a.size
|
@@ -375,6 +389,16 @@ class ActsAsMappableTest < GeokitTestCase
|
|
375
389
|
assert_equal 2, locations.count
|
376
390
|
end
|
377
391
|
|
392
|
+
def test_find_within_bounds_with_inclusive
|
393
|
+
sw = Geokit::LatLng.new(@loc_a.lat,@loc_a.lng)
|
394
|
+
ne = sw
|
395
|
+
bounds = [sw,ne]
|
396
|
+
locations = Location.in_bounds(bounds, :inclusive => false)
|
397
|
+
assert_equal 0, locations.count
|
398
|
+
locations = Location.in_bounds(bounds, :inclusive => true)
|
399
|
+
assert_equal 1, locations.count
|
400
|
+
end
|
401
|
+
|
378
402
|
def test_find_within_bounds_ordered_by_distance
|
379
403
|
#locations = Location.in_bounds([@sw,@ne], :origin=>@bounds_center).order('distance asc')
|
380
404
|
locations = Location.in_bounds([@sw,@ne]).by_distance(:origin => @bounds_center)
|
@@ -441,7 +465,7 @@ class ActsAsMappableTest < GeokitTestCase
|
|
441
465
|
end
|
442
466
|
|
443
467
|
def test_sort_by_distance_from
|
444
|
-
locations = Location.all
|
468
|
+
locations = Location.with_latlng.all
|
445
469
|
unsorted = [locations(:a), locations(:b), locations(:c), locations(:d), locations(:e), locations(:f)]
|
446
470
|
sorted = [locations(:a), locations(:b), locations(:c), locations(:f), locations(:d), locations(:e)]
|
447
471
|
assert_equal sorted, locations.sort_by{|l| l.distance_to(locations(:a))}
|
data/test/boot.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
|
3
|
-
require
|
3
|
+
require "active_support/version"
|
4
4
|
require 'active_support/test_case'
|
5
|
+
require "active_support/testing/autorun" if ActiveSupport::VERSION::MAJOR >= 4
|
5
6
|
|
6
7
|
require 'active_record'
|
7
|
-
require 'active_record/test_case'
|
8
8
|
require 'active_record/fixtures'
|
9
9
|
|
10
10
|
require 'action_controller'
|
@@ -29,4 +29,4 @@ ActiveRecord::Base.logger = Logger.new(logger_file)
|
|
29
29
|
ActiveRecord::Base.establish_connection(db_config[ADAPTER])
|
30
30
|
|
31
31
|
ActiveRecord::Migration.verbose = false
|
32
|
-
load schema_file
|
32
|
+
load schema_file
|
data/test/fixtures/companies.yml
CHANGED
data/test/fixtures/locations.yml
CHANGED
data/test/schema.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -3,11 +3,17 @@ require 'pathname'
|
|
3
3
|
require 'boot'
|
4
4
|
require 'mocha/setup'
|
5
5
|
|
6
|
-
|
7
|
-
COVERAGE_THRESHOLD =
|
6
|
+
unless ENV['COVERAGE'] == 'off'
|
7
|
+
COVERAGE_THRESHOLD = 35
|
8
8
|
require 'simplecov'
|
9
9
|
require 'simplecov-rcov'
|
10
|
-
|
10
|
+
require 'coveralls'
|
11
|
+
Coveralls.wear!
|
12
|
+
|
13
|
+
SimpleCov.formatters = [
|
14
|
+
SimpleCov::Formatter::RcovFormatter,
|
15
|
+
Coveralls::SimpleCov::Formatter
|
16
|
+
]
|
11
17
|
SimpleCov.start do
|
12
18
|
add_filter '/test/'
|
13
19
|
add_group 'lib', 'lib'
|
@@ -28,6 +34,8 @@ require 'geokit-rails'
|
|
28
34
|
ActiveRecord::Base.send(:include, Geokit::ActsAsMappable::Glue)
|
29
35
|
ActionController::Base.send(:include, Geokit::GeocoderControl)
|
30
36
|
ActionController::Base.send(:include, Geokit::IpGeocodeLookup)
|
37
|
+
# Rails >= 4 requires models classes to be loaded before fixtures are created
|
38
|
+
Dir[PLUGIN_ROOT + "test/models/*.rb"].each { |file| require file }
|
31
39
|
|
32
40
|
class GeokitTestCase < ActiveSupport::TestCase
|
33
41
|
begin
|
@@ -37,8 +45,12 @@ class GeokitTestCase < ActiveSupport::TestCase
|
|
37
45
|
end
|
38
46
|
|
39
47
|
self.fixture_path = (PLUGIN_ROOT + 'test/fixtures').to_s
|
40
|
-
|
48
|
+
if Rails::VERSION::MAJOR >= 5
|
49
|
+
self.use_transactional_tests = true
|
50
|
+
else
|
51
|
+
self.use_transactional_fixtures = true
|
52
|
+
end
|
41
53
|
self.use_instantiated_fixtures = false
|
42
54
|
|
43
55
|
fixtures :all
|
44
|
-
end
|
56
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geokit-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Noack
|
@@ -11,166 +11,194 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '3.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: geokit
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - ~>
|
34
|
+
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '1.5'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '1.5'
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: bundler
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- -
|
48
|
+
- - ">"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '1.0'
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - ">"
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '1.0'
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- -
|
62
|
+
- - "~>"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 0.16.1
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 0.16.1
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: simplecov-rcov
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
63
77
|
- !ruby/object:Gem::Version
|
64
78
|
version: '0'
|
65
79
|
type: :development
|
66
80
|
prerelease: false
|
67
81
|
version_requirements: !ruby/object:Gem::Requirement
|
68
82
|
requirements:
|
69
|
-
- -
|
83
|
+
- - ">="
|
70
84
|
- !ruby/object:Gem::Version
|
71
85
|
version: '0'
|
72
86
|
- !ruby/object:Gem::Dependency
|
73
|
-
name:
|
87
|
+
name: rake
|
74
88
|
requirement: !ruby/object:Gem::Requirement
|
75
89
|
requirements:
|
76
|
-
- -
|
90
|
+
- - ">="
|
77
91
|
- !ruby/object:Gem::Version
|
78
92
|
version: '0'
|
79
93
|
type: :development
|
80
94
|
prerelease: false
|
81
95
|
version_requirements: !ruby/object:Gem::Requirement
|
82
96
|
requirements:
|
83
|
-
- -
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: test-unit
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
type: :development
|
108
|
+
prerelease: false
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
84
112
|
- !ruby/object:Gem::Version
|
85
113
|
version: '0'
|
86
114
|
- !ruby/object:Gem::Dependency
|
87
115
|
name: mocha
|
88
116
|
requirement: !ruby/object:Gem::Requirement
|
89
117
|
requirements:
|
90
|
-
- - ~>
|
118
|
+
- - "~>"
|
91
119
|
- !ruby/object:Gem::Version
|
92
120
|
version: '0.9'
|
93
121
|
type: :development
|
94
122
|
prerelease: false
|
95
123
|
version_requirements: !ruby/object:Gem::Requirement
|
96
124
|
requirements:
|
97
|
-
- - ~>
|
125
|
+
- - "~>"
|
98
126
|
- !ruby/object:Gem::Version
|
99
127
|
version: '0.9'
|
100
128
|
- !ruby/object:Gem::Dependency
|
101
|
-
name:
|
129
|
+
name: coveralls
|
102
130
|
requirement: !ruby/object:Gem::Requirement
|
103
131
|
requirements:
|
104
|
-
- -
|
132
|
+
- - ">="
|
105
133
|
- !ruby/object:Gem::Version
|
106
|
-
version: '
|
134
|
+
version: '0'
|
107
135
|
type: :development
|
108
136
|
prerelease: false
|
109
137
|
version_requirements: !ruby/object:Gem::Requirement
|
110
138
|
requirements:
|
111
|
-
- -
|
139
|
+
- - ">="
|
112
140
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
141
|
+
version: '0'
|
114
142
|
- !ruby/object:Gem::Dependency
|
115
143
|
name: mysql2
|
116
144
|
requirement: !ruby/object:Gem::Requirement
|
117
145
|
requirements:
|
118
|
-
- - ~>
|
146
|
+
- - "~>"
|
119
147
|
- !ruby/object:Gem::Version
|
120
148
|
version: '0.2'
|
121
149
|
type: :development
|
122
150
|
prerelease: false
|
123
151
|
version_requirements: !ruby/object:Gem::Requirement
|
124
152
|
requirements:
|
125
|
-
- - ~>
|
153
|
+
- - "~>"
|
126
154
|
- !ruby/object:Gem::Version
|
127
155
|
version: '0.2'
|
128
156
|
- !ruby/object:Gem::Dependency
|
129
157
|
name: activerecord-mysql2spatial-adapter
|
130
158
|
requirement: !ruby/object:Gem::Requirement
|
131
159
|
requirements:
|
132
|
-
- -
|
160
|
+
- - ">="
|
133
161
|
- !ruby/object:Gem::Version
|
134
162
|
version: '0'
|
135
163
|
type: :development
|
136
164
|
prerelease: false
|
137
165
|
version_requirements: !ruby/object:Gem::Requirement
|
138
166
|
requirements:
|
139
|
-
- -
|
167
|
+
- - ">="
|
140
168
|
- !ruby/object:Gem::Version
|
141
169
|
version: '0'
|
142
170
|
- !ruby/object:Gem::Dependency
|
143
171
|
name: pg
|
144
172
|
requirement: !ruby/object:Gem::Requirement
|
145
173
|
requirements:
|
146
|
-
- - ~>
|
174
|
+
- - "~>"
|
147
175
|
- !ruby/object:Gem::Version
|
148
176
|
version: '0.10'
|
149
177
|
type: :development
|
150
178
|
prerelease: false
|
151
179
|
version_requirements: !ruby/object:Gem::Requirement
|
152
180
|
requirements:
|
153
|
-
- - ~>
|
181
|
+
- - "~>"
|
154
182
|
- !ruby/object:Gem::Version
|
155
183
|
version: '0.10'
|
156
184
|
- !ruby/object:Gem::Dependency
|
157
185
|
name: sqlite3
|
158
186
|
requirement: !ruby/object:Gem::Requirement
|
159
187
|
requirements:
|
160
|
-
- -
|
188
|
+
- - ">="
|
161
189
|
- !ruby/object:Gem::Version
|
162
190
|
version: '0'
|
163
191
|
type: :development
|
164
192
|
prerelease: false
|
165
193
|
version_requirements: !ruby/object:Gem::Requirement
|
166
194
|
requirements:
|
167
|
-
- -
|
195
|
+
- - ">="
|
168
196
|
- !ruby/object:Gem::Version
|
169
197
|
version: '0'
|
170
198
|
description: Official Geokit plugin for Rails/ActiveRecord. Provides location-based
|
171
199
|
goodness for your Rails app. Requires the Geokit gem.
|
172
200
|
email:
|
173
|
-
- michael@noack.com.au
|
201
|
+
- michael+geokit@noack.com.au
|
174
202
|
- andre@earthcode.com
|
175
203
|
- bill_eisenhauer@yahoo.com
|
176
204
|
- jeremy.lecour@gmail.com
|
@@ -178,55 +206,63 @@ executables: []
|
|
178
206
|
extensions: []
|
179
207
|
extra_rdoc_files: []
|
180
208
|
files:
|
209
|
+
- ".gitignore"
|
210
|
+
- ".travis.yml"
|
211
|
+
- CHANGELOG.md
|
212
|
+
- CONFIG.markdown
|
213
|
+
- Gemfile
|
214
|
+
- MIT-LICENSE
|
215
|
+
- README.markdown
|
216
|
+
- Rakefile
|
217
|
+
- gemfiles/rails3.gemfile
|
218
|
+
- gemfiles/rails4.gemfile
|
219
|
+
- gemfiles/rails5.gemfile
|
220
|
+
- geokit-rails.gemspec
|
221
|
+
- lib/generators/geokit_rails/install_generator.rb
|
222
|
+
- lib/generators/templates/geokit_config.rb
|
181
223
|
- lib/geokit-rails.rb
|
182
|
-
- lib/geokit-rails/
|
183
|
-
- lib/geokit-rails/adapters/mysql2spatial.rb
|
184
|
-
- lib/geokit-rails/adapters/mysql.rb
|
224
|
+
- lib/geokit-rails/acts_as_mappable.rb
|
185
225
|
- lib/geokit-rails/adapters/abstract.rb
|
186
|
-
- lib/geokit-rails/adapters/
|
226
|
+
- lib/geokit-rails/adapters/mysql.rb
|
187
227
|
- lib/geokit-rails/adapters/mysql2.rb
|
228
|
+
- lib/geokit-rails/adapters/mysql2spatial.rb
|
229
|
+
- lib/geokit-rails/adapters/oracleenhanced.rb
|
188
230
|
- lib/geokit-rails/adapters/postgresql.rb
|
189
|
-
- lib/geokit-rails/
|
231
|
+
- lib/geokit-rails/adapters/sqlite.rb
|
232
|
+
- lib/geokit-rails/adapters/sqlserver.rb
|
190
233
|
- lib/geokit-rails/core_extensions.rb
|
191
|
-
- lib/geokit-rails/version.rb
|
192
|
-
- lib/geokit-rails/acts_as_mappable.rb
|
193
|
-
- lib/geokit-rails/ip_geocode_lookup.rb
|
194
234
|
- lib/geokit-rails/geocoder_control.rb
|
235
|
+
- lib/geokit-rails/ip_geocode_lookup.rb
|
195
236
|
- lib/geokit-rails/railtie.rb
|
237
|
+
- lib/geokit-rails/version.rb
|
238
|
+
- test/acts_as_mappable_test.rb
|
239
|
+
- test/boot.rb
|
240
|
+
- test/database.yml
|
241
|
+
- test/fixtures/companies.yml
|
242
|
+
- test/fixtures/custom_locations.yml
|
243
|
+
- test/fixtures/locations.yml
|
244
|
+
- test/fixtures/mock_addresses.yml
|
245
|
+
- test/fixtures/mock_families.yml
|
246
|
+
- test/fixtures/mock_houses.yml
|
247
|
+
- test/fixtures/mock_organizations.yml
|
248
|
+
- test/fixtures/mock_people.yml
|
249
|
+
- test/fixtures/stores.yml
|
250
|
+
- test/ip_geocode_lookup_test.disabled.rb
|
251
|
+
- test/models/company.rb
|
196
252
|
- test/models/custom_location.rb
|
197
253
|
- test/models/location.rb
|
198
|
-
- test/models/store.rb
|
199
|
-
- test/models/mock_organization.rb
|
200
254
|
- test/models/mock_address.rb
|
201
|
-
- test/models/mock_person.rb
|
202
|
-
- test/models/company.rb
|
203
255
|
- test/models/mock_family.rb
|
204
256
|
- test/models/mock_house.rb
|
205
|
-
- test/
|
206
|
-
- test/
|
207
|
-
- test/
|
208
|
-
- test/mysql-debug.log
|
257
|
+
- test/models/mock_organization.rb
|
258
|
+
- test/models/mock_person.rb
|
259
|
+
- test/models/store.rb
|
209
260
|
- test/schema.rb
|
210
261
|
- test/tasks.rake
|
211
|
-
- test/ip_geocode_lookup_test.disabled.rb
|
212
|
-
- test/sqlite-debug.log
|
213
|
-
- test/postgresql-debug.log
|
214
|
-
- test/fixtures/mock_families.yml
|
215
|
-
- test/fixtures/companies.yml
|
216
|
-
- test/fixtures/stores.yml
|
217
|
-
- test/fixtures/mock_addresses.yml
|
218
|
-
- test/fixtures/mock_people.yml
|
219
|
-
- test/fixtures/custom_locations.yml
|
220
|
-
- test/fixtures/mock_houses.yml
|
221
|
-
- test/fixtures/locations.yml
|
222
|
-
- test/fixtures/mock_organizations.yml
|
223
|
-
- test/postgres-debug.log
|
224
|
-
- test/boot.rb
|
225
262
|
- test/test_helper.rb
|
226
|
-
- test/acts_as_mappable_test.rb
|
227
|
-
- test/mysql2spatial-debug.log
|
228
263
|
homepage: http://github.com/geokit/geokit-rails
|
229
|
-
licenses:
|
264
|
+
licenses:
|
265
|
+
- MIT
|
230
266
|
metadata: {}
|
231
267
|
post_install_message:
|
232
268
|
rdoc_options: []
|
@@ -234,50 +270,42 @@ require_paths:
|
|
234
270
|
- lib
|
235
271
|
required_ruby_version: !ruby/object:Gem::Requirement
|
236
272
|
requirements:
|
237
|
-
- -
|
273
|
+
- - ">="
|
238
274
|
- !ruby/object:Gem::Version
|
239
275
|
version: '0'
|
240
276
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
277
|
requirements:
|
242
|
-
- -
|
278
|
+
- - ">="
|
243
279
|
- !ruby/object:Gem::Version
|
244
|
-
version:
|
280
|
+
version: '0'
|
245
281
|
requirements: []
|
246
|
-
|
247
|
-
rubygems_version: 2.0.3
|
282
|
+
rubygems_version: 3.1.4
|
248
283
|
signing_key:
|
249
284
|
specification_version: 4
|
250
|
-
summary:
|
285
|
+
summary: Geokit helpers for rails apps.
|
251
286
|
test_files:
|
287
|
+
- test/acts_as_mappable_test.rb
|
288
|
+
- test/boot.rb
|
289
|
+
- test/database.yml
|
290
|
+
- test/fixtures/companies.yml
|
291
|
+
- test/fixtures/custom_locations.yml
|
292
|
+
- test/fixtures/locations.yml
|
293
|
+
- test/fixtures/mock_addresses.yml
|
294
|
+
- test/fixtures/mock_families.yml
|
295
|
+
- test/fixtures/mock_houses.yml
|
296
|
+
- test/fixtures/mock_organizations.yml
|
297
|
+
- test/fixtures/mock_people.yml
|
298
|
+
- test/fixtures/stores.yml
|
299
|
+
- test/ip_geocode_lookup_test.disabled.rb
|
300
|
+
- test/models/company.rb
|
252
301
|
- test/models/custom_location.rb
|
253
302
|
- test/models/location.rb
|
254
|
-
- test/models/store.rb
|
255
|
-
- test/models/mock_organization.rb
|
256
303
|
- test/models/mock_address.rb
|
257
|
-
- test/models/mock_person.rb
|
258
|
-
- test/models/company.rb
|
259
304
|
- test/models/mock_family.rb
|
260
305
|
- test/models/mock_house.rb
|
261
|
-
- test/
|
262
|
-
- test/
|
263
|
-
- test/
|
264
|
-
- test/mysql-debug.log
|
306
|
+
- test/models/mock_organization.rb
|
307
|
+
- test/models/mock_person.rb
|
308
|
+
- test/models/store.rb
|
265
309
|
- test/schema.rb
|
266
310
|
- test/tasks.rake
|
267
|
-
- test/ip_geocode_lookup_test.disabled.rb
|
268
|
-
- test/sqlite-debug.log
|
269
|
-
- test/postgresql-debug.log
|
270
|
-
- test/fixtures/mock_families.yml
|
271
|
-
- test/fixtures/companies.yml
|
272
|
-
- test/fixtures/stores.yml
|
273
|
-
- test/fixtures/mock_addresses.yml
|
274
|
-
- test/fixtures/mock_people.yml
|
275
|
-
- test/fixtures/custom_locations.yml
|
276
|
-
- test/fixtures/mock_houses.yml
|
277
|
-
- test/fixtures/locations.yml
|
278
|
-
- test/fixtures/mock_organizations.yml
|
279
|
-
- test/postgres-debug.log
|
280
|
-
- test/boot.rb
|
281
311
|
- test/test_helper.rb
|
282
|
-
- test/acts_as_mappable_test.rb
|
283
|
-
- test/mysql2spatial-debug.log
|