kingpin 0.7.0 → 0.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/VERSION +1 -1
- data/kingpin.gemspec +2 -2
- data/lib/king_pin.rb +4 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/kingpin.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kingpin}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jan Roesner"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-31}
|
13
13
|
s.description = %q{Kingpin extends every ActiveRecord model to become a Pincaster pin automatically. Thus the model automatically creates a Pincaster pin everytime it is saved. Kingpin afterwards provides methods at class and instance level that make geolocation easy and thanks to Pincaster amazingly fast.}
|
14
14
|
s.email = %q{jan@roesner.it}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/king_pin.rb
CHANGED
@@ -42,6 +42,10 @@ module KingpinInstanceMethods
|
|
42
42
|
JSON.parse(Pincaster.nearby(self, radius, limit))["matches"].map{|p| p["key"]}
|
43
43
|
end
|
44
44
|
|
45
|
+
def nearby_pins(radius, limit=nil)
|
46
|
+
JSON.parse(Pincaster.nearby(self, radius, limit))["matches"]
|
47
|
+
end
|
48
|
+
|
45
49
|
# returns nearby found records in same layer as self, radius metera away, number of results limited to limit
|
46
50
|
def nearby(radius, limit=nil)
|
47
51
|
self.class.find(nearby_ids(radius, limit))
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kingpin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jan Roesner
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-31 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|