diff options
author | George Claghorn <george@basecamp.com> | 2019-01-04 19:43:11 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2019-01-04 22:22:49 -0500 |
commit | 0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93 (patch) | |
tree | 91b8ddcf86b15356cd8d3dee235bf53a1778572b /actiontext/lib/tasks | |
parent | 8a23a0e8c20c0cccf0073906d7dd7f809bfa836d (diff) | |
parent | cfe4674d3637c746cdb3c2b5131e2de498775529 (diff) | |
download | rails-0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93.tar.gz rails-0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93.tar.bz2 rails-0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93.zip |
Import Action Text
Diffstat (limited to 'actiontext/lib/tasks')
-rw-r--r-- | actiontext/lib/tasks/actiontext.rake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actiontext/lib/tasks/actiontext.rake b/actiontext/lib/tasks/actiontext.rake new file mode 100644 index 0000000000..4f90e4930c --- /dev/null +++ b/actiontext/lib/tasks/actiontext.rake @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +namespace :action_text do + # Prevent migration installation task from showing up twice. + Rake::Task["install:migrations"].clear_comments + + desc "Copy over the migration, stylesheet, and JavaScript files" + task install: %w( environment run_installer copy_migrations ) + + task :run_installer do + installer_template = File.expand_path("../templates/installer.rb", __dir__) + system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{installer_template}" + end + + task :copy_migrations do + Rake::Task["active_storage:install:migrations"].invoke + Rake::Task["railties:install:migrations"].reenable # Otherwise you can't run 2 migration copy tasks in one invocation + Rake::Task["action_text:install:migrations"].invoke + end +end |