From eaec958630ea53cddb84ef4746b23bcd917ba45d Mon Sep 17 00:00:00 2001 From: Ryo Hashimoto Date: Sat, 13 Feb 2016 14:14:23 +0900 Subject: The tasks in the rails task namespace is deprecated in favor of app namespace. (e.g. `rails:update` and `rails:template` tasks is renamed to `app:update` and `app:template`.) --- railties/lib/rails/tasks/framework.rake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails/tasks/framework.rake') diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 7601836809..ae92836407 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -1,4 +1,6 @@ -namespace :rails do +require 'active_support/deprecation' + +namespace :app do desc "Update configs and some other initially generated files (or use just update:configs or update:bin)" task update: [ "update:configs", "update:bin" ] @@ -66,3 +68,15 @@ namespace :rails do end end end + +namespace :rails do + %i(update template templates:copy update:configs update:bin).each do |task_name| + task "#{task_name}" do + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Running #{task_name} with the rails: namespace is deprecated in favor of app. + Run e.g. bin/rails app:#{task_name} instead." + MSG + Rake.application.invoke_task("app:#{task_name}") + end + end +end -- cgit v1.2.3