aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-07-19 14:53:15 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:04 +0200
commit939d4255e690bd0406179cad00836975273fd49e (patch)
tree1753974a2221210ebd6b68b14d1db45951b3fddd /railties
parent7cccfed5943cddd6d72ed0df0ee7291cca9025ad (diff)
downloadrails-939d4255e690bd0406179cad00836975273fd49e.tar.gz
rails-939d4255e690bd0406179cad00836975273fd49e.tar.bz2
rails-939d4255e690bd0406179cad00836975273fd49e.zip
Removed most of deprecated stuff from Application and Engine
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails.rb5
-rw-r--r--railties/lib/rails/application/configuration.rb9
-rw-r--r--railties/lib/rails/configuration.rb81
-rw-r--r--railties/lib/rails/engine.rb3
-rw-r--r--railties/lib/rails/railtie.rb9
-rw-r--r--railties/test/application/configuration_test.rb16
6 files changed, 0 insertions, 123 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb
index 7c41367a84..3663910281 100644
--- a/railties/lib/rails.rb
+++ b/railties/lib/rails.rb
@@ -94,10 +94,5 @@ module Rails
def public_path
application && application.paths.public.to_a.first
end
-
- def public_path=(path)
- ActiveSupport::Deprecation.warn "Setting Rails.public_path= is deprecated. " <<
- "Please set paths.public = in config/application.rb instead.", caller
- end
end
end
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index c248d41e59..7e34a16487 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -1,12 +1,9 @@
-require 'active_support/deprecation'
require 'active_support/core_ext/string/encoding'
require 'rails/engine/configuration'
module Rails
class Application
class Configuration < ::Rails::Engine::Configuration
- include ::Rails::Configuration::Deprecated
-
attr_accessor :allow_concurrency, :cache_classes, :cache_store,
:encoding, :consider_all_requests_local, :dependency_loading,
:filter_parameters, :log_level, :logger,
@@ -53,12 +50,6 @@ module Rails
paths.tmp "tmp"
paths.tmp.cache "tmp/cache"
- if File.exists?("#{root}/test/mocks/#{Rails.env}")
- ActiveSupport::Deprecation.warn "\"Rails.root/test/mocks/#{Rails.env}\" won't be added " <<
- "automatically to load paths anymore in future releases"
- paths.mocks_path "test/mocks", :autoload => true, :glob => Rails.env
- end
-
paths
end
end
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb
index e5af12b901..8369795e71 100644
--- a/railties/lib/rails/configuration.rb
+++ b/railties/lib/rails/configuration.rb
@@ -71,86 +71,5 @@ module Rails
end
end
end
-
- module Deprecated
- def frameworks(*args)
- raise "config.frameworks in no longer supported. See the generated " \
- "config/boot.rb for steps on how to limit the frameworks that " \
- "will be loaded"
- end
- alias :frameworks= :frameworks
-
- def view_path=(value)
- ActiveSupport::Deprecation.warn "config.view_path= is deprecated, " <<
- "please do paths.app.views= instead", caller
- paths.app.views = value
- end
-
- def view_path
- ActiveSupport::Deprecation.warn "config.view_path is deprecated, " <<
- "please do paths.app.views instead", caller
- paths.app.views.to_a.first
- end
-
- def routes_configuration_file=(value)
- ActiveSupport::Deprecation.warn "config.routes_configuration_file= is deprecated, " <<
- "please do paths.config.routes= instead", caller
- paths.config.routes = value
- end
-
- def routes_configuration_file
- ActiveSupport::Deprecation.warn "config.routes_configuration_file is deprecated, " <<
- "please do paths.config.routes instead", caller
- paths.config.routes.to_a.first
- end
-
- def database_configuration_file=(value)
- ActiveSupport::Deprecation.warn "config.database_configuration_file= is deprecated, " <<
- "please do paths.config.database= instead", caller
- paths.config.database = value
- end
-
- def database_configuration_file
- ActiveSupport::Deprecation.warn "config.database_configuration_file is deprecated, " <<
- "please do paths.config.database instead", caller
- paths.config.database.to_a.first
- end
-
- def log_path=(value)
- ActiveSupport::Deprecation.warn "config.log_path= is deprecated, " <<
- "please do paths.log= instead", caller
- paths.config.log = value
- end
-
- def log_path
- ActiveSupport::Deprecation.warn "config.log_path is deprecated, " <<
- "please do paths.log instead", caller
- paths.config.log.to_a.first
- end
-
- def controller_paths=(value)
- ActiveSupport::Deprecation.warn "config.controller_paths= is deprecated, " <<
- "please do paths.app.controllers= instead", caller
- paths.app.controllers = value
- end
-
- def controller_paths
- ActiveSupport::Deprecation.warn "config.controller_paths is deprecated, " <<
- "please do paths.app.controllers instead", caller
- paths.app.controllers.to_a.uniq
- end
-
- def cookie_secret=(value)
- ActiveSupport::Deprecation.warn "config.cookie_secret= is deprecated, " <<
- "please use config.secret_token= instead", caller
- self.secret_token = value
- end
-
- def cookie_secret
- ActiveSupport::Deprecation.warn "config.cookie_secret is deprecated, " <<
- "please use config.secret_token instead", caller
- self.secret_token
- end
- end
end
end
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index efde82d1ed..22e3e931b1 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -94,9 +94,6 @@ module Rails
class << self
attr_accessor :called_from
- # TODO Remove this. It's deprecated.
- alias :engine_name :railtie_name
-
def inherited(base)
unless base.abstract_railtie?
base.called_from = begin
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index 58b0d851f7..7126ec1699 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -1,7 +1,6 @@
require 'rails/initializable'
require 'rails/configuration'
require 'active_support/inflector'
-require 'active_support/deprecation'
module Rails
# Railtie is the core of the Rails Framework and provides several hooks to extend
@@ -142,14 +141,6 @@ module Rails
end
end
- def railtie_name(*)
- ActiveSupport::Deprecation.warn "railtie_name is deprecated and has no effect", caller
- end
-
- def log_subscriber(*)
- ActiveSupport::Deprecation.warn "log_subscriber is deprecated and has no effect", caller
- end
-
def rake_tasks(&blk)
@rake_tasks ||= []
@rake_tasks << blk if blk
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index d63d25b42e..2da695b78e 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -125,22 +125,6 @@ module ApplicationTests
assert !ActionController.autoload?(:RecordIdentifier)
end
- test "runtime error is raised if config.frameworks= is used" do
- add_to_config "config.frameworks = []"
-
- assert_raises RuntimeError do
- require "#{app_path}/config/environment"
- end
- end
-
- test "runtime error is raised if config.frameworks is used" do
- add_to_config "config.frameworks -= []"
-
- assert_raises RuntimeError do
- require "#{app_path}/config/environment"
- end
- end
-
test "filter_parameters should be able to set via config.filter_parameters" do
add_to_config <<-RUBY
config.filter_parameters += [ :foo, 'bar', lambda { |key, value|