aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/framework.rake
diff options
context:
space:
mode:
authorRyo Hashimoto <ryohashimoto@gmail.com>2016-02-13 14:14:23 +0900
committerRyo Hashimoto <ryohashimoto@gmail.com>2016-02-26 19:35:23 +0900
commiteaec958630ea53cddb84ef4746b23bcd917ba45d (patch)
tree32332447110640ccf548c9e839c99014f62e65e9 /railties/lib/rails/tasks/framework.rake
parent56ca2061df83a307943a0ffdfe6f5f4ed5846cf7 (diff)
downloadrails-eaec958630ea53cddb84ef4746b23bcd917ba45d.tar.gz
rails-eaec958630ea53cddb84ef4746b23bcd917ba45d.tar.bz2
rails-eaec958630ea53cddb84ef4746b23bcd917ba45d.zip
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`.)
Diffstat (limited to 'railties/lib/rails/tasks/framework.rake')
-rw-r--r--railties/lib/rails/tasks/framework.rake16
1 files changed, 15 insertions, 1 deletions
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