<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>actionpack/lib/action_controller/new_base/http.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,22 @@
 module ActionController
+  autoload :Base,                 &quot;action_controller/new_base/base&quot;
   autoload :HideActions,          &quot;action_controller/new_base/hide_actions&quot;
-  autoload :Http,                 &quot;action_controller/new_base/base&quot;
+  autoload :Http,                 &quot;action_controller/new_base/http&quot;
   autoload :Layouts,              &quot;action_controller/new_base/layouts&quot;
   autoload :Rails2Compatibility,  &quot;action_controller/new_base/compatibility&quot;
   autoload :Renderer,             &quot;action_controller/new_base/renderer&quot;
   autoload :Testing,              &quot;action_controller/new_base/testing&quot;
   autoload :UrlFor,               &quot;action_controller/new_base/url_for&quot;
-end
\ No newline at end of file
+  
+  # Ported modules
+  # require 'action_controller/routing'
+  autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
+  autoload :PolymorphicRoutes, 'action_controller/routing/generation/polymorphic_routes'
+  autoload :Resources, 'action_controller/routing/resources'
+  autoload :SessionManagement, 'action_controller/base/session_management'
+  
+  require 'action_controller/routing'
+end
+
+require 'action_dispatch'
+require 'action_view'
\ No newline at end of file</diff>
      <filename>actionpack/lib/action_controller/new_base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,59 +1,60 @@
 module ActionController
-  class Http &lt; AbstractController::Base
+  class Base &lt; Http
     abstract!
     
-    # :api: public
-    attr_internal :request, :response, :params
-
-    # :api: public
-    def self.controller_name
-      @controller_name ||= controller_path.split(&quot;/&quot;).last
-    end
+    use AbstractController::Callbacks
+    use AbstractController::Helpers
+    use AbstractController::Logger
 
-    # :api: public
-    def controller_name() self.class.controller_name end
-
-    # :api: public    
-    def self.controller_path
-      @controller_path ||= self.name.sub(/Controller$/, '').underscore
-    end
+    use ActionController::HideActions
+    use ActionController::UrlFor
+    use ActionController::Renderer
+    use ActionController::Layouts
+    
+    # Legacy modules
+    include SessionManagement
     
-    # :api: public    
-    def controller_path() self.class.controller_path end
+    # Rails 2.x compatibility
+    use ActionController::Rails2Compatibility
     
-    # :api: private
-    def self.internal_methods
-      ActionController::Http.public_instance_methods(true)
+    def self.inherited(klass)
+      ::ActionController::Base.subclasses &lt;&lt; klass.to_s
+      super
     end
     
-    # :api: private    
-    def self.action_names() action_methods end
+    def self.subclasses
+      @subclasses ||= []
+    end
     
-    # :api: private
-    def action_names() action_methods end
+    def self.app_loaded!
+      @subclasses.each do |subclass|
+        subclass.constantize._write_layout_method
+      end
+    end
     
-    # :api: plugin
-    def self.call(env)
-      controller = new
-      controller.call(env).to_rack
+    def render(action = action_name, options = {})
+      if action.is_a?(Hash)
+        options, action = action, nil 
+      else
+        options.merge! :action =&gt; action
+      end
+      
+      super(options)
     end
     
-    # :api: private
-    def call(env)
-      @_request = ActionDispatch::Request.new(env)
-      @_response = ActionDispatch::Response.new
-      process(@_request.parameters[:action])
-      @_response.body = response_body
-      @_response.prepare!
-      self
+    def render_to_body(options = {})
+      options = {:template =&gt; options} if options.is_a?(String)
+      super
     end
     
-    # :api: private
-    def to_rack
-      @_response.to_a
+    def process_action
+      ret = super
+      render if response_body.nil?
+      ret
+    end
+    
+    def respond_to_action?(action_name)
+      super || view_paths.find_by_parts?(action_name.to_s, {:formats =&gt; formats, :locales =&gt; [I18n.locale]}, controller_path)
     end
   end
-  
-  class Base &lt; Http
-  end
-end
+end
\ No newline at end of file</diff>
      <filename>actionpack/lib/action_controller/new_base/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,27 @@
 module ActionController
   module Rails2Compatibility
   
+    # Temporary hax
+    setup do
+      cattr_accessor :session_options
+      self.send(:class_variable_set, &quot;@@session_options&quot;, {})
+      
+      cattr_accessor :allow_concurrency
+      self.send(:class_variable_set, &quot;@@allow_concurrency&quot;, false)
+      
+      cattr_accessor :param_parsers
+      self.send(:class_variable_set, &quot;@@param_parsers&quot;, { Mime::MULTIPART_FORM   =&gt; :multipart_form,
+                          Mime::URL_ENCODED_FORM =&gt; :url_encoded_form,
+                          Mime::XML              =&gt; :xml_simple,
+                          Mime::JSON             =&gt; :json })
+                          
+      cattr_accessor :relative_url_root
+      self.send(:class_variable_set, &quot;@@relative_url_root&quot;, ENV['RAILS_RELATIVE_URL_ROOT'])
+      
+      cattr_accessor :default_charset
+      self.send(:class_variable_set, &quot;@@default_charset&quot;, &quot;utf-8&quot;)
+    end
+  
     def render_to_body(options)
       if options.is_a?(Hash) &amp;&amp; options.key?(:template)
         options[:template].sub!(/^\//, '')</diff>
      <filename>actionpack/lib/action_controller/new_base/compatibility.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,8 +34,6 @@ module ActionDispatch
         else
           @klass.to_s.constantize
         end
-      rescue NameError
-        @klass
       end
 
       def active?</diff>
      <filename>actionpack/lib/action_dispatch/middleware/stack.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,10 +7,7 @@ require 'test/unit'
 require 'active_support/core/all'
 require 'active_support/test_case'
 require 'action_controller/abstract'
-require 'action_controller/new_base/base'
-require 'action_controller/new_base/renderer'
-require 'action_controller'
-require 'action_view/base'
+require 'action_view'
 require 'fixture_template'
 
 begin
@@ -19,10 +16,4 @@ begin
   Debugger.start
 rescue LoadError
   # Debugging disabled. `gem install ruby-debug` to enable.
-end
-
-# require 'action_controller/abstract/base'
-# require 'action_controller/abstract/renderer'
-# require 'action_controller/abstract/layouts'
-# require 'action_controller/abstract/callbacks'
-# require 'action_controller/abstract/helpers'
\ No newline at end of file
+end
\ No newline at end of file</diff>
      <filename>actionpack/test/abstract_controller/test_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require File.join(File.expand_path(File.dirname(__FILE__)), &quot;test_helper&quot;)
 
 # Tests the controller dispatching happy path
 module Dispatching
-  class SimpleController &lt; ActionController::Base2
+  class SimpleController &lt; ActionController::Base
     def index
       render :text =&gt; &quot;success&quot;
     end
@@ -69,9 +69,9 @@ module Dispatching
     end
   end
   
-  class EmptyController &lt; ActionController::Base2 ; end
+  class EmptyController &lt; ActionController::Base ; end
   module Submodule
-    class ContainedEmptyController &lt; ActionController::Base2 ; end
+    class ContainedEmptyController &lt; ActionController::Base ; end
   end
 
   class ControllerClassTests &lt; Test::Unit::TestCase</diff>
      <filename>actionpack/test/new_base/base_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.join(File.expand_path(File.dirname(__FILE__)), &quot;test_helper&quot;)
 
 module ContentType
-  class BaseController &lt; ActionController::Base2
+  class BaseController &lt; ActionController::Base
     def index
       render :text =&gt; &quot;Hello world!&quot;
     end
@@ -40,7 +40,7 @@ module ContentType
     assert_header &quot;Content-Type&quot;, &quot;application/rss+xml; charset=utf-8&quot;
   end
   
-  class ImpliedController &lt; ActionController::Base2
+  class ImpliedController &lt; ActionController::Base
     self.view_paths = [ActionView::Template::FixturePath.new(
       &quot;content_type/implied/i_am_html_erb.html.erb&quot;         =&gt; &quot;Hello world!&quot;,
       &quot;content_type/implied/i_am_xml_erb.xml.erb&quot;          =&gt; &quot;&lt;xml&gt;Hello world!&lt;/xml&gt;&quot;,
@@ -81,7 +81,7 @@ module ContentType
 end
 
 module Charset
-  class BaseController &lt; ActionController::Base2
+  class BaseController &lt; ActionController::Base
     def set_on_response_obj
       response.charset = &quot;utf-16&quot;
       render :text =&gt; &quot;Hello world!&quot;</diff>
      <filename>actionpack/test/new_base/content_type_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require File.join(File.expand_path(File.dirname(__FILE__)), &quot;test_helper&quot;)
 module RenderAction
   
   # This has no layout and it works
-  class BasicController &lt; ActionController::Base2
+  class BasicController &lt; ActionController::Base
     
     self.view_paths = [ActionView::Template::FixturePath.new(
       &quot;render_action/basic/hello_world.html.erb&quot; =&gt; &quot;Hello world!&quot;
@@ -203,7 +203,7 @@ end
 
 module RenderActionWithControllerLayout
   
-  class BasicController &lt; ActionController::Base2
+  class BasicController &lt; ActionController::Base
     self.view_paths = self.view_paths = [ActionView::Template::FixturePath.new(
       &quot;render_action_with_controller_layout/basic/hello_world.html.erb&quot; =&gt; &quot;Hello World!&quot;,
       &quot;layouts/render_action_with_controller_layout/basic.html.erb&quot;     =&gt; &quot;With Controller Layout! &lt;%= yield %&gt; KTHXBAI&quot;
@@ -266,7 +266,7 @@ end
 
 module RenderActionWithBothLayouts
   
-  class BasicController &lt; ActionController::Base2
+  class BasicController &lt; ActionController::Base
     self.view_paths = [ActionView::Template::FixturePath.new({
       &quot;render_action_with_both_layouts/basic/hello_world.html.erb&quot; =&gt; &quot;Hello World!&quot;,
       &quot;layouts/application.html.erb&quot;                                =&gt; &quot;OHAI &lt;%= yield %&gt; KTHXBAI&quot;,</diff>
      <filename>actionpack/test/new_base/render_action_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.join(File.expand_path(File.dirname(__FILE__)), &quot;test_helper&quot;)
 
 module RenderTemplate
-  class WithoutLayoutController &lt; ActionController::Base2
+  class WithoutLayoutController &lt; ActionController::Base
     
     self.view_paths = [ActionView::Template::FixturePath.new(
       &quot;test/basic.html.erb&quot; =&gt; &quot;Hello from basic.html.erb&quot;,
@@ -129,7 +129,7 @@ module RenderTemplate
   end
   
   module Compatibility
-    class WithoutLayoutController &lt; ActionController::CompatibleBase2
+    class WithoutLayoutController &lt; ActionController::Base
       self.view_paths = [ActionView::Template::FixturePath.new(
         &quot;test/basic.html.erb&quot; =&gt; &quot;Hello from basic.html.erb&quot;,
         &quot;shared.html.erb&quot;     =&gt; &quot;Elastica&quot;</diff>
      <filename>actionpack/test/new_base/render_template_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.join(File.expand_path(File.dirname(__FILE__)), &quot;test_helper&quot;)
 
 module Render
-  class BlankRenderController &lt; ActionController::Base2
+  class BlankRenderController &lt; ActionController::Base
     self.view_paths = [ActionView::Template::FixturePath.new(
       &quot;render/blank_render/index.html.erb&quot;                  =&gt; &quot;Hello world!&quot;,
       &quot;render/blank_render/access_request.html.erb&quot;         =&gt; &quot;The request: &lt;%= request.method.to_s.upcase %&gt;&quot;,
@@ -36,7 +36,7 @@ module Render
     assert_status 200
   end  
   
-  class DoubleRenderController &lt; ActionController::Base2
+  class DoubleRenderController &lt; ActionController::Base
     def index
       render :text =&gt; &quot;hello&quot;
       render :text =&gt; &quot;world&quot;</diff>
      <filename>actionpack/test/new_base/render_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
 require File.join(File.expand_path(File.dirname(__FILE__)), &quot;test_helper&quot;)
 
-class ApplicationController &lt; ActionController::Base2
+class ApplicationController &lt; ActionController::Base
 end
 
 module RenderText
-  class SimpleController &lt; ActionController::Base2
+  class SimpleController &lt; ActionController::Base
     self.view_paths = [ActionView::Template::FixturePath.new]
     
     def index
@@ -146,4 +146,4 @@ module RenderText
   end
 end
 
-ActionController::Base2.app_loaded!
\ No newline at end of file
+ActionController::Base.app_loaded!
\ No newline at end of file</diff>
      <filename>actionpack/test/new_base/render_text_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,7 @@ $:.unshift(File.dirname(__FILE__) + '/../lib')
 require 'test/unit'
 require 'active_support'
 require 'active_support/test_case'
-require 'action_controller/new_base/base'
-require 'action_controller/new_base/renderer'
-require 'action_controller'
-require 'action_view/base'
+require 'action_view'
 require 'fixture_template'
 
 begin
@@ -34,67 +31,6 @@ module Rails
   end
 end
 
-module ActionController
-  class Base2 &lt; Http
-    abstract!
-    
-    use AbstractController::Callbacks
-    use AbstractController::Helpers
-    use AbstractController::Logger
-
-    use ActionController::HideActions
-    use ActionController::UrlFor
-    use ActionController::Renderer
-    use ActionController::Layouts
-    
-    def self.inherited(klass)
-      ::ActionController::Base2.subclasses &lt;&lt; klass.to_s
-      super
-    end
-    
-    def self.subclasses
-      @subclasses ||= []
-    end
-    
-    def self.app_loaded!
-      @subclasses.each do |subclass|
-        subclass.constantize._write_layout_method
-      end
-    end
-    
-    def render(action = action_name, options = {})
-      if action.is_a?(Hash)
-        options, action = action, nil 
-      else
-        options.merge! :action =&gt; action
-      end
-      
-      super(options)
-    end
-    
-    def render_to_body(options = {})
-      options = {:template =&gt; options} if options.is_a?(String)
-      super
-    end
-    
-    def process_action
-      ret = super
-      render if response_body.nil?
-      ret
-    end
-    
-    def respond_to_action?(action_name)
-      super || view_paths.find_by_parts?(action_name.to_s, {:formats =&gt; formats, :locales =&gt; [I18n.locale]}, controller_path)
-    end
-  end
-  
-  class CompatibleBase2 &lt; Base2
-    abstract!
-    
-    use ActionController::Rails2Compatibility
-  end
-end
-
 # Temporary base class
 class Rack::TestCase &lt; ActiveSupport::TestCase
   include Rack::Test::Methods
@@ -103,7 +39,7 @@ class Rack::TestCase &lt; ActiveSupport::TestCase
     ActionController::Base.session_options[:key] = &quot;abc&quot;
     ActionController::Base.session_options[:secret] = (&quot;*&quot; * 30)
     
-    controllers = ActionController::Base2.subclasses.map do |k| 
+    controllers = ActionController::Base.subclasses.map do |k| 
       k.underscore.sub(/_controller$/, '')
     end
     
@@ -171,7 +107,7 @@ class Rack::TestCase &lt; ActiveSupport::TestCase
   
 end
 
-class ::ApplicationController &lt; ActionController::Base2
+class ::ApplicationController &lt; ActionController::Base
 end
 
 class SimpleRouteCase &lt; Rack::TestCase</diff>
      <filename>actionpack/test/new_base/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b1d34b3aa42beaf6a9fb93f114aed8fe08ebd9db</id>
    </parent>
  </parents>
  <author>
    <name>Yehuda Katz + Carl Lerche</name>
    <login></login>
    <email>ykatz+clerche@engineyard.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/e046f36824fcc164c284a13524c6b4153010a4e1</url>
  <id>e046f36824fcc164c284a13524c6b4153010a4e1</id>
  <committed-date>2009-05-01T17:31:03-07:00</committed-date>
  <authored-date>2009-05-01T17:27:44-07:00</authored-date>
  <message>Renamed Base2 to Base and don't require old action_controller for new Base</message>
  <tree>08e7420dc8cb23db244fb46bb9878ac653d6eb39</tree>
  <committer>
    <name>Yehuda Katz + Carl Lerche</name>
    <login></login>
    <email>ykatz+clerche@engineyard.com</email>
  </committer>
</commit>
