Stefan Lang wrote:
> On Tuesday 04 October 2005 12:41, Damphyr wrote:
> 
>> It all started with me using the Rake::RDocTask:
>> 
>> Rake::RDocTask.new do |rd| rd.title="rrt_ruby" 
>> rd.rdoc_dir=File.join(SOURCEDIR,"site/rdoc") rd.rdoc_files.include(
>> "lib/**/*.rb") end
>> 
>> dies with the following: d:\projects\rrt_ruby>rake rdoc (in
>> d:/projects/rrt_ruby) rm -r D:/projects/rrt_ruby/site/rdoc rdoc -o
>> D:/projects/rrt_ruby/site/rdoc --title 'rrt_ruby' -T 'html' 
>> lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb 
>> lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb 
>> lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb rake
>> aborted! undefined method `exitstatus' for nil:NilClass
>> 
>> Taking the rdoc command line from there I get the following:
>> 
>> d:\projects\rrt_ruby>rdoc -o D:/projects/rrt_ruby/site/rdoc --title
>>  'rrt_ruby' -T 'html' lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb 
>> lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb 
>> lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb
>> 
>> rrt_ruby.rb: mc riva_ruby.rb: mm. rrt_component.rb:
>> mmc..c..c..m......c Generating HTML...
>> 
>> Files:   3 Classes: 5 Modules: 6 Methods: 13 Elapsed: 1.001s
>> 
>> Which is plain wrong, since I have 5 files to produce RDoc from. 
>> Now, if I remove the --title option, RDoc does it's job no problem.
>>  As you probably deduced I'm on Windows. Ruby says ruby 1.8.2
>> (2004-12-25) [i386-mswin32] Any hints as to what goes wrong? 
>> Cheers, V.-
> 
> 
> This could be fixed in rake. I posted a solution once. Some options
> for you:
> 
> * Replace the Rake::RDocTask with:
> 
> task "rdoc" do require 'rdoc/rdoc' # give the same arguments as to
> rdoc from commandline # try "rdoc --help" 
> RDoc::RDoc.new.document(%w(--title rrt_ruby -T html .....)) end
> 
> (The problem with invoking rdoc from the commandline on Windows is,
> that a batch file is the start script which takes only 8 (or
> something like that) arguments.)
Oooops, I should have counted (it's that having 5 files you don't count 
the --options :) ). I can always do some pasta code that counts the 
arguments and loops so that the batch file is always called right.
What I find wierd is that RDocTask is using the batchfile in rake and 
not the RDoc class.
Fixing it should be easier than doing spaghetti.

> * Use Rant: http://make.ruby-co.de It's easy to convert a Rakefile to
> a Rantfile.
Stefan you've done a great job, but purely through momentum I find it 
myself easier to write an RDoc task for Rake than a Gem Task for Rant 
(objectively it's the same effort - as I said, it's only momentum)
Cheers,
V.-
-- 
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
http://www.freemail.gr - free email service for the Greek-speaking.