activerecord-postgres-earthdistance 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +21 -86
- data/README.md +1 -1
- data/activerecord-postgres-earthdistance.gemspec +2 -2
- data/lib/activerecord-postgres-earthdistance/acts_as_geolocated.rb +3 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa10e1e01f4e26d80e188024f16177899ef524b7
|
4
|
+
data.tar.gz: 2b86f09f526262b9d4e5e69bee619714c7bbb4b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2eb157285ff752f9b9e53dc98afa332d584da45e962174bff85adfcb5b5cb4e8aa5c8ee2548f401408b2a4620578bdd9dba25b7add3ca24327977b930515314
|
7
|
+
data.tar.gz: c706f3332b474f697b7b8abd09d66f44491927ede254554f774816c111e0f6b93ddfbb4d1c05c944daf84cdce2b319d3591ba4040080caaef423feb8a54d7dbf
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,96 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activerecord-postgres-earthdistance (0.4.
|
4
|
+
activerecord-postgres-earthdistance (0.4.4)
|
5
|
+
activerecord (>= 3.1)
|
5
6
|
pg
|
6
|
-
rails (>= 3.1)
|
7
7
|
rake
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: http://rubygems.org/
|
11
11
|
specs:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
activesupport (= 4.2.3)
|
21
|
-
rack (~> 1.6)
|
22
|
-
rack-test (~> 0.6.2)
|
23
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
-
actionview (4.2.3)
|
26
|
-
activesupport (= 4.2.3)
|
27
|
-
builder (~> 3.1)
|
28
|
-
erubis (~> 2.7.0)
|
29
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
31
|
-
activejob (4.2.3)
|
32
|
-
activesupport (= 4.2.3)
|
33
|
-
globalid (>= 0.3.0)
|
34
|
-
activemodel (4.2.3)
|
35
|
-
activesupport (= 4.2.3)
|
36
|
-
builder (~> 3.1)
|
37
|
-
activerecord (4.2.3)
|
38
|
-
activemodel (= 4.2.3)
|
39
|
-
activesupport (= 4.2.3)
|
40
|
-
arel (~> 6.0)
|
41
|
-
activesupport (4.2.3)
|
12
|
+
activemodel (5.0.0)
|
13
|
+
activesupport (= 5.0.0)
|
14
|
+
activerecord (5.0.0)
|
15
|
+
activemodel (= 5.0.0)
|
16
|
+
activesupport (= 5.0.0)
|
17
|
+
arel (~> 7.0)
|
18
|
+
activesupport (5.0.0)
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
42
20
|
i18n (~> 0.7)
|
43
|
-
json (~> 1.7, >= 1.7.7)
|
44
21
|
minitest (~> 5.1)
|
45
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
46
22
|
tzinfo (~> 1.1)
|
47
|
-
arel (
|
48
|
-
|
23
|
+
arel (7.1.1)
|
24
|
+
concurrent-ruby (1.0.2)
|
49
25
|
diff-lcs (1.2.5)
|
50
|
-
erubis (2.7.0)
|
51
|
-
globalid (0.3.5)
|
52
|
-
activesupport (>= 4.1.0)
|
53
26
|
i18n (0.7.0)
|
54
27
|
json (1.8.3)
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
mini_portile (0.6.2)
|
61
|
-
minitest (5.7.0)
|
62
|
-
nokogiri (1.6.6.2)
|
63
|
-
mini_portile (~> 0.6.0)
|
64
|
-
pg (0.18.2)
|
65
|
-
rack (1.6.4)
|
66
|
-
rack-test (0.6.3)
|
67
|
-
rack (>= 1.0)
|
68
|
-
rails (4.2.3)
|
69
|
-
actionmailer (= 4.2.3)
|
70
|
-
actionpack (= 4.2.3)
|
71
|
-
actionview (= 4.2.3)
|
72
|
-
activejob (= 4.2.3)
|
73
|
-
activemodel (= 4.2.3)
|
74
|
-
activerecord (= 4.2.3)
|
75
|
-
activesupport (= 4.2.3)
|
76
|
-
bundler (>= 1.3.0, < 2.0)
|
77
|
-
railties (= 4.2.3)
|
78
|
-
sprockets-rails
|
79
|
-
rails-deprecated_sanitizer (1.0.3)
|
80
|
-
activesupport (>= 4.2.0.alpha)
|
81
|
-
rails-dom-testing (1.0.6)
|
82
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
83
|
-
nokogiri (~> 1.6.0)
|
84
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
85
|
-
rails-html-sanitizer (1.0.2)
|
86
|
-
loofah (~> 2.0)
|
87
|
-
railties (4.2.3)
|
88
|
-
actionpack (= 4.2.3)
|
89
|
-
activesupport (= 4.2.3)
|
90
|
-
rake (>= 0.8.7)
|
91
|
-
thor (>= 0.18.1, < 2.0)
|
92
|
-
rake (10.4.2)
|
93
|
-
rdoc (4.2.0)
|
28
|
+
minitest (5.9.0)
|
29
|
+
pg (0.18.4)
|
30
|
+
rake (11.2.2)
|
31
|
+
rdoc (4.2.1)
|
32
|
+
json (~> 1.4)
|
94
33
|
rspec (2.99.0)
|
95
34
|
rspec-core (~> 2.99.0)
|
96
35
|
rspec-expectations (~> 2.99.0)
|
@@ -98,14 +37,7 @@ GEM
|
|
98
37
|
rspec-core (2.99.2)
|
99
38
|
rspec-expectations (2.99.2)
|
100
39
|
diff-lcs (>= 1.1.3, < 2.0)
|
101
|
-
rspec-mocks (2.99.
|
102
|
-
sprockets (3.2.0)
|
103
|
-
rack (~> 1.0)
|
104
|
-
sprockets-rails (2.3.2)
|
105
|
-
actionpack (>= 3.0)
|
106
|
-
activesupport (>= 3.0)
|
107
|
-
sprockets (>= 2.8, < 4.0)
|
108
|
-
thor (0.19.1)
|
40
|
+
rspec-mocks (2.99.4)
|
109
41
|
thread_safe (0.3.5)
|
110
42
|
tzinfo (1.2.2)
|
111
43
|
thread_safe (~> 0.1)
|
@@ -118,3 +50,6 @@ DEPENDENCIES
|
|
118
50
|
bundler
|
119
51
|
rdoc
|
120
52
|
rspec (~> 2.11)
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
1.12.5
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#ActiveRecord + PostgreSQL Earthdistance [![Build Status](https://travis-ci.org/diogob/activerecord-postgres-earthdistance.
|
1
|
+
#ActiveRecord + PostgreSQL Earthdistance [![Build Status](https://travis-ci.org/diogob/activerecord-postgres-earthdistance.svg?branch=master)](https://travis-ci.org/diogob/activerecord-postgres-earthdistance)
|
2
2
|
|
3
3
|
Check distances with latitude and longitude using PostgreSQL special indexes.
|
4
4
|
This gem enables your model to query the database using the earthdistance extension. This should be much faster than using trigonometry functions over standard indexes.
|
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "activerecord-postgres-earthdistance"
|
7
|
-
s.version = "0.4.
|
7
|
+
s.version = "0.4.4"
|
8
8
|
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.license = "MIT"
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.required_ruby_version = ">= 1.8.7"
|
17
17
|
s.required_rubygems_version = ">= 1.3.6"
|
18
18
|
|
19
|
-
s.add_dependency "
|
19
|
+
s.add_dependency "activerecord", ">= 3.1"
|
20
20
|
s.add_dependency "rake"
|
21
21
|
s.add_dependency "pg"
|
22
22
|
s.add_development_dependency "bundler"
|
@@ -4,11 +4,9 @@ module ActiveRecordPostgresEarthdistance
|
|
4
4
|
|
5
5
|
module ClassMethods
|
6
6
|
def acts_as_geolocated(options = {})
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
self.longitude_column = options[:lng] || (column_names.include?("lng") ? "lng" : "longitude")
|
11
|
-
end
|
7
|
+
cattr_accessor :latitude_column, :longitude_column
|
8
|
+
self.latitude_column = options[:lat] || (column_names.include?("lat") ? "lat" : "latitude")
|
9
|
+
self.longitude_column = options[:lng] || (column_names.include?("lng") ? "lng" : "longitude")
|
12
10
|
end
|
13
11
|
|
14
12
|
def within_box(radius, lat, lng)
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgres-earthdistance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diogo Biazus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: 1.3.6
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.5.1
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Check distances with latitude and longitude using PostgreSQL special indexes
|