Browse files

Remove config.ru generation from --with-dispatchers option

  • Loading branch information...
1 parent 5fba540 commit c83c0f693628baa644eb902ff70d719fe33e3787 @josh josh committed Sep 25, 2009
View
1 railties/lib/rails/generators/rails/app/app_generator.rb
@@ -115,7 +115,6 @@ def create_public_files
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
View
5 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
View
7 railties/lib/rails/generators/rails/app/templates/dispatchers/config.ru
@@ -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
View
2 railties/test/generators/app_generator_test.rb
@@ -55,14 +55,12 @@ def test_invalid_database_option_raises_an_error
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

0 comments on commit c83c0f6

Please sign in to comment.