mongoid_geospatial 2.7.1 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -1
- data/README.md +21 -1
- data/lib/mongoid_geospatial/geospatial.rb +3 -0
- data/lib/mongoid_geospatial/version.rb +1 -1
- data/mongoid_geospatial.gemspec +4 -5
- data/spec/models/bar.rb +2 -2
- metadata +9 -25
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
gemspec # Specify gem's dependencies in mongoid_geospatial.gemspec
|
3
3
|
|
4
|
-
gem 'mongoid', '
|
4
|
+
gem 'mongoid', '>= 3.0'
|
5
5
|
|
6
6
|
group :development do
|
7
7
|
gem 'rgeo'
|
@@ -12,3 +12,8 @@ group :development do
|
|
12
12
|
gem 'pry'
|
13
13
|
# gem 'fuubar'
|
14
14
|
end
|
15
|
+
|
16
|
+
group :test do
|
17
|
+
gem 'dbf'
|
18
|
+
gem 'nokogiri'
|
19
|
+
end
|
data/README.md
CHANGED
@@ -14,7 +14,6 @@ There are no plans to support MongoDB < 2.0
|
|
14
14
|
There are no plans to support Mongoid <= 2.0
|
15
15
|
|
16
16
|
|
17
|
-
|
18
17
|
Quick Start
|
19
18
|
-----------
|
20
19
|
|
@@ -44,12 +43,33 @@ You can also use an external Geometric/Spatial alongside.
|
|
44
43
|
end
|
45
44
|
|
46
45
|
|
46
|
+
For geo points, an extra macro `geo_field` is available
|
47
|
+
|
48
|
+
|
49
|
+
class Place
|
50
|
+
include Mongoid::Document
|
51
|
+
include Mongoid::Geospatial
|
52
|
+
|
53
|
+
# field :location, type: Point, spatial: true
|
54
|
+
geo_field :location
|
55
|
+
end
|
56
|
+
|
57
|
+
|
47
58
|
Generate indexes on MongoDB:
|
48
59
|
|
49
60
|
|
50
61
|
rake db:mongoid:create_indexes
|
51
62
|
|
52
63
|
|
64
|
+
Index programatically via https://github.com/kristianmandrup/mongoid_indexing gem
|
65
|
+
|
66
|
+
|
67
|
+
Mongoid::Indexing.create_indexes
|
68
|
+
|
69
|
+
|
70
|
+
This is fx useful when running specs or when working with spatials on a gem or engine.
|
71
|
+
|
72
|
+
|
53
73
|
Points
|
54
74
|
------
|
55
75
|
|
data/mongoid_geospatial.gemspec
CHANGED
@@ -16,10 +16,9 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = Mongoid::Geospatial::VERSION
|
17
17
|
|
18
18
|
gem.add_dependency('mongoid', ['>= 3.0.0'])
|
19
|
-
gem.add_dependency('activesupport', ["
|
20
|
-
gem.add_development_dependency('yard', ["
|
21
|
-
gem.add_development_dependency('rspec', ['
|
22
|
-
gem.add_development_dependency('mocha', ['>= 0'])
|
23
|
-
gem.add_development_dependency('will_paginate', ['>= 0'])
|
19
|
+
gem.add_dependency('activesupport', [">= 3.2"])
|
20
|
+
gem.add_development_dependency('yard', [">= 0.6.0"])
|
21
|
+
gem.add_development_dependency('rspec', ['>= 2.11'])
|
24
22
|
gem.add_development_dependency('kaminari', ['>= 0'])
|
23
|
+
gem.add_development_dependency('will_paginate', ['>= 0'])
|
25
24
|
end
|
data/spec/models/bar.rb
CHANGED
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.
|
4
|
+
version: 2.7.2
|
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: 2013-02
|
13
|
+
date: 2013-03-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mongoid
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
none: false
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - ! '>='
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '3.2'
|
39
39
|
type: :runtime
|
@@ -41,7 +41,7 @@ dependencies:
|
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - ! '>='
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '3.2'
|
47
47
|
- !ruby/object:Gem::Dependency
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.6.0
|
55
55
|
type: :development
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
none: false
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ! '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.6.0
|
63
63
|
- !ruby/object:Gem::Dependency
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ! '>='
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '2.11'
|
71
71
|
type: :development
|
@@ -73,11 +73,11 @@ dependencies:
|
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ! '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '2.11'
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
|
-
name:
|
80
|
+
name: kaminari
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
none: false
|
83
83
|
requirements:
|
@@ -108,22 +108,6 @@ dependencies:
|
|
108
108
|
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: kaminari
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ! '>='
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
|
-
requirements:
|
124
|
-
- - ! '>='
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: '0'
|
127
111
|
description: Mongoid Extension that simplifies spatial calculations. Adds integration
|
128
112
|
into mongoid so pagination and other function continue to work. It adds symbol extensions
|
129
113
|
to simplify query creation.
|