diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/deprecation.rb | 37 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
3 files changed, 10 insertions, 30 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index 20484a10c8..ea774eb16c 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -89,6 +89,7 @@ module Rails def default_options super.merge({ :Port => 3000, + :DoNotReverseLookup => true, :environment => (ENV['RAILS_ENV'] || "development").dup, :daemonize => false, :debugger => false, diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb index 71adcd61f4..c5811b2629 100644 --- a/railties/lib/rails/deprecation.rb +++ b/railties/lib/rails/deprecation.rb @@ -1,39 +1,18 @@ -require "active_support/string_inquirer" -require "active_support/basic_object" +require 'active_support/deprecation/proxy_wrappers' module Rails - module Initializer - def self.run(&block) - klass = Class.new(Rails::Application) - klass.instance_exec(klass.config, &block) - klass.initialize! - end - end - - class DeprecatedConstant < ActiveSupport::BasicObject - def self.deprecate(old, new) - constant = self.new(old, new) + class DeprecatedConstant < ActiveSupport::Deprecation::DeprecatedConstantProxy + def self.deprecate(old, current) + constant = new(old, current) eval "::#{old} = constant" end - def initialize(old, new) - @old, @new = old, new - @target = ::Kernel.eval "proc { #{@new} }" - @warned = false - end - - def method_missing(meth, *args, &block) - ::ActiveSupport::Deprecation.warn("#{@old} is deprecated. Please use #{@new}") unless @warned - @warned = true + private - target = @target.call - if target.respond_to?(meth) - target.send(meth, *args, &block) - else - super - end + def target + ::Kernel.eval @new_const.to_s end end - DeprecatedConstant.deprecate("RAILS_CACHE", "::Rails.cache") + DeprecatedConstant.deprecate('RAILS_CACHE', '::Rails.cache') end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 20321a502d..77a68eb7f1 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -228,7 +228,7 @@ module Rails # resources :articles # end # - # The routes above will automatically point to <tt>MyEngine::ApplicationController</tt>. Furthermore, you don't + # The routes above will automatically point to <tt>MyEngine::ArticlesController</tt>. Furthermore, you don't # need to use longer url helpers like <tt>my_engine_articles_path</tt>. Instead, you should simply use # <tt>articles_path</tt> as you would do with your application. # |