From 7466c1125c907ad9b9391331809c749ccb3d1c78 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 4 Sep 2006 00:49:08 +0000 Subject: [PATCH] Formally deprecate the non-namespaced rake tasks. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4960 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 + railties/lib/tasks/pre_namespace_aliases.rake | 61 +++++++++++-------- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 1a64a26e8e..6a42f8fa17 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Formally Deprecate the old rake tasks. [Koz] + * Thoroughly test the FCGI dispatcher. #5970 [Kevin Clark] * Remove Dir.chdir in the Webrick DispatchServlet#initialize method. Fix bad path errors when trying to load config/routes.rb. [Rick Olson] diff --git a/railties/lib/tasks/pre_namespace_aliases.rake b/railties/lib/tasks/pre_namespace_aliases.rake index 46215e7c88..f7b84d59f1 100644 --- a/railties/lib/tasks/pre_namespace_aliases.rake +++ b/railties/lib/tasks/pre_namespace_aliases.rake @@ -1,46 +1,53 @@ +def deprecated_task(name, new_name) + task name=>new_name do + $stderr.puts "The rake task #{name} has been deprecated, please use the replacement version #{new_name}" + end +end + + # clear -task :clear_logs => "log:clear" +deprecated_task :clear_logs, "log:clear" # test -task :recent => "test:recent" -task :test_units => "test:units" -task :test_functional => "test:functionals" -task :test_plugins => "test:plugins" +deprecated_task :recent, "test:recent" +deprecated_task :test_units, "test:units" +deprecated_task :test_functional, "test:functionals" +deprecated_task :test_plugins, "test:plugins" # doc -task :appdoc => "doc:app" -task :apidoc => "doc:rails" -task :plugindoc => "doc:plugins" -task :clobber_plugindoc => "doc:clobber_plugins" +deprecated_task :appdoc, "doc:app" +deprecated_task :apidoc, "doc:rails" +deprecated_task :plugindoc, "doc:plugins" +deprecated_task :clobber_plugindoc, "doc:clobber_plugins" FileList['vendor/plugins/**'].collect { |plugin| File.basename(plugin) }.each do |plugin| - task :"#{plugin}_plugindoc" => "doc:plugins:#{plugin}" + deprecated_task :"#{plugin}_plugindoc", "doc:plugins:#{plugin}" end # rails -task :freeze_gems => "rails:freeze:gems" -task :freeze_edge => "rails:freeze:edge" -task :unfreeze_rails => "rails:unfreeze" -task :add_new_scripts => "rails:update:scripts" -task :update_javascripts => "rails:update:javascripts" +deprecated_task :freeze_gems, "rails:freeze:gems" +deprecated_task :freeze_edge, "rails:freeze:edge" +deprecated_task :unfreeze_rails, "rails:unfreeze" +deprecated_task :add_new_scripts, "rails:update:scripts" +deprecated_task :update_javascripts, "rails:update:javascripts" # db -task :migrate => "db:migrate" -task :load_fixtures => "db:fixtures:load" +deprecated_task :migrate, "db:migrate" +deprecated_task :load_fixtures, "db:fixtures:load" -task :db_schema_dump => "db:schema:dump" -task :db_schema_import => "db:schema:load" +deprecated_task :db_schema_dump, "db:schema:dump" +deprecated_task :db_schema_import, "db:schema:load" -task :db_structure_dump => "db:structure:dump" +deprecated_task :db_structure_dump, "db:structure:dump" -task :purge_test_database => "db:test:purge" -task :clone_schema_to_test => "db:test:clone" -task :clone_structure_to_test => "db:test:clone_structure" -task :prepare_test_database => "db:test:prepare" +deprecated_task :purge_test_database, "db:test:purge" +deprecated_task :clone_schema_to_test, "db:test:clone" +deprecated_task :clone_structure_to_test, "db:test:clone_structure" +deprecated_task :prepare_test_database, "db:test:prepare" -task :create_sessions_table => "db:sessions:create" -task :drop_sessions_table => "db:sessions:drop" -task :purge_sessions_table => "db:sessions:recreate" +deprecated_task :create_sessions_table, "db:sessions:create" +deprecated_task :drop_sessions_table, "db:sessions:drop" +deprecated_task :purge_sessions_table, "db:sessions:recreate"