Skip to content

Commit

Permalink
Use Rails.application where we want a valid rack app
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 17, 2009
1 parent d859402 commit c1261b5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/dispatch/dispatcher.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def define_dispatcher_callbacks(cache_classes)


def new def new
# DEPRECATE Rails application fallback # DEPRECATE Rails application fallback
Rails.application.new Rails.application
end end
end end
end end
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/testing/integration.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ class IntegrationTest < ActiveSupport::TestCase
def self.app def self.app
# DEPRECATE Rails application fallback # DEPRECATE Rails application fallback
# This should be set by the initializer # This should be set by the initializer
@@app || (defined?(Rails.application) && Rails.application.new) || nil @@app || (defined?(Rails.application) && Rails.application) || nil
end end


def self.app=(app) def self.app=(app)
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)


# Dispatch the request # Dispatch the request
run Rails.application.new run Rails.application
2 changes: 1 addition & 1 deletion railties/test/application/load_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup


test "Rails.application is available after config.ru has been racked up" do test "Rails.application is available after config.ru has been racked up" do
rackup rackup
assert Rails.application.new < Rails::Application assert Rails.application < Rails::Application
end end


# Passenger still uses AC::Dispatcher, so we need to # Passenger still uses AC::Dispatcher, so we need to
Expand Down

0 comments on commit c1261b5

Please sign in to comment.