diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-10-21 18:33:40 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-21 18:33:40 +0100 |
commit | a03e2b356c66ddc8809fa2b23a2a7d652f173b8b (patch) | |
tree | ab8552913475bf94a78e4cbfbae804b2ecd9eca2 /railties/lib/tasks | |
parent | 18542c9e00209679bdaacf64075819fb887ec856 (diff) | |
download | rails-a03e2b356c66ddc8809fa2b23a2a7d652f173b8b.tar.gz rails-a03e2b356c66ddc8809fa2b23a2a7d652f173b8b.tar.bz2 rails-a03e2b356c66ddc8809fa2b23a2a7d652f173b8b.zip |
Merge with docrails. Also add a rake task to generate guides in your rails application :
rake doc:guides
The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/documentation.rake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/lib/tasks/documentation.rake b/railties/lib/tasks/documentation.rake index b20b58ba24..77b6532fbf 100644 --- a/railties/lib/tasks/documentation.rake +++ b/railties/lib/tasks/documentation.rake @@ -52,6 +52,19 @@ namespace :doc do rm_rf 'doc/plugins' rescue nil end + desc "Generate Rails guides" + task :guides do + source = File.join(RAILTIES_PATH, "doc/guides") + destination = File.join(RAILS_ROOT, "doc/guides") + FileUtils.rm_r(destination) if File.directory?(destination) + FileUtils.mkdir(destination) + + FileUtils.cp_r File.join(source, 'html/.'), File.join(destination) + # Copy images and css files to html directory. These dirs are in .gitigore and shouldn't be source controlled. + FileUtils.cp_r File.join(source, 'source/images'), File.join(destination, 'images') + FileUtils.cp_r File.join(source, 'source/stylesheets'), File.join(destination, 'stylesheets') + end + namespace :plugins do # Define doc tasks for each plugin plugins.each do |plugin| |