activerecord-postgres-earthdistance 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +30 -32
- data/activerecord-postgres-earthdistance.gemspec +1 -1
- data/lib/activerecord-postgres-earthdistance/acts_as_geolocated.rb +5 -3
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c055653d6b3f2dd1175e0a366c93db6e0ec9399f
|
4
|
+
data.tar.gz: 4eda09c2594bd9bc93bbf8b0ca12c6871931391f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecb1b7bc206b06d3b576d85ad2b68df5314a42ab6e83841e2ae75bc30f6a05d19c634af18d0d9a96fbce4bddd6bfd7593d0279b62623c1a475e7502d899655a3
|
7
|
+
data.tar.gz: b41cf665cc0fc78ebe6cd4e763fd3291c069b12c89531f160cf79b17f8097d9b64c95f3229cc77f1e49c6baec6f7a89f49570026bce0411475bb5d29ccd77a11
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activerecord-postgres-earthdistance (0.3.
|
4
|
+
activerecord-postgres-earthdistance (0.3.2)
|
5
5
|
pg
|
6
6
|
rails (>= 3.1)
|
7
7
|
rake
|
@@ -9,32 +9,31 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: http://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionmailer (4.0.
|
13
|
-
actionpack (= 4.0.
|
12
|
+
actionmailer (4.0.4)
|
13
|
+
actionpack (= 4.0.4)
|
14
14
|
mail (~> 2.5.4)
|
15
|
-
actionpack (4.0.
|
16
|
-
activesupport (= 4.0.
|
15
|
+
actionpack (4.0.4)
|
16
|
+
activesupport (= 4.0.4)
|
17
17
|
builder (~> 3.1.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
rack (~> 1.5.2)
|
20
20
|
rack-test (~> 0.6.2)
|
21
|
-
activemodel (4.0.
|
22
|
-
activesupport (= 4.0.
|
21
|
+
activemodel (4.0.4)
|
22
|
+
activesupport (= 4.0.4)
|
23
23
|
builder (~> 3.1.0)
|
24
|
-
activerecord (4.0.
|
25
|
-
activemodel (= 4.0.
|
24
|
+
activerecord (4.0.4)
|
25
|
+
activemodel (= 4.0.4)
|
26
26
|
activerecord-deprecated_finders (~> 1.0.2)
|
27
|
-
activesupport (= 4.0.
|
27
|
+
activesupport (= 4.0.4)
|
28
28
|
arel (~> 4.0.0)
|
29
29
|
activerecord-deprecated_finders (1.0.3)
|
30
|
-
activesupport (4.0.
|
31
|
-
i18n (~> 0.6, >= 0.6.
|
30
|
+
activesupport (4.0.4)
|
31
|
+
i18n (~> 0.6, >= 0.6.9)
|
32
32
|
minitest (~> 4.2)
|
33
33
|
multi_json (~> 1.3)
|
34
34
|
thread_safe (~> 0.1)
|
35
35
|
tzinfo (~> 0.3.37)
|
36
|
-
arel (4.0.
|
37
|
-
atomic (1.1.14)
|
36
|
+
arel (4.0.2)
|
38
37
|
builder (3.1.4)
|
39
38
|
diff-lcs (1.1.3)
|
40
39
|
erubis (2.7.0)
|
@@ -46,26 +45,26 @@ GEM
|
|
46
45
|
treetop (~> 1.4.8)
|
47
46
|
mime-types (1.25.1)
|
48
47
|
minitest (4.7.5)
|
49
|
-
multi_json (1.
|
50
|
-
pg (0.17.
|
51
|
-
polyglot (0.3.
|
48
|
+
multi_json (1.9.2)
|
49
|
+
pg (0.17.1)
|
50
|
+
polyglot (0.3.4)
|
52
51
|
rack (1.5.2)
|
53
52
|
rack-test (0.6.2)
|
54
53
|
rack (>= 1.0)
|
55
|
-
rails (4.0.
|
56
|
-
actionmailer (= 4.0.
|
57
|
-
actionpack (= 4.0.
|
58
|
-
activerecord (= 4.0.
|
59
|
-
activesupport (= 4.0.
|
54
|
+
rails (4.0.4)
|
55
|
+
actionmailer (= 4.0.4)
|
56
|
+
actionpack (= 4.0.4)
|
57
|
+
activerecord (= 4.0.4)
|
58
|
+
activesupport (= 4.0.4)
|
60
59
|
bundler (>= 1.3.0, < 2.0)
|
61
|
-
railties (= 4.0.
|
60
|
+
railties (= 4.0.4)
|
62
61
|
sprockets-rails (~> 2.0.0)
|
63
|
-
railties (4.0.
|
64
|
-
actionpack (= 4.0.
|
65
|
-
activesupport (= 4.0.
|
62
|
+
railties (4.0.4)
|
63
|
+
actionpack (= 4.0.4)
|
64
|
+
activesupport (= 4.0.4)
|
66
65
|
rake (>= 0.8.7)
|
67
66
|
thor (>= 0.18.1, < 2.0)
|
68
|
-
rake (10.
|
67
|
+
rake (10.2.2)
|
69
68
|
rdoc (3.12)
|
70
69
|
json (~> 1.4)
|
71
70
|
rspec (2.12.0)
|
@@ -76,7 +75,7 @@ GEM
|
|
76
75
|
rspec-expectations (2.12.1)
|
77
76
|
diff-lcs (~> 1.1.3)
|
78
77
|
rspec-mocks (2.12.2)
|
79
|
-
sprockets (2.
|
78
|
+
sprockets (2.12.0)
|
80
79
|
hike (~> 1.2)
|
81
80
|
multi_json (~> 1.0)
|
82
81
|
rack (~> 1.0)
|
@@ -85,14 +84,13 @@ GEM
|
|
85
84
|
actionpack (>= 3.0)
|
86
85
|
activesupport (>= 3.0)
|
87
86
|
sprockets (~> 2.8)
|
88
|
-
thor (0.
|
89
|
-
thread_safe (0.
|
90
|
-
atomic
|
87
|
+
thor (0.19.1)
|
88
|
+
thread_safe (0.3.3)
|
91
89
|
tilt (1.4.1)
|
92
90
|
treetop (1.4.15)
|
93
91
|
polyglot
|
94
92
|
polyglot (>= 0.3.1)
|
95
|
-
tzinfo (0.3.
|
93
|
+
tzinfo (0.3.39)
|
96
94
|
|
97
95
|
PLATFORMS
|
98
96
|
ruby
|
@@ -7,9 +7,11 @@ module ActiveRecordPostgresEarthdistance
|
|
7
7
|
|
8
8
|
module ClassMethods
|
9
9
|
def acts_as_geolocated(options = {})
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
if table_exists?
|
11
|
+
cattr_accessor :latitude_column, :longitude_column
|
12
|
+
self.latitude_column = options[:lat] || (column_names.include?("lat") ? "lat" : "latitude")
|
13
|
+
self.longitude_column = options[:lng] || (column_names.include?("lng") ? "lng" : "longitude")
|
14
|
+
end
|
13
15
|
end
|
14
16
|
|
15
17
|
def within_radius radius, lat, lng
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgres-earthdistance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
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: 2014-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pg
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '2.11'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.11'
|
97
97
|
description: This gem enables your model to query the database using the earthdistance
|
@@ -102,10 +102,10 @@ executables: []
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
-
- .document
|
106
|
-
- .gitignore
|
107
|
-
- .rspec
|
108
|
-
- .travis.yml
|
105
|
+
- ".document"
|
106
|
+
- ".gitignore"
|
107
|
+
- ".rspec"
|
108
|
+
- ".travis.yml"
|
109
109
|
- Gemfile
|
110
110
|
- Gemfile.lock
|
111
111
|
- LICENSE
|
@@ -132,17 +132,17 @@ require_paths:
|
|
132
132
|
- lib
|
133
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- -
|
135
|
+
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: 1.8.7
|
138
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: 1.3.6
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.0
|
145
|
+
rubygems_version: 2.2.0
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Check distances with latitude and longitude using PostgreSQL special indexes
|