geokit-rails 1.1.4 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of geokit-rails might be problematic. Click here for more details.
- checksums.yaml +15 -0
- data/lib/geokit-rails.rb +10 -26
- data/lib/geokit-rails/acts_as_mappable.rb +269 -369
- data/lib/geokit-rails/adapters/mysql2.rb +22 -0
- data/lib/geokit-rails/adapters/sqlite.rb +53 -0
- data/lib/geokit-rails/core_extensions.rb +10 -0
- data/lib/geokit-rails/defaults.rb +0 -1
- data/lib/geokit-rails/geocoder_control.rb +11 -9
- data/lib/geokit-rails/ip_geocode_lookup.rb +2 -4
- data/lib/geokit-rails/railtie.rb +38 -0
- data/lib/geokit-rails/version.rb +3 -0
- data/test/acts_as_mappable_test.rb +236 -281
- data/test/boot.rb +20 -13
- data/test/database.yml +10 -6
- data/test/{ip_geocode_lookup_test.rb → ip_geocode_lookup_test.disabled.rb} +7 -2
- data/test/models/mock_family.rb +2 -0
- data/test/models/mock_organization.rb +2 -0
- data/test/models/mock_person.rb +3 -0
- data/test/sqlite-debug.log +1293 -0
- data/test/tasks.rake +16 -10
- data/test/test.sqlite3 +0 -0
- data/test/test_helper.rb +26 -5
- metadata +223 -126
- data/CHANGELOG.rdoc +0 -46
- data/MIT-LICENSE +0 -20
- data/Manifest.txt +0 -44
- data/README.markdown +0 -561
- data/Rakefile +0 -54
- data/about.yml +0 -9
- data/assets/api_keys_template +0 -61
- data/geokit-rails.gemspec +0 -39
- data/init.rb +0 -1
- data/install.rb +0 -14
data/test/tasks.rake
CHANGED
@@ -1,12 +1,5 @@
|
|
1
1
|
require 'rake/testtask'
|
2
2
|
|
3
|
-
desc 'Test the GeoKit plugin.'
|
4
|
-
Rake::TestTask.new(:test) do |t|
|
5
|
-
t.pattern = 'test/**/*_test.rb'
|
6
|
-
t.verbose = true
|
7
|
-
t.libs << 'test'
|
8
|
-
end
|
9
|
-
|
10
3
|
class EnvTestTask < Rake::TestTask
|
11
4
|
attr_accessor :env
|
12
5
|
|
@@ -18,9 +11,16 @@ class EnvTestTask < Rake::TestTask
|
|
18
11
|
|
19
12
|
end
|
20
13
|
|
21
|
-
|
14
|
+
desc 'Test the GeoKit plugin.'
|
15
|
+
Rake::TestTask.new(:test) do |test|
|
16
|
+
test.libs << 'lib' << 'test'
|
17
|
+
test.pattern = 'test/*_test.rb'
|
18
|
+
test.verbose = true
|
19
|
+
end
|
20
|
+
|
21
|
+
%w(mysql postgresql sqlserver sqlite).each do |configuration|
|
22
22
|
EnvTestTask.new("test_#{configuration}") do |t|
|
23
|
-
t.pattern = 'test
|
23
|
+
t.pattern = 'test/*_test.rb'
|
24
24
|
t.verbose = true
|
25
25
|
t.env = { 'DB' => configuration }
|
26
26
|
t.libs << 'test'
|
@@ -28,4 +28,10 @@ end
|
|
28
28
|
end
|
29
29
|
|
30
30
|
desc 'Test available databases.'
|
31
|
-
task :test_databases => %w(test_mysql test_postgresql test_sqlserver)
|
31
|
+
task :test_databases => %w(test_mysql test_postgresql test_sqlserver test_sqlite)
|
32
|
+
|
33
|
+
desc "Generate SimpleCov test coverage and open in your browser"
|
34
|
+
task :coverage do
|
35
|
+
ENV['COVERAGE'] = 'true'
|
36
|
+
Rake::Task['test'].invoke
|
37
|
+
end
|
data/test/test.sqlite3
ADDED
Binary file
|
data/test/test_helper.rb
CHANGED
@@ -1,11 +1,33 @@
|
|
1
|
-
require '
|
2
|
-
require 'mocha'
|
1
|
+
require 'pathname'
|
3
2
|
|
4
3
|
require 'boot'
|
4
|
+
require 'mocha/setup'
|
5
|
+
|
6
|
+
if ENV['COVERAGE']
|
7
|
+
COVERAGE_THRESHOLD = 49
|
8
|
+
require 'simplecov'
|
9
|
+
require 'simplecov-rcov'
|
10
|
+
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
11
|
+
SimpleCov.start do
|
12
|
+
add_filter '/test/'
|
13
|
+
add_group 'lib', 'lib'
|
14
|
+
end
|
15
|
+
SimpleCov.at_exit do
|
16
|
+
SimpleCov.result.format!
|
17
|
+
percent = SimpleCov.result.covered_percent
|
18
|
+
unless percent >= COVERAGE_THRESHOLD
|
19
|
+
puts "Coverage must be above #{COVERAGE_THRESHOLD}%. It is #{"%.2f" % percent}%"
|
20
|
+
Kernel.exit(1)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
5
24
|
|
6
25
|
require 'geokit'
|
7
26
|
require 'geokit-rails'
|
8
27
|
|
28
|
+
ActiveRecord::Base.send(:include, Geokit::ActsAsMappable::Glue)
|
29
|
+
ActionController::Base.send(:include, Geokit::GeocoderControl)
|
30
|
+
ActionController::Base.send(:include, GeoKit::IpGeocodeLookup)
|
9
31
|
|
10
32
|
class GeokitTestCase < ActiveSupport::TestCase
|
11
33
|
begin
|
@@ -14,10 +36,9 @@ class GeokitTestCase < ActiveSupport::TestCase
|
|
14
36
|
puts "You appear to be using a pre-2.3 version of Rails. No need to include ActiveRecord::TestFixtures."
|
15
37
|
end
|
16
38
|
|
17
|
-
self.fixture_path =
|
39
|
+
self.fixture_path = (PLUGIN_ROOT + 'test/fixtures').to_s
|
18
40
|
self.use_transactional_fixtures = true
|
19
41
|
self.use_instantiated_fixtures = false
|
20
42
|
|
21
|
-
fixtures :all
|
22
|
-
|
43
|
+
fixtures :all
|
23
44
|
end
|
metadata
CHANGED
@@ -1,161 +1,258 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: geokit-rails
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 4
|
10
|
-
version: 1.1.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0.rc1
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
7
|
+
- Michael Noack
|
13
8
|
- Andre Lewis
|
14
9
|
- Bill Eisenhauer
|
10
|
+
- Jeremy Lecour
|
15
11
|
autorequire:
|
16
12
|
bindir: bin
|
17
13
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rails
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
23
|
+
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: geokit
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ~>
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '1.5'
|
36
37
|
type: :runtime
|
37
|
-
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: rubyforge
|
40
38
|
prerelease: false
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.5'
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: bundler
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ! '>'
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '1.0'
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ! '>'
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '1.0'
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: simplecov
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ! '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: simplecov-rcov
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: mocha
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ~>
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0.9'
|
52
93
|
type: :development
|
53
|
-
version_requirements: *id002
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
|
-
name: hoe
|
56
94
|
prerelease: false
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ~>
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0.9'
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: mysql
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ~>
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '2.8'
|
68
107
|
type: :development
|
69
|
-
|
70
|
-
|
71
|
-
|
108
|
+
prerelease: false
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ~>
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '2.8'
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: mysql2
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ~>
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0.2'
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ~>
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0.2'
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: pg
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ~>
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0.10'
|
135
|
+
type: :development
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0.10'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: sqlite3
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ! '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
type: :development
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ! '>='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
description: Official Geokit plugin for Rails/ActiveRecord. Provides location-based
|
157
|
+
goodness for your Rails app. Requires the Geokit gem.
|
158
|
+
email:
|
159
|
+
- michael@noack.com.au
|
72
160
|
- andre@earthcode.com
|
73
|
-
-
|
161
|
+
- bill_eisenhauer@yahoo.com
|
162
|
+
- jeremy.lecour@gmail.com
|
74
163
|
executables: []
|
75
|
-
|
76
164
|
extensions: []
|
77
|
-
|
78
|
-
|
79
|
-
- Manifest.txt
|
80
|
-
files:
|
81
|
-
- CHANGELOG.rdoc
|
82
|
-
- MIT-LICENSE
|
83
|
-
- Manifest.txt
|
84
|
-
- README.markdown
|
85
|
-
- Rakefile
|
86
|
-
- about.yml
|
87
|
-
- assets/api_keys_template
|
88
|
-
- geokit-rails.gemspec
|
89
|
-
- init.rb
|
90
|
-
- install.rb
|
165
|
+
extra_rdoc_files: []
|
166
|
+
files:
|
91
167
|
- lib/geokit-rails.rb
|
92
|
-
- lib/geokit-rails/
|
93
|
-
- lib/geokit-rails/adapters/abstract.rb
|
168
|
+
- lib/geokit-rails/adapters/sqlite.rb
|
94
169
|
- lib/geokit-rails/adapters/mysql.rb
|
95
|
-
- lib/geokit-rails/adapters/
|
170
|
+
- lib/geokit-rails/adapters/abstract.rb
|
96
171
|
- lib/geokit-rails/adapters/sqlserver.rb
|
172
|
+
- lib/geokit-rails/adapters/mysql2.rb
|
173
|
+
- lib/geokit-rails/adapters/postgresql.rb
|
97
174
|
- lib/geokit-rails/defaults.rb
|
98
|
-
- lib/geokit-rails/
|
175
|
+
- lib/geokit-rails/core_extensions.rb
|
176
|
+
- lib/geokit-rails/version.rb
|
177
|
+
- lib/geokit-rails/acts_as_mappable.rb
|
99
178
|
- lib/geokit-rails/ip_geocode_lookup.rb
|
100
|
-
-
|
101
|
-
-
|
102
|
-
- test/database.yml
|
103
|
-
- test/fixtures/companies.yml
|
104
|
-
- test/fixtures/custom_locations.yml
|
105
|
-
- test/fixtures/locations.yml
|
106
|
-
- test/fixtures/mock_addresses.yml
|
107
|
-
- test/fixtures/mock_families.yml
|
108
|
-
- test/fixtures/mock_houses.yml
|
109
|
-
- test/fixtures/mock_organizations.yml
|
110
|
-
- test/fixtures/mock_people.yml
|
111
|
-
- test/fixtures/stores.yml
|
112
|
-
- test/ip_geocode_lookup_test.rb
|
113
|
-
- test/models/company.rb
|
179
|
+
- lib/geokit-rails/geocoder_control.rb
|
180
|
+
- lib/geokit-rails/railtie.rb
|
114
181
|
- test/models/custom_location.rb
|
115
182
|
- test/models/location.rb
|
183
|
+
- test/models/store.rb
|
184
|
+
- test/models/mock_organization.rb
|
116
185
|
- test/models/mock_address.rb
|
186
|
+
- test/models/mock_person.rb
|
187
|
+
- test/models/company.rb
|
117
188
|
- test/models/mock_family.rb
|
118
189
|
- test/models/mock_house.rb
|
119
|
-
- test/
|
120
|
-
- test/
|
121
|
-
- test/models/store.rb
|
190
|
+
- test/database.yml
|
191
|
+
- test/test.sqlite3
|
122
192
|
- test/schema.rb
|
123
193
|
- test/tasks.rake
|
194
|
+
- test/ip_geocode_lookup_test.disabled.rb
|
195
|
+
- test/sqlite-debug.log
|
196
|
+
- test/fixtures/mock_families.yml
|
197
|
+
- test/fixtures/companies.yml
|
198
|
+
- test/fixtures/stores.yml
|
199
|
+
- test/fixtures/mock_addresses.yml
|
200
|
+
- test/fixtures/mock_people.yml
|
201
|
+
- test/fixtures/custom_locations.yml
|
202
|
+
- test/fixtures/mock_houses.yml
|
203
|
+
- test/fixtures/locations.yml
|
204
|
+
- test/fixtures/mock_organizations.yml
|
205
|
+
- test/boot.rb
|
124
206
|
- test/test_helper.rb
|
125
|
-
|
126
|
-
homepage:
|
207
|
+
- test/acts_as_mappable_test.rb
|
208
|
+
homepage: http://github.com/geokit/geokit-rails
|
127
209
|
licenses: []
|
128
|
-
|
210
|
+
metadata: {}
|
129
211
|
post_install_message:
|
130
|
-
rdoc_options:
|
131
|
-
|
132
|
-
- README.txt
|
133
|
-
require_paths:
|
212
|
+
rdoc_options: []
|
213
|
+
require_paths:
|
134
214
|
- lib
|
135
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
none: false
|
146
|
-
requirements:
|
147
|
-
- - ">="
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
hash: 3
|
150
|
-
segments:
|
151
|
-
- 0
|
152
|
-
version: "0"
|
215
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - ! '>='
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '0'
|
220
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ! '>='
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: 1.3.6
|
153
225
|
requirements: []
|
154
|
-
|
155
|
-
|
156
|
-
rubygems_version: 1.3.7
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 2.0.3
|
157
228
|
signing_key:
|
158
|
-
specification_version:
|
159
|
-
summary:
|
160
|
-
test_files:
|
229
|
+
specification_version: 4
|
230
|
+
summary: Integrate Geokit with Rails
|
231
|
+
test_files:
|
232
|
+
- test/models/custom_location.rb
|
233
|
+
- test/models/location.rb
|
234
|
+
- test/models/store.rb
|
235
|
+
- test/models/mock_organization.rb
|
236
|
+
- test/models/mock_address.rb
|
237
|
+
- test/models/mock_person.rb
|
238
|
+
- test/models/company.rb
|
239
|
+
- test/models/mock_family.rb
|
240
|
+
- test/models/mock_house.rb
|
241
|
+
- test/database.yml
|
242
|
+
- test/test.sqlite3
|
243
|
+
- test/schema.rb
|
244
|
+
- test/tasks.rake
|
245
|
+
- test/ip_geocode_lookup_test.disabled.rb
|
246
|
+
- test/sqlite-debug.log
|
247
|
+
- test/fixtures/mock_families.yml
|
248
|
+
- test/fixtures/companies.yml
|
249
|
+
- test/fixtures/stores.yml
|
250
|
+
- test/fixtures/mock_addresses.yml
|
251
|
+
- test/fixtures/mock_people.yml
|
252
|
+
- test/fixtures/custom_locations.yml
|
253
|
+
- test/fixtures/mock_houses.yml
|
254
|
+
- test/fixtures/locations.yml
|
255
|
+
- test/fixtures/mock_organizations.yml
|
256
|
+
- test/boot.rb
|
161
257
|
- test/test_helper.rb
|
258
|
+
- test/acts_as_mappable_test.rb
|