On Oct 1, 7:06=A0pm, trans <transf... / gmail.com> wrote:
> Hi again---
>
> On Oct 1, 1:32=A0pm, Gordon Thiesfeld <gthiesf... / gmail.com> wrote:
>
> > I think the best way to do it is as an rdoc plugin. =A0RDoc_chm[1] is a=
n
> > RDoc plugin to. =A0RDoc searches for lib/rdoc/discover.rb in gems, and
> > loads them. =A0You have to have a require in discover.rb. =A0This will =
add
> > your gem's lib and bin to $LOAD_PATH. =A0I'm not totally sure how that
> > works, if it's a feature of RubyGems, or RDoc. =A0If you have no ruby
> > code in your template, you can just use "require 'rdoc/discover'".
> > The Darkfish generator searches for a template dir of the name
> > provided on the command line. =A0If no template is given, it defaults t=
o
> > the name of the generator.
>
> Unfortunately the discover.rb thing does not work. I'm not sure what
> RDoc is doing --it doesn't seem like it is doing anything in this
> regard actually. To get my RDoc to discover my template I somehow have
> to run:
>
> =A0 gem 'rdazzle'
>
> So it will be on the #LOAD_PATH. The only place to do that is say a
> Rakefile and use rake to generate the rdocs, or to add RUBYTOPT=3D"-
> rrdazzle".

Final follow-up on this. I verified that indeed discover.rb is being
loaded, but to get my template to be located I had to add:

  gem 'rdazzle'

to the top of the discover.rb file. Why the require wan;t enough I
don't know. But the gem call seemed to do the trick. Note that using:

  gem 'rdoc', ">=3D 2.4"

in the subsequently required file (i.e. where the subclass of Darkfish
is defined) caused some error for RubyGems. Is RubyGems dependent on
2.3 series? In any case I just omitted that whole file for now.

Thanks for the help, and I hope this thread might be helpful to others
if they want to create their own RDOC template plugins.

T.