From 1cbdd53bd383e7d1dc34cad50c22ff5a330bbf91 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 24 Nov 2008 19:50:09 +0100 Subject: Add a rake task to generate dispatchers : rake rails:generate_dispatchers --- railties/lib/tasks/framework.rake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 4cf174b15b..df080e94ac 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -124,5 +124,13 @@ namespace :rails do puts "#{old_style} has been renamed to #{new_style}, update your SCM as necessary" end end + + desc "Generate dispatcher files in RAILS_ROOT/public" + task :generate_dispatchers do + require 'railties_path' + FileUtils.cp(RAILTIES_PATH + '/dispatches/dispatch.fcgi', RAILS_ROOT + '/public/dispatch.fcgi') + FileUtils.cp(RAILTIES_PATH + '/dispatches/dispatch.rb', RAILS_ROOT + '/public/dispatch.rb') + FileUtils.cp(RAILTIES_PATH + '/dispatches/dispatch.rb', RAILS_ROOT + '/public/dispatch.cgi') + end end end -- cgit v1.2.3