action_dispatch.rb 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #--
  2. # Copyright (c) 2004-2011 David Heinemeier Hansson
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining
  5. # a copy of this software and associated documentation files (the
  6. # "Software"), to deal in the Software without restriction, including
  7. # without limitation the rights to use, copy, modify, merge, publish,
  8. # distribute, sublicense, and/or sell copies of the Software, and to
  9. # permit persons to whom the Software is furnished to do so, subject to
  10. # the following conditions:
  11. #
  12. # The above copyright notice and this permission notice shall be
  13. # included in all copies or substantial portions of the Software.
  14. #
  15. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  19. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  20. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  21. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. #++
  23. activesupport_path = File.expand_path('../../../activesupport/lib', __FILE__)
  24. $:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
  25. activemodel_path = File.expand_path('../../../activemodel/lib', __FILE__)
  26. $:.unshift(activemodel_path) if File.directory?(activemodel_path) && !$:.include?(activemodel_path)
  27. require 'active_support'
  28. require 'active_support/dependencies/autoload'
  29. require 'action_pack'
  30. require 'active_model'
  31. require 'rack'
  32. module Rack
  33. autoload :Test, 'rack/test'
  34. end
  35. module ActionDispatch
  36. extend ActiveSupport::Autoload
  37. autoload_under 'http' do
  38. autoload :Request
  39. autoload :Response
  40. end
  41. autoload_under 'middleware' do
  42. autoload :RequestId
  43. autoload :BestStandardsSupport
  44. autoload :Callbacks
  45. autoload :Cookies
  46. autoload :DebugExceptions
  47. autoload :ExceptionWrapper
  48. autoload :Flash
  49. autoload :Head
  50. autoload :ParamsParser
  51. autoload :PublicExceptions
  52. autoload :Reloader
  53. autoload :RemoteIp
  54. autoload :Rescue
  55. autoload :ShowExceptions
  56. autoload :Static
  57. end
  58. autoload :MiddlewareStack, 'action_dispatch/middleware/stack'
  59. autoload :Routing
  60. module Http
  61. extend ActiveSupport::Autoload
  62. autoload :Cache
  63. autoload :Headers
  64. autoload :MimeNegotiation
  65. autoload :Parameters
  66. autoload :ParameterFilter
  67. autoload :FilterParameters
  68. autoload :Upload
  69. autoload :UploadedFile, 'action_dispatch/http/upload'
  70. autoload :URL
  71. end
  72. module Session
  73. autoload :AbstractStore, 'action_dispatch/middleware/session/abstract_store'
  74. autoload :CookieStore, 'action_dispatch/middleware/session/cookie_store'
  75. autoload :MemCacheStore, 'action_dispatch/middleware/session/mem_cache_store'
  76. autoload :CacheStore, 'action_dispatch/middleware/session/cache_store'
  77. end
  78. autoload_under 'testing' do
  79. autoload :Assertions
  80. autoload :Integration
  81. autoload :IntegrationTest, 'action_dispatch/testing/integration'
  82. autoload :PerformanceTest
  83. autoload :TestProcess
  84. autoload :TestRequest
  85. autoload :TestResponse
  86. end
  87. end
  88. autoload :Mime, 'action_dispatch/http/mime_type'