mongoid_spacial 0.2.2 → 0.2.3
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/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.3
|
|
@@ -24,8 +24,10 @@ module Mongoid #:nodoc:
|
|
|
24
24
|
query = {"$#{operator}" => v[:point] }
|
|
25
25
|
if v[:max]
|
|
26
26
|
if unit = Mongoid::Spacial.earth_radius[v[:unit]]
|
|
27
|
-
unit
|
|
27
|
+
unit *= Mongoid::Spacial::RAD_PER_DEG unless operator =~ /sphere/i
|
|
28
28
|
query['$maxDistance'] = v[:max]/unit
|
|
29
|
+
else
|
|
30
|
+
query['$maxDistance'] = v[:max]
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
query
|
|
@@ -33,7 +33,7 @@ module Mongoid #:nodoc:
|
|
|
33
33
|
input[:point] = input[:point].to_lng_lat if input[:point].respond_to?(:to_lng_lat)
|
|
34
34
|
if input[:max]
|
|
35
35
|
if unit = Mongoid::Spacial.earth_radius[input[:unit]]
|
|
36
|
-
unit
|
|
36
|
+
unit *= Mongoid::Spacial::RAD_PER_DEG unless operator =~ /sphere/i
|
|
37
37
|
input[:max] = input[:max]/unit
|
|
38
38
|
end
|
|
39
39
|
input = [input[:point],input[:max]]
|
data/mongoid_spacial.gemspec
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: mongoid_spacial
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.2.
|
|
5
|
+
version: 0.2.3
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Ryan Ong
|
|
@@ -262,7 +262,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
262
262
|
requirements:
|
|
263
263
|
- - ">="
|
|
264
264
|
- !ruby/object:Gem::Version
|
|
265
|
-
hash: -
|
|
265
|
+
hash: -1587512017172586641
|
|
266
266
|
segments:
|
|
267
267
|
- 0
|
|
268
268
|
version: "0"
|