[Rubygems-developers] ri generation patch for Rubygems

Eric Hodel drbrain at segment7.net
Wed Feb 22 12:46:44 EST 2006


On Feb 22, 2006, at 5:32 AM, John Wells wrote:

> Eric Hodel said:
>> On Feb 17, 2006, at 2:39 AM, Eric Hodel wrote:
>>
>>> 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  
>>> explicit.
>>
>> With 1.8.5 coming up RSN I'd like to get this patch reviewed while
>> there's still a chance to get the ri changes into the 1.8 branch.
>>
>> Mostly on the methods I removed.
>
> Did you look at my already submitted patch? I admittedly haven't had a
> chance to look at yours.
>
> How are they different?

My patch allows easy uninstallation of ri data because it isn't  
stored in the system ri directory, yours does not:

On Jan 31, 2006, at 8:20 AM, John Wells wrote:

> Also note I don't offer the capability of removing the ri info on
> uninstall, only a note stating that you should do it.

It looks like your patch only allows you to choose ri or RDoc, but  
not both:

> Index: lib/rubygems/doc_manager.rb
> ===================================================================
> RCS file: /var/cvs/rubygems/rubygems/lib/rubygems/doc_manager.rb,v
> retrieving revision 1.24
> diff -u -r1.24 doc_manager.rb
> --- lib/rubygems/doc_manager.rb	28 Feb 2005 21:10:06 -0000	1.24
> +++ lib/rubygems/doc_manager.rb	31 Jan 2006 15:52:10 -0000
> @@ -55,13 +54,18 @@
>            @rdoc_args.concat(DocManager.configured_args)
>            r = RDoc::RDoc.new
>            begin
> -            r.document(['--quiet', '--op', rdoc_dir] +  
> @rdoc_args.flatten + source_dirs)
> +            if include_ri
> +              say "Installing ri documentation for # 
> {@spec.full_name}..."
> +              r.document(['--quiet', '--op', '--merge', '-r', '-- 
> ri-system', rdoc_dir] +
> +                         @rdoc_args.flatten +
> +                         source_dirs)
> +            else
> +              say "Installing RDoc documentation for # 
> {@spec.full_name}..."
> +              r.document(['--quiet', '--op', rdoc_dir] +  
> @rdoc_args.flatten + source_dirs)
> +            end
>            rescue Errno::EACCES => e
>              raise Gem::FilePermissionError.new(File.dirname 
> (e.message.split("-")[1].strip))
>            end
> -	 #TODO: Why is this throwing an error?
> -          #ri = RDoc::RDoc.new
> -          #ri.document(['-R'] + source_dirs)
>          ensure
>            Dir.chdir(current_dir)
>          end

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

http://trackmap.robotcoop.com




More information about the Rubygems-developers mailing list