From 27c03e69e94655482b0d77d3ae0ca902ce537f8c Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 19 Nov 2008 17:41:55 +0530 Subject: Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master --- actionpack/lib/action_controller.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 2efd0dad2e..c2f064ae9e 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -49,7 +49,6 @@ require 'action_controller/verification' require 'action_controller/streaming' require 'action_controller/session_management' require 'action_controller/http_authentication' -require 'action_controller/components' require 'action_controller/rack_process' require 'action_controller/record_identifier' require 'action_controller/request_forgery_protection' @@ -72,7 +71,6 @@ ActionController::Base.class_eval do include ActionController::Streaming include ActionController::SessionManagement include ActionController::HttpAuthentication::Basic::ControllerMethods - include ActionController::Components include ActionController::RecordIdentifier include ActionController::RequestForgeryProtection include ActionController::Translation -- cgit v1.2.3 From cc67272cba35e50afa73cfec856c1677b204ae7e Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 22 Nov 2008 14:33:00 -0600 Subject: Vendor rack 0.4.0 --- actionpack/lib/action_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index c2f064ae9e..ff8ec0d2fc 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -32,6 +32,7 @@ rescue LoadError end $:.unshift "#{File.dirname(__FILE__)}/action_controller/vendor/html-scanner" +require 'action_controller/vendor/rack' require 'action_controller/base' require 'action_controller/request' -- cgit v1.2.3 From 31ce92f7b5784bc5b6a441e88cd734c7b8b1c58f Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 23 Nov 2008 16:35:13 -0600 Subject: Use autoload instead of explicit requires for ActionController --- actionpack/lib/action_controller.rb | 96 +++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 40 deletions(-) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index ff8ec0d2fc..5f87429aca 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -32,47 +32,63 @@ rescue LoadError end $:.unshift "#{File.dirname(__FILE__)}/action_controller/vendor/html-scanner" -require 'action_controller/vendor/rack' -require 'action_controller/base' -require 'action_controller/request' -require 'action_controller/rescue' -require 'action_controller/benchmarking' -require 'action_controller/flash' -require 'action_controller/filters' -require 'action_controller/layout' -require 'action_controller/mime_responds' -require 'action_controller/helpers' -require 'action_controller/cookies' -require 'action_controller/cgi_process' -require 'action_controller/caching' -require 'action_controller/verification' -require 'action_controller/streaming' -require 'action_controller/session_management' -require 'action_controller/http_authentication' -require 'action_controller/rack_process' -require 'action_controller/record_identifier' -require 'action_controller/request_forgery_protection' -require 'action_controller/headers' -require 'action_controller/translation' +module ActionController + # TODO: Review explicit to see if they will automatically be handled by + # the initilizer if they are really needed. + def self.load_all! + [Base, CgiRequest, CgiResponse, RackRequest, RackRequest, Http::Headers, UrlRewriter, UrlWriter] + end -require 'action_view' + autoload :AbstractRequest, 'action_controller/request' + autoload :AbstractResponse, 'action_controller/response' + autoload :Base, 'action_controller/base' + autoload :Benchmarking, 'action_controller/benchmarking' + autoload :Caching, 'action_controller/caching' + autoload :CgiRequest, 'action_controller/cgi_process' + autoload :CgiResponse, 'action_controller/cgi_process' + autoload :Cookies, 'action_controller/cookies' + autoload :Dispatcher, 'action_controller/dispatcher' + autoload :Filters, 'action_controller/filters' + autoload :Flash, 'action_controller/flash' + autoload :Helpers, 'action_controller/helpers' + autoload :HttpAuthentication, 'action_controller/http_authentication' + autoload :IntegrationTest, 'action_controller/integration' + autoload :Layout, 'action_controller/layout' + autoload :MimeResponds, 'action_controller/mime_responds' + autoload :PolymorphicRoutes, 'action_controller/polymorphic_routes' + autoload :RackRequest, 'action_controller/rack_process' + autoload :RackResponse, 'action_controller/rack_process' + autoload :RecordIdentifier, 'action_controller/record_identifier' + autoload :RequestForgeryProtection, 'action_controller/request_forgery_protection' + autoload :Rescue, 'action_controller/rescue' + autoload :Resources, 'action_controller/resources' + autoload :Routing, 'action_controller/routing' + autoload :SessionManagement, 'action_controller/session_management' + autoload :StatusCodes, 'action_controller/status_codes' + autoload :Streaming, 'action_controller/streaming' + autoload :TestCase, 'action_controller/test_case' + autoload :TestProcess, 'action_controller/test_process' + autoload :Translation, 'action_controller/translation' + autoload :UrlRewriter, 'action_controller/url_rewriter' + autoload :UrlWriter, 'action_controller/url_rewriter' + autoload :Verification, 'action_controller/verification' -ActionController::Base.class_eval do - include ActionController::Flash - include ActionController::Filters - include ActionController::Layout - include ActionController::Benchmarking - include ActionController::Rescue - include ActionController::MimeResponds - include ActionController::Helpers - include ActionController::Cookies - include ActionController::Caching - include ActionController::Verification - include ActionController::Streaming - include ActionController::SessionManagement - include ActionController::HttpAuthentication::Basic::ControllerMethods - include ActionController::RecordIdentifier - include ActionController::RequestForgeryProtection - include ActionController::Translation + module Http + autoload :Headers, 'action_controller/headers' + end end + +class CGI + class Session + autoload :ActiveRecordStore, 'action_controller/session/active_record_store' + autoload :CookieStore, 'action_controller/session/cookie_store' + autoload :DRbStore, 'action_controller/session/drb_store' + autoload :MemCacheStore, 'action_controller/session/mem_cache_store' + end +end + +autoload :Mime, 'action_controller/mime_type' +autoload :Rack, 'action_controller/vendor/rack' + +ActionController.load_all! -- cgit v1.2.3 From 5ffd1e0c02e605158efc08f3cbb6aebb79978553 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 24 Nov 2008 09:58:52 -0600 Subject: Ensure integration test is load in script/console [#1452 state:resolved] --- actionpack/lib/action_controller.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 5f87429aca..678938af86 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -53,6 +53,7 @@ module ActionController autoload :Flash, 'action_controller/flash' autoload :Helpers, 'action_controller/helpers' autoload :HttpAuthentication, 'action_controller/http_authentication' + autoload :Integration, 'action_controller/integration' autoload :IntegrationTest, 'action_controller/integration' autoload :Layout, 'action_controller/layout' autoload :MimeResponds, 'action_controller/mime_responds' @@ -74,6 +75,15 @@ module ActionController autoload :UrlWriter, 'action_controller/url_rewriter' autoload :Verification, 'action_controller/verification' + module Assertions + autoload :DomAssertions, 'action_controller/assertions/dom_assertions' + autoload :ModelAssertions, 'action_controller/assertions/model_assertions' + autoload :ResponseAssertions, 'action_controller/assertions/response_assertions' + autoload :RoutingAssertions, 'action_controller/assertions/routing_assertions' + autoload :SelectorAssertions, 'action_controller/assertions/selector_assertions' + autoload :TagAssertions, 'action_controller/assertions/tag_assertions' + end + module Http autoload :Headers, 'action_controller/headers' end -- cgit v1.2.3 From 426a86ab1e4fc2488215a9adab4511a59646a413 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 24 Nov 2008 10:20:41 -0600 Subject: prefer autoloaded html scanner --- actionpack/lib/action_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 678938af86..8b4819bf65 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -31,8 +31,6 @@ rescue LoadError end end -$:.unshift "#{File.dirname(__FILE__)}/action_controller/vendor/html-scanner" - module ActionController # TODO: Review explicit to see if they will automatically be handled by # the initilizer if they are really needed. @@ -99,6 +97,8 @@ class CGI end autoload :Mime, 'action_controller/mime_type' + +autoload :HTML, 'action_controller/vendor/html-scanner' autoload :Rack, 'action_controller/vendor/rack' ActionController.load_all! -- cgit v1.2.3 From 703fecb4fc81c3a975a53c9c4534f40193bd1ab9 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 24 Nov 2008 11:37:57 -0600 Subject: Add LAZY env flag for testing autoload/lazy load feature --- actionpack/lib/action_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 8b4819bf65..08e6f4efa8 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -101,4 +101,4 @@ autoload :Mime, 'action_controller/mime_type' autoload :HTML, 'action_controller/vendor/html-scanner' autoload :Rack, 'action_controller/vendor/rack' -ActionController.load_all! +ActionController.load_all! unless ENV['LAZY'] -- cgit v1.2.3 From 104f3a57768602289299b3be0fab5b1ed21d7653 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 24 Nov 2008 18:43:04 -0800 Subject: Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used. --- actionpack/lib/action_controller.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 08e6f4efa8..62d75a47ec 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -100,5 +100,3 @@ autoload :Mime, 'action_controller/mime_type' autoload :HTML, 'action_controller/vendor/html-scanner' autoload :Rack, 'action_controller/vendor/rack' - -ActionController.load_all! unless ENV['LAZY'] -- cgit v1.2.3 From 759183c822240ee0a550f1f5a556ffc314b68099 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 25 Nov 2008 10:38:20 -0600 Subject: Ensure ActionView will be available to ActionMailer if ActionController is not loaded --- actionpack/lib/action_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 62d75a47ec..a7a7d932c4 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -100,3 +100,5 @@ autoload :Mime, 'action_controller/mime_type' autoload :HTML, 'action_controller/vendor/html-scanner' autoload :Rack, 'action_controller/vendor/rack' + +require 'action_view' -- cgit v1.2.3 From 3dd3ffde06931d47e3052260efba26b1cc5bd7c9 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 25 Nov 2008 13:20:12 -0600 Subject: Depend on rack 0.4.0 instead of vendoring it --- actionpack/lib/action_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index a7a7d932c4..da5f1e81e6 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -31,6 +31,9 @@ rescue LoadError end end +gem 'rack', '~> 0.4.0' +require 'rack' + module ActionController # TODO: Review explicit to see if they will automatically be handled by # the initilizer if they are really needed. @@ -99,6 +102,5 @@ end autoload :Mime, 'action_controller/mime_type' autoload :HTML, 'action_controller/vendor/html-scanner' -autoload :Rack, 'action_controller/vendor/rack' require 'action_view' -- cgit v1.2.3 From 06ed8e451198b2296d8b2752741e259b4f995081 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 1 Dec 2008 13:48:47 -0600 Subject: Add internal middleware stack to Dispatcher config.middleware.use Rack::Cache --- actionpack/lib/action_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller.rb') diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index da5f1e81e6..2981f625a1 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -57,6 +57,7 @@ module ActionController autoload :Integration, 'action_controller/integration' autoload :IntegrationTest, 'action_controller/integration' autoload :Layout, 'action_controller/layout' + autoload :MiddlewareStack, 'action_controller/middleware_stack' autoload :MimeResponds, 'action_controller/mime_responds' autoload :PolymorphicRoutes, 'action_controller/polymorphic_routes' autoload :RackRequest, 'action_controller/rack_process' -- cgit v1.2.3