aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-01-16 22:27:51 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-03-20 15:37:45 +0900
commita42351acbc5406ab0825befe641144b4cb1ee6bf (patch)
tree4f86ccc44dc87f8e84c00de1eae7823648eaf96b /railties/lib/rails/tasks
parent1835d87fb848fd9f13e43bf16abd41be231b1666 (diff)
downloadrails-a42351acbc5406ab0825befe641144b4cb1ee6bf.tar.gz
rails-a42351acbc5406ab0825befe641144b4cb1ee6bf.tar.bz2
rails-a42351acbc5406ab0825befe641144b4cb1ee6bf.zip
Add `app:update` task to engines
Occasionally we update the file generated by engine. Therefore, I think that there is a task for updating as well as application in the engine, it is convenient for updating.
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/engine.rake11
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/lib/rails/tasks/engine.rake b/railties/lib/rails/tasks/engine.rake
index c92b42f6c1..177b138090 100644
--- a/railties/lib/rails/tasks/engine.rake
+++ b/railties/lib/rails/tasks/engine.rake
@@ -1,6 +1,17 @@
task "load_app" do
namespace :app do
load APP_RAKEFILE
+
+ desc "Update some initially generated files"
+ task update: [ "update:bin" ]
+
+ namespace :update do
+ require "rails/engine/updater"
+ # desc "Adds new executables to the engine bin/ directory"
+ task :bin do
+ Rails::Engine::Updater.run(:create_bin_files)
+ end
+ end
end
task environment: "app:environment"