diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-07 03:40:23 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-07 03:40:23 +0100 |
commit | f7f113610e7cdca8ef03e206f2cbeb8400cdfefa (patch) | |
tree | 8d8a75ebb9e096b15dc759ff6e94856f70854203 /railties/lib/tasks/framework.rake | |
parent | 2dc5d12c91d0c717f7bac6b544193e810ce4917a (diff) | |
download | rails-f7f113610e7cdca8ef03e206f2cbeb8400cdfefa.tar.gz rails-f7f113610e7cdca8ef03e206f2cbeb8400cdfefa.tar.bz2 rails-f7f113610e7cdca8ef03e206f2cbeb8400cdfefa.zip |
Add a rake task to apply a template to an existing application.
Example : rake rails:template LOCATION=~/template.rb
Diffstat (limited to 'railties/lib/tasks/framework.rake')
-rw-r--r-- | railties/lib/tasks/framework.rake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index d639214ffe..191c9361ff 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -80,6 +80,12 @@ namespace :rails do desc "Update both configs, scripts and public/javascripts from Rails" task :update => [ "update:scripts", "update:javascripts", "update:configs", "update:application_controller" ] + desc "Applies the template supplied by LOCATION=/path/to/template" + task :template do + require 'rails_generator/generators/applications/app/template_runner' + Rails::TemplateRunner.new(ENV["LOCATION"]) + end + namespace :update do desc "Add new scripts to the application script/ directory" task :scripts do |