diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-15 17:36:54 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-15 17:36:54 -0700 |
commit | 71f7e75d95c47e4283a7cac0a2f776abf0a11d0e (patch) | |
tree | 75a9b6825f9f81a9bec372af8db097b6ea022fc6 /actionpack | |
parent | 2d7abe245e7a2b1717e48ef550e4083318fd7ec2 (diff) | |
parent | ef70ad5538c4ce02c4d31ef01a8db6b55c837571 (diff) | |
download | rails-71f7e75d95c47e4283a7cac0a2f776abf0a11d0e.tar.gz rails-71f7e75d95c47e4283a7cac0a2f776abf0a11d0e.tar.bz2 rails-71f7e75d95c47e4283a7cac0a2f776abf0a11d0e.zip |
Merge branch 'master' into orchestra
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/Gemfile | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/base.rb | 11 | ||||
-rw-r--r-- | actionpack/test/abstract_unit.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/new_base/content_negotiation_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/new_base/metal_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/rescue_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/test_request_test.rb | 2 |
7 files changed, 18 insertions, 9 deletions
diff --git a/actionpack/Gemfile b/actionpack/Gemfile index 3cf6e6e333..506458365f 100644 --- a/actionpack/Gemfile +++ b/actionpack/Gemfile @@ -2,7 +2,7 @@ rails_root = Pathname.new(File.dirname(__FILE__)).join("..") Gem.sources.each { |uri| source uri } -gem "rack", "~> 1.0.0" +gem "rack", "1.0.1", :git => "git://github.com/rack/rack.git", :branch => "rack-1.0" gem "rack-test", "~> 0.5.0" gem "activesupport", "3.0.pre", :vendored_at => rails_root.join("activesupport") gem "activemodel", "3.0.pre", :vendored_at => rails_root.join("activemodel") diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 58dae0bb0f..84e4103280 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -167,7 +167,16 @@ module ActionView #:nodoc: module Subclasses end - include Helpers, Rendering, Partials, ::ERB::Util, ActiveSupport::Configurable + include Helpers, Rendering, Partials, ::ERB::Util + + def config + self.config = DEFAULT_CONFIG unless @config + @config + end + + def config=(config) + @config = ActiveSupport::OrderedOptions.new.merge(config) + end extend ActiveSupport::Memoizable diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 0d65bdb5b9..f7a1564f90 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -176,8 +176,8 @@ class ::ApplicationController < ActionController::Base end module ActionController - class << Routing - def possible_controllers + module Routing + def self.possible_controllers @@possible_controllers ||= [] end end diff --git a/actionpack/test/controller/new_base/content_negotiation_test.rb b/actionpack/test/controller/new_base/content_negotiation_test.rb index 7b38a82f51..b98a22dfcc 100644 --- a/actionpack/test/controller/new_base/content_negotiation_test.rb +++ b/actionpack/test/controller/new_base/content_negotiation_test.rb @@ -5,7 +5,7 @@ module ContentNegotiation # This has no layout and it works class BasicController < ActionController::Base self.view_paths = [ActionView::FixtureResolver.new( - "content_negotiation/basic/hello.html.erb" => "Hello world <%= request.formats %>!" + "content_negotiation/basic/hello.html.erb" => "Hello world <%= request.formats.first.to_s %>!" )] end diff --git a/actionpack/test/controller/new_base/metal_test.rb b/actionpack/test/controller/new_base/metal_test.rb index e1d46b906e..ab61fd98ee 100644 --- a/actionpack/test/controller/new_base/metal_test.rb +++ b/actionpack/test/controller/new_base/metal_test.rb @@ -20,8 +20,8 @@ module MetalTest class TestMiddleware < ActiveSupport::TestCase def setup @app = Rack::Builder.new do - use MetalMiddleware - run Endpoint.new + use MetalTest::MetalMiddleware + run MetalTest::Endpoint.new end.to_app end diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 689359166f..054a9f2aaf 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -327,7 +327,7 @@ class RescueTest < ActionController::IntegrationTest test 'rescue routing exceptions' do @app = ActionDispatch::Rescue.new(ActionController::Routing::Routes) do - rescue_from ActionController::RoutingError, lambda { |env| [200, {"Content-Type" => "text/html"}, "Gotcha!"] } + rescue_from ActionController::RoutingError, lambda { |env| [200, {"Content-Type" => "text/html"}, ["Gotcha!"]] } end get '/b00m' diff --git a/actionpack/test/dispatch/test_request_test.rb b/actionpack/test/dispatch/test_request_test.rb index b8e340e055..b2006a0d2f 100644 --- a/actionpack/test/dispatch/test_request_test.rb +++ b/actionpack/test/dispatch/test_request_test.rb @@ -18,7 +18,7 @@ class TestRequestTest < ActiveSupport::TestCase assert_equal "0.0.0.0", env.delete("REMOTE_ADDR") assert_equal "Rails Testing", env.delete("HTTP_USER_AGENT") - assert_equal [0, 1], env.delete("rack.version") + assert_equal [1, 0], env.delete("rack.version") assert_equal "", env.delete("rack.input").string assert_kind_of StringIO, env.delete("rack.errors") assert_equal true, env.delete("rack.multithread") |