diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-25 23:15:49 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-25 23:15:49 -0500 |
commit | c83c0f693628baa644eb902ff70d719fe33e3787 (patch) | |
tree | 3c3ee8611956ca8c5f6b5b58e9f88b6df12c95c0 | |
parent | 5fba5409f7cffc67a5966fc386c945b5a935c60c (diff) | |
download | rails-c83c0f693628baa644eb902ff70d719fe33e3787.tar.gz rails-c83c0f693628baa644eb902ff70d719fe33e3787.tar.bz2 rails-c83c0f693628baa644eb902ff70d719fe33e3787.zip |
Remove config.ru generation from --with-dispatchers option
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 |