geokit-rails3 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/geokit-rails3/acts_as_mappable.old.rb +437 -0
- data/lib/geokit-rails3/acts_as_mappable.rb +32 -176
- data/lib/geokit-rails3/adapters/mysql2.rb +22 -0
- data/lib/geokit-rails3/version.rb +1 -1
- data/test/mysql-debug.log +2443 -0
- metadata +7 -12
- data/.gitignore +0 -30
- data/CHANGELOG.rdoc +0 -46
- data/CONFIG.markdown +0 -67
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -89
- data/MIT-LICENSE +0 -20
- data/README.markdown +0 -554
- data/Rakefile +0 -17
- data/geokit-rails3.gemspec +0 -29
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geokit-rails3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Lewis
|
@@ -128,19 +128,12 @@ extensions: []
|
|
128
128
|
extra_rdoc_files: []
|
129
129
|
|
130
130
|
files:
|
131
|
-
- .gitignore
|
132
|
-
- CHANGELOG.rdoc
|
133
|
-
- CONFIG.markdown
|
134
|
-
- Gemfile
|
135
|
-
- Gemfile.lock
|
136
|
-
- MIT-LICENSE
|
137
|
-
- README.markdown
|
138
|
-
- Rakefile
|
139
|
-
- geokit-rails3.gemspec
|
140
131
|
- lib/geokit-rails.rb
|
132
|
+
- lib/geokit-rails3/acts_as_mappable.old.rb
|
141
133
|
- lib/geokit-rails3/acts_as_mappable.rb
|
142
134
|
- lib/geokit-rails3/adapters/abstract.rb
|
143
135
|
- lib/geokit-rails3/adapters/mysql.rb
|
136
|
+
- lib/geokit-rails3/adapters/mysql2.rb
|
144
137
|
- lib/geokit-rails3/adapters/postgresql.rb
|
145
138
|
- lib/geokit-rails3/adapters/sqlserver.rb
|
146
139
|
- lib/geokit-rails3/core_extensions.rb
|
@@ -170,6 +163,7 @@ files:
|
|
170
163
|
- test/models/mock_organization.rb
|
171
164
|
- test/models/mock_person.rb
|
172
165
|
- test/models/store.rb
|
166
|
+
- test/mysql-debug.log
|
173
167
|
- test/schema.rb
|
174
168
|
- test/tasks.rake
|
175
169
|
- test/test_helper.rb
|
@@ -231,6 +225,7 @@ test_files:
|
|
231
225
|
- test/models/mock_organization.rb
|
232
226
|
- test/models/mock_person.rb
|
233
227
|
- test/models/store.rb
|
228
|
+
- test/mysql-debug.log
|
234
229
|
- test/schema.rb
|
235
230
|
- test/tasks.rake
|
236
231
|
- test/test_helper.rb
|
data/.gitignore
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# Test log files
|
2
|
-
test/*-debug.log
|
3
|
-
|
4
|
-
# SVN
|
5
|
-
.svn
|
6
|
-
|
7
|
-
# RVM
|
8
|
-
.rvmrc
|
9
|
-
|
10
|
-
# TextMate
|
11
|
-
*.tmproj
|
12
|
-
|
13
|
-
# rcov generated
|
14
|
-
coverage
|
15
|
-
|
16
|
-
# rdoc generated
|
17
|
-
rdoc
|
18
|
-
|
19
|
-
# yard generated
|
20
|
-
doc
|
21
|
-
.yardoc
|
22
|
-
|
23
|
-
# bundler
|
24
|
-
.bundle
|
25
|
-
|
26
|
-
# jeweler generated
|
27
|
-
pkg
|
28
|
-
|
29
|
-
# For MacOS:
|
30
|
-
.DS_Store
|
data/CHANGELOG.rdoc
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
== 2009-10-02 / Version 1.2.0
|
2
|
-
* Overhaul the test suite to be independent of a Rails project
|
3
|
-
* Added concept of database adapter. Ported mysql/postgresql conditional code to their own adapter.
|
4
|
-
* Added SQL Server support. THANKS http://github.com/brennandunn for all the improvements in this release
|
5
|
-
|
6
|
-
== 2009-09-26 / Version 1.1.3
|
7
|
-
* documentation updates and updated to work with Geokit gem v1.5.0
|
8
|
-
* IMPORTANT: in the Geokit gem, Geokit::Geocoders::timeout became Geokit::Geocoders::request_timeout for jruby compatibility.
|
9
|
-
The plugin sets this in config/initializers/geokit_config.rb. So if you've upgraded the gem to 1.5.0, you need to
|
10
|
-
make the change manually from Geokit::Geocoders::timeout to Geokit::Geocoders::request_timeout in config/initializers/geokit_config.rb
|
11
|
-
|
12
|
-
== 2009-06-08 / Version 1.1.2
|
13
|
-
* Added support for hashes in :through. So you can do: acts_as_mappable :through => { :state => :country } (Thanks José Valim).
|
14
|
-
|
15
|
-
== 2009-05-22 / Version 1.1.1
|
16
|
-
* Support for multiple ip geocoders (Thanks dreamcat4)
|
17
|
-
* Now checks if either :origin OR :bounds is passed, and proceeds with geokit query if this is true (Thanks Glenn Powell)
|
18
|
-
* Raises a helpful error if someone uses through but the association does not exists or was not defined yet (Thanks José Valim)
|
19
|
-
|
20
|
-
== 2009-04-11 / Version 1.1.0
|
21
|
-
* Fixed :through usages so that the through model is only included in the query if there
|
22
|
-
is an :origin passed in (Only if it is a geokit search) (Thanks Glenn Powell)
|
23
|
-
* Move library initialisation into lib/geokit-rails. init.rb uses lib/geokit-rails now (thanks Alban Peignier)
|
24
|
-
* Handle the case where a user passes a hash to the :conditions Finder option (thanks Adam Greene)
|
25
|
-
* Added ability to specify domain-specific API keys (Thanks Glenn Powell)
|
26
|
-
|
27
|
-
== 2009-02-20
|
28
|
-
* More powerful assosciations in the Rails Plugin:You can now specify a model as mappable "through" an associated model.
|
29
|
-
In other words, that associated model is the actual mappable model with "lat" and "lng" attributes, but this "through" model
|
30
|
-
can still utilize all Geokit's "find by distance" finders. Also Rails 2.3 compatibility (thanks github/glennpow)
|
31
|
-
|
32
|
-
== 2008-12-18
|
33
|
-
* Split Rails plugin from geocoder gem
|
34
|
-
* updated for Rails 2.2.2
|
35
|
-
|
36
|
-
== 2008-08-20
|
37
|
-
* Further fix of distance calculation, this time in SQL. Now uses least() function, which is available in MySQL version 3.22.5+ and postgres versions 8.1+
|
38
|
-
|
39
|
-
== 2008-01-16
|
40
|
-
* fixed the "zero-distance" bug (calculating between two points that are the same)
|
41
|
-
|
42
|
-
== 2007-11-12
|
43
|
-
* fixed a small but with queries crossing meridian, and also fixed find(:closest)
|
44
|
-
|
45
|
-
== 2007-10-11
|
46
|
-
* Fixed Rails2/Edge compatability
|
data/CONFIG.markdown
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# You can configure Geokit in you environment files
|
2
|
-
|
3
|
-
These defaults are used in `Geokit::Mappable.distance_to` and in `acts_as_mappable`
|
4
|
-
|
5
|
-
config.geokit.default_units = :miles
|
6
|
-
config.geokit.default_formula = :sphere
|
7
|
-
|
8
|
-
This is the timeout value in seconds to be used for calls to the geocoder web services. For no timeout at all, comment out the setting. The timeout unit is in seconds.
|
9
|
-
|
10
|
-
config.geokit.geocoders.request_timeout = 3
|
11
|
-
|
12
|
-
These settings are used if web service calls must be routed through a proxy.
|
13
|
-
These setting can be `nil` if not needed, otherwise, addr and port must be filled in at a minimum. If the proxy requires authentication, the username and password can be provided as well.
|
14
|
-
|
15
|
-
config.geokit.geocoders.proxy_addr = nil
|
16
|
-
config.geokit.geocoders.proxy_port = nil
|
17
|
-
config.geokit.geocoders.proxy_user = nil
|
18
|
-
config.geokit.geocoders.proxy_pass = nil
|
19
|
-
|
20
|
-
This is your yahoo application key for the Yahoo Geocoder.
|
21
|
-
|
22
|
-
See [http://developer.yahoo.com/faq/index.html#appid](http://developer.yahoo.com/faq/index.html#appid)
|
23
|
-
and [http://developer.yahoo.com/maps/rest/V1/geocode.html](http://developer.yahoo.com/maps/rest/V1/geocode.html)
|
24
|
-
|
25
|
-
config.geokit.geocoders.yahoo = 'REPLACE_WITH_YOUR_YAHOO_KEY'
|
26
|
-
|
27
|
-
This is your Google Maps geocoder key.
|
28
|
-
|
29
|
-
See [http://www.google.com/apis/maps/signup.html](http://www.google.com/apis/maps/signup.html)
|
30
|
-
and [http://www.google.com/apis/maps/documentation/#Geocoding_Examples](http://www.google.com/apis/maps/documentation/#Geocoding_Examples)
|
31
|
-
|
32
|
-
config.geokit.geocoders.google = 'REPLACE_WITH_YOUR_GOOGLE_KEY'
|
33
|
-
|
34
|
-
This is your username and password for **geocoder.us**.
|
35
|
-
To use the free service, the value can be set to `nil` or `false`.
|
36
|
-
For usage tied to an account, the value should be set to `username:password`.
|
37
|
-
|
38
|
-
See [http://geocoder.us](http://geocoder.us)
|
39
|
-
and [http://geocoder.us/user/signup](http://geocoder.us/user/signup)
|
40
|
-
|
41
|
-
config.geokit.geocoders.geocoder_us = false
|
42
|
-
|
43
|
-
This is your authorization key for **geocoder.ca**.
|
44
|
-
To use the free service, the value can be set to `nil` or `false`. For usage tied to an account, set the value to the key obtained from
|
45
|
-
**Geocoder.ca**.
|
46
|
-
|
47
|
-
See [http://geocoder.ca](http://geocoder.ca)
|
48
|
-
and [http://geocoder.ca/?register=1](http://geocoder.ca/?register=1)
|
49
|
-
|
50
|
-
config.geokit.geocoders.geocoder_ca = false
|
51
|
-
|
52
|
-
Uncomment to use a username with the Geonames geocoder
|
53
|
-
|
54
|
-
config.geokitgeocoders.geonames="REPLACE_WITH_YOUR_GEONAMES_USERNAME"
|
55
|
-
|
56
|
-
This is the order in which the geocoders are called in a failover scenario.
|
57
|
-
If you only want to use a single geocoder, put a single symbol in the array.
|
58
|
-
Valid symbols are `:google`, `:yahoo`, `:us`, and `:ca`.
|
59
|
-
Be aware that there are **Terms of Use** restrictions on how you can use the various geocoders. Make sure you read up on relevant **Terms of Use** for each geocoder you are going to use.
|
60
|
-
|
61
|
-
config.geokit.geocoders.provider_order = [:google,:us]
|
62
|
-
|
63
|
-
The IP provider order. Valid symbols are `:ip`, `:geo_plugin`.
|
64
|
-
As before, make sure you read up on relevant **Terms of Use** for each
|
65
|
-
|
66
|
-
config.geokitgeocoders.ip_provider_order = [:geo_plugin,:ip]
|
67
|
-
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
geokit-rails3 (0.0.3)
|
5
|
-
geokit (~> 1.5.0)
|
6
|
-
rails (~> 3.0.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
abstract (1.0.0)
|
12
|
-
actionmailer (3.0.0)
|
13
|
-
actionpack (= 3.0.0)
|
14
|
-
mail (~> 2.2.5)
|
15
|
-
actionpack (3.0.0)
|
16
|
-
activemodel (= 3.0.0)
|
17
|
-
activesupport (= 3.0.0)
|
18
|
-
builder (~> 2.1.2)
|
19
|
-
erubis (~> 2.6.6)
|
20
|
-
i18n (~> 0.4.1)
|
21
|
-
rack (~> 1.2.1)
|
22
|
-
rack-mount (~> 0.6.12)
|
23
|
-
rack-test (~> 0.5.4)
|
24
|
-
tzinfo (~> 0.3.23)
|
25
|
-
activemodel (3.0.0)
|
26
|
-
activesupport (= 3.0.0)
|
27
|
-
builder (~> 2.1.2)
|
28
|
-
i18n (~> 0.4.1)
|
29
|
-
activerecord (3.0.0)
|
30
|
-
activemodel (= 3.0.0)
|
31
|
-
activesupport (= 3.0.0)
|
32
|
-
arel (~> 1.0.0)
|
33
|
-
tzinfo (~> 0.3.23)
|
34
|
-
activeresource (3.0.0)
|
35
|
-
activemodel (= 3.0.0)
|
36
|
-
activesupport (= 3.0.0)
|
37
|
-
activesupport (3.0.0)
|
38
|
-
arel (1.0.1)
|
39
|
-
activesupport (~> 3.0.0)
|
40
|
-
builder (2.1.2)
|
41
|
-
erubis (2.6.6)
|
42
|
-
abstract (>= 1.0.0)
|
43
|
-
geokit (1.5.0)
|
44
|
-
i18n (0.4.1)
|
45
|
-
mail (2.2.6.1)
|
46
|
-
activesupport (>= 2.3.6)
|
47
|
-
mime-types
|
48
|
-
treetop (>= 1.4.5)
|
49
|
-
mime-types (1.16)
|
50
|
-
mocha (0.9.8)
|
51
|
-
rake
|
52
|
-
mysql (2.8.1)
|
53
|
-
polyglot (0.3.1)
|
54
|
-
rack (1.2.1)
|
55
|
-
rack-mount (0.6.13)
|
56
|
-
rack (>= 1.0.0)
|
57
|
-
rack-test (0.5.5)
|
58
|
-
rack (>= 1.0)
|
59
|
-
rails (3.0.0)
|
60
|
-
actionmailer (= 3.0.0)
|
61
|
-
actionpack (= 3.0.0)
|
62
|
-
activerecord (= 3.0.0)
|
63
|
-
activeresource (= 3.0.0)
|
64
|
-
activesupport (= 3.0.0)
|
65
|
-
bundler (~> 1.0.0)
|
66
|
-
railties (= 3.0.0)
|
67
|
-
railties (3.0.0)
|
68
|
-
actionpack (= 3.0.0)
|
69
|
-
activesupport (= 3.0.0)
|
70
|
-
rake (>= 0.8.4)
|
71
|
-
thor (~> 0.14.0)
|
72
|
-
rake (0.8.7)
|
73
|
-
rcov (0.9.9)
|
74
|
-
thor (0.14.2)
|
75
|
-
treetop (1.4.8)
|
76
|
-
polyglot (>= 0.3.1)
|
77
|
-
tzinfo (0.3.23)
|
78
|
-
|
79
|
-
PLATFORMS
|
80
|
-
ruby
|
81
|
-
|
82
|
-
DEPENDENCIES
|
83
|
-
bundler (~> 1.0.0)
|
84
|
-
geokit (~> 1.5.0)
|
85
|
-
geokit-rails3!
|
86
|
-
mocha (~> 0.9.8)
|
87
|
-
mysql (~> 2.8.1)
|
88
|
-
rails (~> 3.0.0)
|
89
|
-
rcov (~> 0.9.9)
|
data/MIT-LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2007 Bill Eisenhauer & Andre Lewis
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|