From 926467f159f2a45c8610e15d51e27f8b2ba12aaa Mon Sep 17 00:00:00 2001 From: Matthew Landauer <matthew@openaustralia.org> Date: Mon, 22 Oct 2012 16:33:26 +1100 Subject: [PATCH] Make near_scope_options private again --- lib/geocoder/stores/active_record.rb | 4 ++-- test/near_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/geocoder/stores/active_record.rb b/lib/geocoder/stores/active_record.rb index 5e523c27..b088089f 100644 --- a/lib/geocoder/stores/active_record.rb +++ b/lib/geocoder/stores/active_record.rb @@ -77,6 +77,8 @@ module Geocoder::Store end end + private # ---------------------------------------------------------------- + ## # Get options hash suitable for passing to ActiveRecord.find to get # records within a radius (in kilometers) of the given point. @@ -120,8 +122,6 @@ module Geocoder::Store } end - private # ---------------------------------------------------------------- - ## # SQL for calculating distance based on the current database's # capabilities (trig functions?). diff --git a/test/near_test.rb b/test/near_test.rb index 3a19bbe3..359f2011 100644 --- a/test/near_test.rb +++ b/test/near_test.rb @@ -3,7 +3,7 @@ require 'test_helper' class NearTest < Test::Unit::TestCase def test_near_scope_options_without_sqlite_includes_bounding_box_condition - result = Event.near_scope_options(1.0, 2.0, 5) + result = Event.send(:near_scope_options, 1.0, 2.0, 5) assert_match /test_table_name.latitude BETWEEN 0.9276\d* AND 1.0723\d* AND test_table_name.longitude BETWEEN 1.9276\d* AND 2.0723\d* AND /, result[:conditions][0] -- GitLab