From: Dave Thomas Date: 2004-04-22T22:22:14+09:00 Subject: Re: how to get ri/rdoc working for [user-installed libraries] On Apr 22, 2004, at 3:03, Gavin Sinclair wrote: > That's definitely in our TODO. We haven't fleshed it out, but I > believe a > sensible system would require a change to ri. If you have 100 gems > installed, and run 'ri --classes', I'm sure you don't want to see 1000 > classes. > Why not? > So a more sensible use case (IMO) is: > > ri --gem log4r # Shows all relevant classes > ri --gem log4r Log4r # Searches class/method within log4r space > > ri --search to_i # Global search > I'm afraid I disagree 100% with this. gems are ways of getting code into the box, but in their users' minds that's it. The approach you're suggesting is equivalent to man -k --installed-via-rpm xxx man -k --installed-manually xxx etc > Consider this also. When you uninstall a gem, it should remove the ri > data. Basically, the ri data for a gem should be installed in that > gem's > directory, like: > > gems/log4r/doc/rdoc # exists > gems/log4r/doc/ri # doesn't exist > Why? Don't gems keep track of the files they've altered during installation, and remove those that were altered but not already there on uninstall? I don't see why anything needs to know about gems apart from gems? > All of this is definitely doable, but it needs your input, Dave. I'd be happy to make any reasonable changes (I'll look at the reentrancy issue batsman raised, for example). But I'm not convinced at all that ri (or any other utility) should be gems aware. It they need to be, then I'm currently thinking that that means the gems system could be more transparent. Cheers Dave