On Fri, 14 Nov 2008, Vassilis Rizopoulos wrote:

> _why wrote:
> > On Fri, Nov 14, 2008 at 07:49:51PM +0100, Vassilis Rizopoulos wrote:
> > > It needs a bit more activity - it is stuck to "looking for rutema"
> > > while installing all the dependent gems. It would be a lot better
        [...]
> > That really would be better.  Hopefully we can get our hooks into RubyGems a
> > bit more in the future to let us show progress in greater detail.  I even
        [...]
> Well, just resurfaced from tracking the setup code :)
> I guess at the present time there is not much we can do.
> The gem step in the setup launches Gem::DependencyInstaller and there is  not
> much we can do past that point as everything is done by this class.
> Maybe a patch to make DependencyInstaller observable?

But that includes Gem::UserInteraction

http://rubygems.rubyforge.org/svn/trunk/lib/rubygems/user_interaction.rb

which gives you self.ui, and self.ui= from DefaultUserInteraction,
so that you get 

  module UserInteraction

    include DefaultUserInteraction

    [:alert,
     :alert_error,
     :alert_warning,
     :ask,
     :ask_yes_no,
     :choose_from_list,
     :say,
     :terminate_interaction ].each do |methname|
      class_eval %{
        def #{methname}(*args)
          ui.#{methname}(*args)
        end
      }, __FILE__, __LINE__
    end
  end

So, my quick reading of this is that it will self.ui.send(:ask,...)
[and so forth] to you, so you can intercept all this stuff.  Or 
am I reading this way too quickly?

I've not looked in the code for a while, so could be talking utter
piffle. :-)

> Would that be a viable/acceptable solution for the Gem team you think?
> I mean we could just patch the Gem distribution included with Shoes without
> demanding that gem includes it...although upgrades will probably be a pain.
> Cheers,
> V.-
> 
        Hugh

Reply via email to