[Rubygems-developers] progressbar for remote installs

Bill Guindon agorilla at gmail.com
Fri Oct 8 22:40:24 EDT 2004

On Sat, 9 Oct 2004 11:51:21 +1000, Gavin Sinclair
<gsinclair at soyabean.com.au> wrote:
> On Saturday, October 9, 2004, 1:24:34 AM, Jim wrote:
> > chad at chadfowler.com said:
> >>
> >> Definitely!  Thank you very much!  I'll try to give this a look this
> >> weekend and integrate it.
> > Hmmm ... just remember that all user interaction (including output) needs
> > to go through the UI modules.  Otherwise the GUIs will get messed up.  I
> > haven't llook at progressbar so I don't know if that's going to be an
> > issue, but thought I would just issue a "heads up".
> That demonstrates what I consider a flaw in the way this is
> engineered.  Although we've tried to separate the concerns, the
> RubyGems *library* is still pretty much written as though it's a
> CL application.

Which is the flaw?  The inclusion of the progress bar, or asking that
it be separate from the UI?
Personally, I agree with Jim.  Had to deal with that issue when
playing with an html interface for RPA, and it is a problem if (long
term) you want a GUI.

> I ain't complaining, because it's hard to do these things properly.
> Very hard.  And the screenshots of gem GUIs I've seen look very good,
> so it can't be too bad :)

I'd love to see some myself.  I have dreams of a single GUI that works
with both, Gems and RPA.  Seems like it'd be good for Gems, good for
RPA, and good for Ruby users.

> If we go with the progress bar, which I'd be keen to see, perhaps we
> can introduce a special case in the code?  It's a smell, but...

Well, I'm not familiar with the existing UI modules, but a simple
wrapper would satisfy the CL and the GUI camps.  Add the progress bar
to fetch, but with a flag.  Old CL stuff still works, new GUI stuff
can turn it off.

def fetch( uri_str, gui=false )
  unless gui
     progressbar stuff

def fetch_gui( uri_str )
  fetch( uri_str, true )

I'm sure others can find more elegant solutions, but there's my $.02
(and that's probably a fair price for it)

Bill Guindon (aka aGorilla)

More information about the Rubygems-developers mailing list