diff --git a/lib/geocoder.rb b/lib/geocoder.rb index cc5dcffc8689f4a152938d9ed54f3d429c9ecac9..8be093abd6ead3775755c0146445001e82b972f9 100644 --- a/lib/geocoder.rb +++ b/lib/geocoder.rb @@ -39,14 +39,6 @@ module Geocoder results.first.address end end - - ## - # The working Cache object, or +nil+ if none configured. - # - def cache - warn "WARNING: Calling Geocoder.cache is DEPRECATED. The #cache method now belongs to the Geocoder::Lookup object." - Geocoder::Lookup.get(Geocoder.config.lookup).cache - end end # load Railtie if Rails exists diff --git a/lib/geocoder/configuration.rb b/lib/geocoder/configuration.rb index dc5d422280063d9ae513efadd287fe78bb82513d..9248b97b95bb909a165579c9e278c4dbb0c1072e 100644 --- a/lib/geocoder/configuration.rb +++ b/lib/geocoder/configuration.rb @@ -14,14 +14,8 @@ module Geocoder # ) # def self.configure(options = nil, &block) - if block_given? - warn "WARNING: Passing a block to Geocoder.configure is DEPRECATED. Please pass a hash instead (eg: Geocoder.configure(:units => ..., :api_key => ...))." - block.call(Configuration.instance) - elsif !options.nil? + if !options.nil? Configuration.instance.configure(options) - else - warn "WARNING: Use of Geocoder.configure to read or write single config options is DEPRECATED. To write to the config please pass a hash (eg: Geocoder.configure(:units => ...)). To read config options please use the Geocoder.config object (eg: Geocoder.config.units)." - Configuration.instance end end diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 3ea27572e167642a1c7b22e9440c731af04ee942..212f87ae988afa779dbbca3968a715dfe52baece 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -23,16 +23,6 @@ class ConfigurationTest < Test::Unit::TestCase assert_equal :test, Geocoder.config.units end - def test_setting_with_block_syntax - orig = $VERBOSE; $VERBOSE = nil - Geocoder.configure do |config| - config.units = :test - end - assert_equal :test, Geocoder.config.units - ensure - $VERBOSE = orig - end - def test_config_for_lookup Geocoder.configure( :timeout => 5,