mongoid_geospatial 2.7.0 → 2.7.1

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.
data/Gemfile CHANGED
@@ -6,6 +6,7 @@ gem 'mongoid', '~> 3.0'
6
6
  group :development do
7
7
  gem 'rgeo'
8
8
  gem 'georuby'
9
+ gem 'dbf'
9
10
  gem 'rspec'
10
11
  gem 'guard-rspec'
11
12
  gem 'pry'
data/README.md CHANGED
@@ -112,7 +112,7 @@ And for polygons and lines:
112
112
 
113
113
 
114
114
  Query
115
- --------
115
+ -----
116
116
 
117
117
  Before you read about mongoid_spatial have sure you read this:
118
118
 
@@ -200,7 +200,7 @@ To illustrate:
200
200
 
201
201
 
202
202
  Configure
203
- ----------------
203
+ ---------
204
204
 
205
205
  Assemble it as you need (use a initializer file):
206
206
 
@@ -465,6 +465,12 @@ Indexes need to be created. Execute command:
465
465
 
466
466
  rake db:mongoid:create_indexes
467
467
 
468
+ Using mongoid_geospatial (or mongoid for that matter) without rails?
469
+
470
+ https://github.com/kristianmandrup/mongoid_indexing
471
+
472
+ You need a way to create indexes easily, check out the gem above.
473
+
468
474
 
469
475
  Thanks
470
476
  ------
@@ -488,4 +494,6 @@ Contributing
488
494
  Copyright
489
495
  -----------
490
496
 
491
- Copyright (c) 2011 Ryan Ong. See LICENSE.txt for further details.
497
+ WTFPL
498
+
499
+ http://en.wikipedia.org/wiki/WTFPL
@@ -28,8 +28,8 @@ module Mongoid
28
28
  included do
29
29
  # attr_accessor :geo
30
30
  cattr_accessor :spatial_fields, :spatial_fields_indexed
31
- @@spatial_fields = []
32
- @@spatial_fields_indexed = []
31
+ self.spatial_fields = []
32
+ self.spatial_fields_indexed = []
33
33
  end
34
34
 
35
35
  def self.use_rgeo
@@ -10,8 +10,8 @@ Mongoid::Fields.option :spatial do |model,field,options|
10
10
  # end
11
11
 
12
12
  model.class_eval do
13
- (self.spatial_fields ||= []) << field.name.to_sym
14
- (self.spatial_fields_indexed ||= []) << field.name.to_sym
13
+ self.spatial_fields << field.name.to_sym
14
+ self.spatial_fields_indexed << field.name.to_sym
15
15
 
16
16
  # Create 2D index
17
17
  spatial_index field.name
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Geospatial
3
- VERSION = "2.7.0"
3
+ VERSION = "2.7.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_geospatial
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-22 00:00:00.000000000 Z
13
+ date: 2013-02-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mongoid
@@ -167,7 +167,6 @@ files:
167
167
  - spec/models/place.rb
168
168
  - spec/models/river.rb
169
169
  - spec/mongoid_geospatial/extensions/core_ext_spec.rb
170
- - spec/mongoid_geospatial/field_option_spec.rb
171
170
  - spec/mongoid_geospatial/fields/box_spec.rb
172
171
  - spec/mongoid_geospatial/fields/circle_spec.rb
173
172
  - spec/mongoid_geospatial/fields/line_spec.rb
@@ -219,7 +218,6 @@ test_files:
219
218
  - spec/models/place.rb
220
219
  - spec/models/river.rb
221
220
  - spec/mongoid_geospatial/extensions/core_ext_spec.rb
222
- - spec/mongoid_geospatial/field_option_spec.rb
223
221
  - spec/mongoid_geospatial/fields/box_spec.rb
224
222
  - spec/mongoid_geospatial/fields/circle_spec.rb
225
223
  - spec/mongoid_geospatial/fields/line_spec.rb
File without changes