From 8824740d813c0e4d4e91d8685a52056dd0857a11 Mon Sep 17 00:00:00 2001 From: Jake Howerton Date: Fri, 9 May 2008 11:32:35 -0400 Subject: [PATCH] add rdoc tasks for activemodel lib --- Rakefile | 3 +++ activemodel/Rakefile | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/Rakefile b/Rakefile index 11d205a..07d6afd 100644 --- a/Rakefile +++ b/Rakefile @@ -17,5 +17,8 @@ task :default => :test PROJECTS.each do |project| system %(cd #{project} && #{env} #{$0} #{task_name}) end + + # FIXME: Ugly but the other tasks are currently n/a for ActiveModel + system %(cd activemodel && #{env} #{$0} #{task_name}) if task_name == 'rdoc' end end diff --git a/activemodel/Rakefile b/activemodel/Rakefile index cb9a617..0f77b66 100644 --- a/activemodel/Rakefile +++ b/activemodel/Rakefile @@ -1,4 +1,17 @@ #!/usr/bin/env ruby $LOAD_PATH << File.join(File.dirname(__FILE__), 'vendor', 'rspec', 'lib') require 'rake' -require 'spec/rake/spectask' \ No newline at end of file +require 'spec/rake/spectask' +require 'rake/rdoctask' + +# Generate the RDoc documentation +Rake::RDocTask.new { |rdoc| + rdoc.rdoc_dir = 'doc' + rdoc.title = "Active Model" + rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object' + rdoc.options << '--charset' << 'utf-8' + rdoc.template = "#{ENV['template']}.rb" if ENV['template'] + rdoc.rdoc_files.include('README', 'CHANGES') + rdoc.rdoc_files.include('lib/active_model.rb') + rdoc.rdoc_files.include('lib/active_model/*.rb') +} \ No newline at end of file -- 1.5.5.1