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.

@@ -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
- %w(mysql postgresql sqlserver).each do |configuration|
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/**/*_test.rb'
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
Binary file
@@ -1,11 +1,33 @@
1
- require 'rubygems'
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 = File.join(File.dirname(__FILE__), 'fixtures')
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
- hash: 27
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
- date: 2010-09-08 00:00:00 +02:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- name: geokit
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
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 1
33
- - 5
34
- - 0
35
- version: 1.5.0
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
- requirement: &id002 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 7
47
- segments:
48
- - 2
49
- - 0
50
- - 4
51
- version: 2.0.4
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
- requirement: &id003 !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- hash: 19
63
- segments:
64
- - 2
65
- - 6
66
- - 2
67
- version: 2.6.2
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
- version_requirements: *id003
70
- description: ""
71
- email:
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
- - bill@billeisenhauer.com
161
+ - bill_eisenhauer@yahoo.com
162
+ - jeremy.lecour@gmail.com
74
163
  executables: []
75
-
76
164
  extensions: []
77
-
78
- extra_rdoc_files:
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/acts_as_mappable.rb
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/postgresql.rb
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/geocoder_control.rb
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
- - test/acts_as_mappable_test.rb
101
- - test/boot.rb
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/models/mock_organization.rb
120
- - test/models/mock_person.rb
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
- has_rdoc: true
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
- - --main
132
- - README.txt
133
- require_paths:
212
+ rdoc_options: []
213
+ require_paths:
134
214
  - lib
135
- required_ruby_version: !ruby/object:Gem::Requirement
136
- none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- hash: 3
141
- segments:
142
- - 0
143
- version: "0"
144
- required_rubygems_version: !ruby/object:Gem::Requirement
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
- rubyforge_project: geokit-rails
156
- rubygems_version: 1.3.7
226
+ rubyforge_project:
227
+ rubygems_version: 2.0.3
157
228
  signing_key:
158
- specification_version: 3
159
- summary: Geo distance calculations, distance calculation query support, geocoding for physical and ip addresses.
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