rails-geocoder 0.8.4 → 0.8.5

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/CHANGELOG.rdoc CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Per-release changes to Geocoder.
4
4
 
5
+ == 0.8.5 (2009 Oct 26)
6
+
7
+ * Avoid calling deprecated method from within Geocoder itself.
8
+
5
9
  == 0.8.4 (2009 Oct 23)
6
10
 
7
11
  * Deprecate <tt>find_near</tt> class method in favor of +near+ named scope.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.4
1
+ 0.8.5
data/lib/geocoder.rb CHANGED
@@ -29,7 +29,7 @@ module Geocoder
29
29
  latitude, longitude = location.is_a?(Array) ?
30
30
  location : Geocoder.fetch_coordinates(location)
31
31
  if latitude and longitude
32
- find_near_options(latitude, longitude, *args)
32
+ near_scope_options(latitude, longitude, *args)
33
33
  else
34
34
  {}
35
35
  end
@@ -63,7 +63,7 @@ module Geocoder
63
63
  # +limit+ :: number of records to return (for LIMIT SQL clause)
64
64
  # +offset+ :: number of records to skip (for LIMIT SQL clause)
65
65
  #
66
- def find_near_options(latitude, longitude, radius = 20, options = {})
66
+ def near_scope_options(latitude, longitude, radius = 20, options = {})
67
67
 
68
68
  # set defaults/clean up arguments
69
69
  options[:order] ||= 'distance ASC'
@@ -137,7 +137,7 @@ module Geocoder
137
137
  def nearbys(radius = 20)
138
138
  return [] unless geocoded?
139
139
  lat,lon = self.class._get_coordinates(self)
140
- self.class.find_near([lat, lon], radius) - [self]
140
+ self.class.near([lat, lon], radius) - [self]
141
141
  end
142
142
 
143
143
  ##
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails-geocoder}
8
- s.version = "0.8.4"
8
+ s.version = "0.8.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alex Reisner"]
12
- s.date = %q{2009-10-23}
12
+ s.date = %q{2009-10-26}
13
13
  s.description = %q{Geocoder adds object geocoding and database-agnostic distance calculations to Ruby on Rails. It does not rely on proprietary database functions so finding geocoded objects in a given area is easily done using out-of-the-box MySQL or even SQLite.}
14
14
  s.email = %q{alex@alexreisner.com}
15
15
  s.extra_rdoc_files = [
data/test/test_helper.rb CHANGED
@@ -47,6 +47,8 @@ end
47
47
  class Venue < ActiveRecord::Base
48
48
  geocoded_by :address
49
49
 
50
+ attr_accessor :name, :address
51
+
50
52
  def initialize(name, address)
51
53
  super()
52
54
  write_attribute :name, name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-geocoder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Reisner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-23 00:00:00 -04:00
12
+ date: 2009-10-26 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15