Permalink
Browse files

Merge commit 'rails/master'

  • Loading branch information...
2 parents 34a068d + 01a4bc8 commit 16ac353f4cb9510aad88240a1c566345da8ceeed @miloops miloops committed Jun 16, 2009
Showing with 824 additions and 3,333 deletions.
  1. +4 −0 actionmailer/lib/action_mailer/base.rb
  2. +1 −1 actionpack/Rakefile
  3. +51 −73 actionpack/lib/action_controller.rb
  4. +6 −0 actionpack/lib/action_controller/abstract/layouts.rb
  5. +143 −860 actionpack/lib/action_controller/base/base.rb
  6. +0 −107 actionpack/lib/action_controller/base/chained/benchmarking.rb
  7. +0 −670 actionpack/lib/action_controller/base/chained/filters.rb
  8. 0 actionpack/lib/action_controller/{new_base → base}/compatibility.rb
  9. 0 actionpack/lib/action_controller/{new_base → base}/conditional_get.rb
  10. +58 −0 actionpack/lib/action_controller/base/exceptions.rb
  11. 0 actionpack/lib/action_controller/base/{chained → }/flash.rb
  12. +117 −160 actionpack/lib/action_controller/base/helpers.rb
  13. 0 actionpack/lib/action_controller/{new_base → base}/hide_actions.rb
  14. 0 actionpack/lib/action_controller/{new_base → base}/http.rb
  15. 0 actionpack/lib/action_controller/{new_base → base}/layouts.rb
  16. +1 −1 actionpack/lib/action_controller/base/mime_responds.rb
  17. +1 −1 actionpack/lib/action_controller/{new_base → base}/rack_convenience.rb
  18. +0 −89 actionpack/lib/action_controller/base/redirect.rb
  19. 0 actionpack/lib/action_controller/{new_base → base}/redirector.rb
  20. +0 −403 actionpack/lib/action_controller/base/render.rb
  21. 0 actionpack/lib/action_controller/{new_base → base}/render_options.rb
  22. 0 actionpack/lib/action_controller/{new_base → base}/renderer.rb
  23. 0 actionpack/lib/action_controller/{new_base → base}/rescuable.rb
  24. +0 −50 actionpack/lib/action_controller/base/rescue.rb
  25. +0 −43 actionpack/lib/action_controller/base/responder.rb
  26. 0 actionpack/lib/action_controller/{new_base → base}/session.rb
  27. +5 −4 actionpack/lib/action_controller/base/streaming.rb
  28. 0 actionpack/lib/action_controller/{new_base → base}/testing.rb
  29. 0 actionpack/lib/action_controller/{new_base → base}/url_for.rb
  30. +8 −0 actionpack/lib/action_controller/{base → legacy}/layout.rb
  31. +0 −47 actionpack/lib/action_controller/new_base.rb
  32. +0 −173 actionpack/lib/action_controller/new_base/base.rb
  33. +0 −178 actionpack/lib/action_controller/new_base/helpers.rb
  34. +84 −0 actionpack/lib/action_controller/old_base.rb
  35. +4 −49 actionpack/lib/action_controller/routing/routing_ext.rb
  36. +3 −2 actionpack/lib/action_controller/testing/integration.rb
  37. +13 −40 actionpack/lib/action_controller/testing/process.rb
  38. +0 −74 actionpack/lib/action_controller/testing/process2.rb
  39. +11 −45 actionpack/lib/action_dispatch/http/response.rb
  40. +18 −6 actionpack/lib/action_view/helpers/asset_tag_helper.rb
  41. +0 −5 actionpack/test/abstract_controller/abstract_controller_test.rb
  42. +0 −9 actionpack/test/abstract_controller/layouts_test.rb
  43. +91 −20 actionpack/test/abstract_unit.rb
  44. +2 −2 actionpack/test/controller/content_type_test.rb
  45. +0 −9 actionpack/test/controller/layout_test.rb
  46. +0 −5 actionpack/test/controller/mime_responds_test.rb
  47. +4 −6 actionpack/test/controller/send_file_test.rb
  48. +0 −173 actionpack/test/new_base/abstract_unit.rb
  49. +1 −3 actionpack/test/new_base/render_text_test.rb
  50. +1 −11 actionpack/test/new_base/test_helper.rb
  51. +46 −0 actionpack/test/old_base/abstract_unit.rb
  52. +30 −0 actionpack/test/template/asset_tag_helper_test.rb
  53. +2 −1 activerecord/lib/active_record/base.rb
  54. +3 −2 activerecord/lib/active_record/migration.rb
  55. +2 −1 activerecord/lib/active_record/named_scope.rb
  56. +1 −0 activesupport/lib/active_support/core_ext/boolean.rb
  57. +11 −0 activesupport/lib/active_support/core_ext/boolean/conversions.rb
  58. +1 −0 activesupport/lib/active_support/core_ext/nil.rb
  59. +5 −0 activesupport/lib/active_support/core_ext/nil/conversions.rb
  60. +15 −8 activesupport/lib/active_support/core_ext/numeric/bytes.rb
  61. +3 −1 activesupport/lib/active_support/core_ext/proc.rb
  62. +25 −0 activesupport/lib/active_support/core_ext/regexp.rb
  63. +9 −0 activesupport/test/core_ext/boolean_ext_test.rb
  64. +5 −0 activesupport/test/core_ext/nil_ext_test.rb
  65. +6 −0 activesupport/test/core_ext/object_ext_test.rb
  66. +26 −0 activesupport/test/core_ext/regexp_ext_test.rb
  67. +7 −1 railties/test/rails_info_controller_test.rb
@@ -1,3 +1,7 @@
+require "active_support/core_ext/class"
+# Use the old layouts until actionmailer gets refactored
+require "action_controller/legacy/layout"
+
module ActionMailer #:nodoc:
# Action Mailer allows you to send email from your application using a mailer model and views.
#
View
@@ -22,7 +22,7 @@ task :default => [ :test ]
# Run the unit tests
desc "Run all unit tests"
-task :test => [:test_action_pack, :test_active_record_integration, :test_new_base, :test_new_base_on_old_tests]
+task :test => [:test_action_pack, :test_active_record_integration, :test_new_base]
test_lib_dirs = ENV["NEW"] ? ["test/new_base"] : []
test_lib_dirs.push "test", "test/lib"
@@ -1,84 +1,62 @@
-#--
-# Copyright (c) 2004-2009 David Heinemeier Hansson
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#++
-
-activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
-$:.unshift activesupport_path if File.directory?(activesupport_path)
-require 'active_support'
-
-require File.join(File.dirname(__FILE__), "action_pack")
-
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, Request, Response, UrlRewriter, UrlWriter]
- [ActionDispatch::Http::Headers]
- end
+ autoload :Base, "action_controller/base/base"
+ autoload :ConditionalGet, "action_controller/base/conditional_get"
+ autoload :HideActions, "action_controller/base/hide_actions"
+ autoload :Http, "action_controller/base/http"
+ autoload :Layouts, "action_controller/base/layouts"
+ autoload :RackConvenience, "action_controller/base/rack_convenience"
+ autoload :Rails2Compatibility, "action_controller/base/compatibility"
+ autoload :Redirector, "action_controller/base/redirector"
+ autoload :Renderer, "action_controller/base/renderer"
+ autoload :RenderOptions, "action_controller/base/render_options"
+ autoload :Renderers, "action_controller/base/render_options"
+ autoload :Rescue, "action_controller/base/rescuable"
+ autoload :Testing, "action_controller/base/testing"
+ autoload :UrlFor, "action_controller/base/url_for"
+ autoload :Session, "action_controller/base/session"
+ autoload :Helpers, "action_controller/base/helpers"
- autoload :Base, 'action_controller/base/base'
- autoload :Benchmarking, 'action_controller/base/chained/benchmarking'
- autoload :Caching, 'action_controller/caching'
- autoload :Cookies, 'action_controller/base/cookies'
- autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
- autoload :Filters, 'action_controller/base/chained/filters'
- autoload :Flash, 'action_controller/base/chained/flash'
- autoload :Helpers, 'action_controller/base/helpers'
- autoload :HttpAuthentication, 'action_controller/base/http_authentication'
- autoload :Integration, 'action_controller/testing/integration'
- autoload :IntegrationTest, 'action_controller/testing/integration'
- autoload :Layout, 'action_controller/base/layout'
- autoload :MimeResponds, 'action_controller/base/mime_responds'
+ # Ported modules
+ # require 'action_controller/routing'
+ autoload :Caching, 'action_controller/caching'
+ autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
+ autoload :Integration, 'action_controller/testing/integration'
+ autoload :MimeResponds, 'action_controller/base/mime_responds'
autoload :PolymorphicRoutes, 'action_controller/routing/generation/polymorphic_routes'
- autoload :RecordIdentifier, 'action_controller/record_identifier'
- autoload :Redirector, 'action_controller/base/redirect'
- autoload :Renderer, 'action_controller/base/render'
- autoload :RequestForgeryProtection, 'action_controller/base/request_forgery_protection'
- autoload :Rescue, 'action_controller/base/rescue'
- autoload :Resources, 'action_controller/routing/resources'
- autoload :Responder, 'action_controller/base/responder'
- autoload :Routing, 'action_controller/routing'
+ autoload :RecordIdentifier, 'action_controller/record_identifier'
+ autoload :Resources, 'action_controller/routing/resources'
autoload :SessionManagement, 'action_controller/base/session_management'
- autoload :Streaming, 'action_controller/base/streaming'
- autoload :TestCase, 'action_controller/testing/test_case'
- autoload :TestProcess, 'action_controller/testing/process'
- autoload :Translation, 'action_controller/translation'
- autoload :UrlEncodedPairParser, 'action_controller/dispatch/url_encoded_pair_parser'
- autoload :UrlRewriter, 'action_controller/routing/generation/url_rewriter'
- autoload :UrlWriter, 'action_controller/routing/generation/url_rewriter'
- autoload :Verification, 'action_controller/base/verification'
- autoload :FilterParameterLogging, 'action_controller/base/filter_parameter_logging'
+ autoload :TestCase, 'action_controller/testing/test_case'
+ autoload :TestProcess, 'action_controller/testing/process'
+ autoload :UrlRewriter, 'action_controller/routing/generation/url_rewriter'
+ autoload :UrlWriter, 'action_controller/routing/generation/url_rewriter'
+
+ autoload :Verification, 'action_controller/base/verification'
+ autoload :Flash, 'action_controller/base/flash'
+ autoload :RequestForgeryProtection, 'action_controller/base/request_forgery_protection'
+ autoload :Streaming, 'action_controller/base/streaming'
+ autoload :HttpAuthentication, 'action_controller/base/http_authentication'
+ autoload :FilterParameterLogging, 'action_controller/base/filter_parameter_logging'
+ autoload :Translation, 'action_controller/translation'
+ autoload :Cookies, 'action_controller/base/cookies'
+
+ autoload :ActionControllerError, 'action_controller/base/exceptions'
+ autoload :SessionRestoreError, 'action_controller/base/exceptions'
+ autoload :RenderError, 'action_controller/base/exceptions'
+ autoload :RoutingError, 'action_controller/base/exceptions'
+ autoload :MethodNotAllowed, 'action_controller/base/exceptions'
+ autoload :NotImplemented, 'action_controller/base/exceptions'
+ autoload :UnknownController, 'action_controller/base/exceptions'
+ autoload :MissingFile, 'action_controller/base/exceptions'
+ autoload :RenderError, 'action_controller/base/exceptions'
+ autoload :SessionOverflowError, 'action_controller/base/exceptions'
+ autoload :UnknownHttpMethod, 'action_controller/base/exceptions'
- module Assertions
- autoload :DomAssertions, 'action_controller/testing/assertions/dom'
- autoload :ModelAssertions, 'action_controller/testing/assertions/model'
- autoload :ResponseAssertions, 'action_controller/testing/assertions/response'
- autoload :RoutingAssertions, 'action_controller/testing/assertions/routing'
- autoload :SelectorAssertions, 'action_controller/testing/assertions/selector'
- autoload :TagAssertions, 'action_controller/testing/assertions/tag'
- end
+ require 'action_controller/routing'
end
autoload :HTML, 'action_controller/vendor/html-scanner'
+autoload :AbstractController, 'action_controller/abstract'
require 'action_dispatch'
require 'action_view'
@@ -9,6 +9,11 @@ module Layouts
end
module ClassMethods
+ def inherited(klass)
+ super
+ klass._write_layout_method
+ end
+
# Specify the layout to use for this class.
#
# If the specified layout is a:
@@ -78,6 +83,7 @@ def _layout(details)
end
ruby_eval
end
+ self.class_eval { private :_layout }
end
end
Oops, something went wrong.

0 comments on commit 16ac353

Please sign in to comment.