Revert "Setup explicit requires for files with exceptions. Removed them from autoloading."

Booting a new Rails application does not work after this commit [#5359 state:open]

This reverts commit 38a421b34d.
This commit is contained in:
José Valim 2010-09-02 21:10:29 +02:00
parent 13d2a08164
commit 599e46bf24
27 changed files with 16 additions and 32 deletions

View File

@ -43,6 +43,21 @@ module ActionController
eager_autoload do
autoload :RecordIdentifier
# TODO: Don't autoload exceptions, setup explicit
# requires for files that need them
autoload_at "action_controller/metal/exceptions" do
autoload :ActionControllerError
autoload :RenderError
autoload :RoutingError
autoload :MethodNotAllowed
autoload :NotImplemented
autoload :UnknownController
autoload :MissingFile
autoload :RenderError
autoload :SessionOverflowError
autoload :UnknownHttpMethod
end
end
end

View File

@ -1,5 +1,3 @@
require 'action_controller/metal/exceptions'
module ActionController
module Compatibility
extend ActiveSupport::Concern

View File

@ -1,5 +1,3 @@
require 'action_controller/metal/exceptions'
module ActionController
class RedirectBackError < AbstractController::Error #:nodoc:
DEFAULT_MESSAGE = 'No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure to specify request.env["HTTP_REFERER"].'

View File

@ -1,5 +1,4 @@
require 'active_support/core_ext/class/attribute'
require 'action_controller/metal/exceptions'
module ActionController #:nodoc:
class InvalidAuthenticityToken < ActionControllerError #:nodoc:

View File

@ -1,5 +1,4 @@
require 'active_support/core_ext/file/path'
require 'action_controller/metal/exceptions'
module ActionController #:nodoc:
# Methods for sending arbitrary data and for streaming files to the browser,

View File

@ -5,7 +5,6 @@ require 'strscan'
require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/string/access'
require 'action_dispatch/http/headers'
require 'action_controller/metal/exceptions'
module ActionDispatch
class Request < Rack::Request

View File

@ -1,7 +1,6 @@
require 'active_support/core_ext/exception'
require 'active_support/notifications'
require 'action_dispatch/http/request'
require 'action_controller/metal/exceptions'
module ActionDispatch
# This middleware rescues any exception returned by the application and renders

View File

@ -1,7 +1,6 @@
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/with_options'
require 'active_support/core_ext/object/try'
require 'action_controller/metal/exceptions'
module ActionDispatch
module Routing

View File

@ -2,7 +2,6 @@ require 'rack/mount'
require 'forwardable'
require 'active_support/core_ext/object/to_query'
require 'action_dispatch/routing/deprecated_mapper'
require 'action_controller/metal/exceptions'
module ActionDispatch
module Routing

View File

@ -1,7 +1,6 @@
require "pathname"
require "active_support/core_ext/class"
require "action_view/template"
require 'action_controller/metal/exceptions'
module ActionView
# = Action View Resolver

View File

@ -1,5 +1,4 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
class WorkshopsController < ActionController::Base
end

View File

@ -1,5 +1,4 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
module ActionDispatch
class ShowExceptions

View File

@ -1,6 +1,5 @@
require 'abstract_unit'
require 'active_support/core_ext/object/try'
require 'action_controller/metal/exceptions'
class ResourcesController < ActionController::Base
def index() render :nothing => true end

View File

@ -2,7 +2,6 @@
require 'abstract_unit'
require 'controller/fake_controllers'
require 'active_support/dependencies'
require 'action_controller/metal/exceptions'
class MilestonesController < ActionController::Base
def index() head :ok end

View File

@ -1,5 +1,4 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
class RequestTest < ActiveSupport::TestCase
test "remote ip" do

View File

@ -1,7 +1,6 @@
require 'erb'
require 'abstract_unit'
require 'controller/fake_controllers'
require 'action_controller/metal/exceptions'
class TestRoutingMapper < ActionDispatch::IntegrationTest
SprocketsApp = lambda { |env|

View File

@ -1,5 +1,4 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
module ActionDispatch
class ShowExceptions

View File

@ -1,7 +1,6 @@
require 'active_support/core_ext/array/wrap'
require "active_support/core_ext/module/anonymous"
require 'active_support/core_ext/object/blank'
require 'action_controller/metal/exceptions'
module ActiveModel #:nodoc:

View File

@ -22,7 +22,6 @@ require 'active_support/core_ext/object/blank'
require 'arel'
require 'active_record/errors'
require 'active_record/log_subscriber'
require 'action_controller/metal/exceptions'
module ActiveRecord #:nodoc:
# = Active Record

View File

@ -1,5 +1,4 @@
require 'active_support/core_ext/array/wrap'
require 'action_controller/metal/exceptions'
module ActiveRecord
module ConnectionAdapters # :nodoc:

View File

@ -1,6 +1,5 @@
require 'active_support/core_ext/kernel/singleton_class'
require 'active_support/core_ext/module/aliasing'
require 'action_controller/metal/exceptions'
module ActiveRecord
# Exception that can be raised to stop migrations from going backwards.

View File

@ -1,5 +1,3 @@
require 'action_controller/metal/exceptions'
module ActiveRecord
# = Active Record Session Store
#

View File

@ -1,9 +1,8 @@
require 'active_support/core_ext/benchmark'
require 'net/https'
require 'date'
require 'time'
require 'uri'
require 'active_support/core_ext/benchmark'
require 'action_controller/metal/exceptions'
module ActiveResource
# Class to handle connections to remote web services.

View File

@ -1,5 +1,3 @@
require 'action_controller/metal/exceptions'
module ActiveResource
class ConnectionError < StandardError # :nodoc:
attr_reader :response

View File

@ -1,5 +1,4 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
class ConnectionTest < Test::Unit::TestCase
ResponseCodeStub = Struct.new(:code)

View File

@ -9,7 +9,6 @@ require 'active_support/core_ext/numeric/bytes'
require 'active_support/core_ext/numeric/time'
require 'active_support/core_ext/object/to_param'
require 'active_support/core_ext/string/inflections'
require 'action_controller/metal/exceptions'
module ActiveSupport
# See ActiveSupport::Cache::Store for documentation.

View File

@ -1,5 +1,3 @@
require 'action_controller/metal/exceptions'
begin
require 'securerandom'
rescue LoadError