[Rubygems-developers] SourceInfoCache.search

Chad Fowler chad at chadfowler.com
Sat Sep 15 00:36:04 EDT 2007


On 9/15/07, Eric Hodel <drbrain at segment7.net> wrote:
> On Sep 14, 2007, at 11:06, Alan C Francis wrote:
>
> > I'm building a little tool around gems, mostly as a learning tool.  I
> > called SourceInfoCache.search while disconnected and was unsurprised
> > to see it fail.   If I rescue and just retry, I get results (which I
> > assume are the cache mentioned in the title :-)
> >
> > If there a way to ask just for the cache without trying to make the
> > netcall first ?
>
> No.
>

There's actually an ugly way to do it.  E.g.:

 Gem::SourceInfoCache.new.cache_data.values.map{|s|
s.source_index.map{|g| g.first}}.flatten

Chad


More information about the Rubygems-developers mailing list