1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Łukasz Strzałkowski 2010-08-11 21:56:22 +02:00 committed by José Valim
parent c5c839f75f
commit 38a421b34d
27 changed files with 32 additions and 16 deletions

View file

@ -43,21 +43,6 @@ 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,3 +1,5 @@
require 'action_controller/metal/exceptions'
module ActionController
module Compatibility
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
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,4 +1,5 @@
require 'active_support/core_ext/class/attribute'
require 'action_controller/metal/exceptions'
module ActionController #:nodoc:
class InvalidAuthenticityToken < ActionControllerError #:nodoc:

View file

@ -1,4 +1,5 @@
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,6 +5,7 @@ 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,6 +1,7 @@
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,6 +1,7 @@
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,6 +2,7 @@ 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,6 +1,7 @@
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,4 +1,5 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
class WorkshopsController < ActionController::Base
end

View file

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

View file

@ -1,5 +1,6 @@
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,6 +2,7 @@
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,4 +1,5 @@
require 'abstract_unit'
require 'action_controller/metal/exceptions'
class RequestTest < ActiveSupport::TestCase
test "remote ip" do

View file

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

View file

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

View file

@ -1,6 +1,7 @@
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,6 +22,7 @@ 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,4 +1,5 @@
require 'active_support/core_ext/array/wrap'
require 'action_controller/metal/exceptions'
module ActiveRecord
module ConnectionAdapters # :nodoc:

View file

@ -1,5 +1,6 @@
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,3 +1,5 @@
require 'action_controller/metal/exceptions'
module ActiveRecord
# = Active Record Session Store
#

View file

@ -1,8 +1,9 @@
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,3 +1,5 @@
require 'action_controller/metal/exceptions'
module ActiveResource
class ConnectionError < StandardError # :nodoc:
attr_reader :response

View file

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

View file

@ -9,6 +9,7 @@ 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,3 +1,5 @@
require 'action_controller/metal/exceptions'
begin
require 'securerandom'
rescue LoadError