[Rubygems-developers] Source caches again.

Eric Hodel drbrain at segment7.net
Sat Sep 22 05:38:34 EDT 2007

On Sep 21, 2007, at 01:51, Hugh Sasse wrote:
> On Thu, 20 Sep 2007, Eric Hodel wrote:
>> On Aug 29, 2007, at 10:38, Hugh Sasse wrote:
>>> On Wed, 29 Aug 2007, I wrote:
>>> --- rubygems-0.9.4/lib/rubygems/commands/
>>> clear_cache_command.rb.orig	2007-08-29 18:22:58.049867000 +0100
>>> +++ rubygems-0.9.4/lib/rubygems/commands/clear_cache_command.rb	
>> I don't understand this part.  How is this different from `gem
>> sources -c`?
> I needed a way to put in a command name that reflected the semantics
> of "clear the cache".  As far as I could see your commands are defined
> separately, so I had to create a new class for it.  My intent was to
> allow more than one way to do this:  either
> gem sources -c
> or
> gem clear_cache
> and this was the only way I could see to create this command.  Maybe
> there's a better way I have missed to add that command.
> In case you're wondering why anyone would need another command: I  
> didn't
> know till I poked around in this what was actually cached.  I  
> didn't know
> it was the sources as such.  So "clear the cache" which people mention
> didn't lead me to look at the source command. Therefore I thought  
> people
> would look for a separate command.

Is a change in documentation sufficient?  The sources command's  
description now reads:

$ gem help commands | grep -A1 sources
     sources           Manage the sources and cache file RubyGems  
uses to search
                       for gems

Also, the way the source cache works has been changed since the last  
release.  When --source (for install, etc) is given, only the sources  
listed on the command line are used.  To add extra sources  
permanently you must run `gem sources --add`.

Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars

More information about the Rubygems-developers mailing list