mirror of https://github.com/rails/rails
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:
parent
13d2a08164
commit
599e46bf24
|
@ -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
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActionController
|
||||
module Compatibility
|
||||
extend ActiveSupport::Concern
|
||||
|
|
|
@ -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"].'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'active_support/core_ext/class/attribute'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActionController #:nodoc:
|
||||
class InvalidAuthenticityToken < ActionControllerError #:nodoc:
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'abstract_unit'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
class WorkshopsController < ActionController::Base
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'abstract_unit'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActionDispatch
|
||||
class ShowExceptions
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'abstract_unit'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
class RequestTest < ActiveSupport::TestCase
|
||||
test "remote ip" do
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'abstract_unit'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActionDispatch
|
||||
class ShowExceptions
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'active_support/core_ext/array/wrap'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters # :nodoc:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActiveRecord
|
||||
# = Active Record Session Store
|
||||
#
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
require 'action_controller/metal/exceptions'
|
||||
|
||||
module ActiveResource
|
||||
class ConnectionError < StandardError # :nodoc:
|
||||
attr_reader :response
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'abstract_unit'
|
||||
require 'action_controller/metal/exceptions'
|
||||
|
||||
class ConnectionTest < Test::Unit::TestCase
|
||||
ResponseCodeStub = Struct.new(:code)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
require 'action_controller/metal/exceptions'
|
||||
|
||||
begin
|
||||
require 'securerandom'
|
||||
rescue LoadError
|
||||
|
|
Loading…
Reference in New Issue