mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Remove config.ru generation from --with-dispatchers option
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user