ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

rake-task.diff

Toshi MARUYAMA, 2012-02-06 07:15 am

Download (2.2 kB)

 
b/Rakefile
5 5

  
6 6
require 'rake'
7 7
require 'rake/testtask'
8
require 'rdoc/task'
8

  
9
begin
10
  require 'rdoc/task'
11
rescue LoadError
12
  # RDoc is not available
13
end
9 14

  
10 15
require 'tasks/rails'
b/lib/tasks/documentation.rake
12 12
# See doc/COPYRIGHT.rdoc for more details.
13 13
#++
14 14

  
15
#clear the doc:app task et al
16
Rake::Task["doc:app"].clear
17
Rake::Task["doc/app"].clear
18
Rake::Task["doc/app/index.html"].clear
15
if Rake::Task.task_defined?("doc:app")
16
  # clear the doc:app task et al
17
  Rake::Task["doc:app"].clear
18
  Rake::Task["doc/app"].clear
19
  Rake::Task["doc/app/index.html"].clear
19 20

  
20
namespace :doc do
21
  desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""
22
  RDoc::Task.new("app") { |rdoc|
23
    rdoc.rdoc_dir = 'doc/app'
24
    rdoc.template = ENV['template'] if ENV['template']
25
    rdoc.title    = ENV['title'] || "ChiliProject"
26
    rdoc.options << '--line-numbers' << '--inline-source'
27
    rdoc.options << '--charset' << 'utf-8'
28
    rdoc.rdoc_files.include('app/**/*.rb')
29
    rdoc.rdoc_files.include('lib/**/*.rb')
30
    rdoc.rdoc_files.include('README.rdoc')
31
    rdoc.rdoc_files.include('doc/*.rdoc')
32
    rdoc.main = 'README.rdoc'
33
  }
21
  namespace :doc do
22
    desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""
23
    RDoc::Task.new("app") { |rdoc|
24
      rdoc.rdoc_dir = 'doc/app'
25
      rdoc.template = ENV['template'] if ENV['template']
26
      rdoc.title    = ENV['title'] || "ChiliProject"
27
      rdoc.options << '--line-numbers' << '--inline-source'
28
      rdoc.options << '--charset' << 'utf-8'
29
      rdoc.rdoc_files.include('app/**/*.rb')
30
      rdoc.rdoc_files.include('lib/**/*.rb')
31
      rdoc.rdoc_files.include('README.rdoc')
32
      rdoc.rdoc_files.include('doc/*.rdoc')
33
      rdoc.main = 'README.rdoc'
34
    }
35
  end
34 36
end