[Rubygems-developers] ri generation patch for Rubygems

Eric Hodel drbrain at segment7.net
Fri Feb 17 05:39:00 EST 2006

This is part of a rather interesting discovery I made while poking  
through the RDoc sources.  The following bit of code will allow ri to  
pick up documentation from gems:

   require 'rubygems'
   Dir["#{Gem.path}/gems/*/ri"].each do |path|
     RI::Paths::PATH << path
rescue LoadError

So the attached patch will cause gems with RDoc to also generate ri  
data.  It seems that there's a bunch of methods in doc_manager that  
didn't get called anymore, and I cleaned it up to make it much more  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc_manager.rb.ri.patch
Type: application/octet-stream
Size: 3601 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20060217/7c44e43c/doc_manager.rb.ri.obj
-------------- next part --------------

So now I can do things like:

$ ri MogileFS::MogileFS#delete
---------------------------------------------- MogileFS::MogileFS#delete
      Removes +key+.

Eric Hodel - drbrain at segment7.net - http://segment7.net
This implementation is HODEL-HASH-9600 compliant


More information about the Rubygems-developers mailing list