diff options
4 files changed, 5 insertions, 10 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 8d8f138dca..b2322f90b4 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -115,7 +115,6 @@ module Rails::Generators def create_dispatch_files return unless options[:with_dispatchers] - copy_file "dispatchers/config.ru", "config.ru" template "dispatchers/dispatch.rb", "public/dispatch.rb" chmod "public/dispatch.rb", 0755, :verbose => false diff --git a/railties/lib/rails/generators/rails/app/templates/config.ru b/railties/lib/rails/generators/rails/app/templates/config.ru index 30b00bfa1f..acbfe4e9ae 100644 --- a/railties/lib/rails/generators/rails/app/templates/config.ru +++ b/railties/lib/rails/generators/rails/app/templates/config.ru @@ -1,2 +1,7 @@ +# Rack Dispatcher + +# Require your environment file to bootstrap Rails require File.dirname(__FILE__) + '/config/environment' + +# Dispatch the request run ActionController::Dispatcher.new diff --git a/railties/lib/rails/generators/rails/app/templates/dispatchers/config.ru b/railties/lib/rails/generators/rails/app/templates/dispatchers/config.ru deleted file mode 100644 index acbfe4e9ae..0000000000 --- a/railties/lib/rails/generators/rails/app/templates/dispatchers/config.ru +++ /dev/null @@ -1,7 +0,0 @@ -# Rack Dispatcher - -# Require your environment file to bootstrap Rails -require File.dirname(__FILE__) + '/config/environment' - -# Dispatch the request -run ActionController::Dispatcher.new diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index c9c230f5f5..afc0585fba 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -55,14 +55,12 @@ class AppGeneratorTest < GeneratorsTestCase def test_dispatchers_are_not_added_by_default run_generator - assert_no_file "config.ru" assert_no_file "public/dispatch.cgi" assert_no_file "public/dispatch.fcgi" end def test_dispatchers_are_added_if_required run_generator ["--with-dispatchers"] - assert_file "config.ru" assert_file "public/dispatch.cgi" assert_file "public/dispatch.fcgi" end |