New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress Bar During Downloads #2

Closed
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@ryanmelt
Contributor

ryanmelt commented Sep 25, 2010

Hello all,
This pull request brings in a progress bar that will be displayed while downloading gems. This is particularly useful when downloading large gems such as qtbindings on Windows. If the extra STDOUT output is undesirable, it would be easy to modify it to only output for large files (maybe > 1 Mb?). I like the feedback for all file sizes personally. Let me know what you think.
Thanks,
Ryan Melton

@luislavena

This comment has been minimized.

Member

luislavena commented Sep 26, 2010

I like it, however I'm not sure of including ProgressBar globally.

Saying this because there is a progressbar gem: https://rubygems.org/gems/progressbar and it might clash.

Rubinius guys did a simple implementation:

http://github.com/evanphx/rubinius/blob/master/configure#L241-271

That did not depend on the the additional class.

We also need to check how this could affect the automated output, specially for projects like Bundler and such.

Guys?

@ryanmelt

This comment has been minimized.

Contributor

ryanmelt commented Sep 28, 2010

I added the progressbar class to the gem namespace, so it shouldn't conflict with anything now.

@luislavena

This comment has been minimized.

Member

luislavena commented Sep 28, 2010

Hello,

I think the good idea will be remove ProgressBar at all.

Also, all the remote operations are been handled by this, so fetching of specs and everything is streamed.

There is also another problem, it doesn't work with 1.8.7:


Downloading latest_specs.4.8.gz
ERROR:  While executing gem ... (NoMethodError)oooooooooooooooo| ETA:  00:00:00
    undefined method `body=' for #Net::HTTPOK 200 OK readbody=true

Tested with ruby -Ilib bin/gem fetch qtbindings

See my patch to only generate the progress report when a gem is being downloaded: http://gist.github.com/600349

@ryanmelt

This comment has been minimized.

Contributor

ryanmelt commented Sep 29, 2010

I updated it to remove the progressbar class and to use a single line that gets redrawn as suggested in your gist. Also updated to work with 1.8.7.
Ryan

@luislavena

This comment has been minimized.

Member

luislavena commented Sep 29, 2010

Thank you Ryan

Posted about this to rubygems-devel:

http://rubyforge.org/pipermail/rubygems-developers/2010-September/005573.html

Waiting for feedback there before decide to integrate it.

@ryanmelt

This comment has been minimized.

Contributor

ryanmelt commented Oct 10, 2010

Hi Luis, I believe I addressed your issue of using print and flush directly by wrapping them in say-like statements. As no one has commented, can we get this incorporated?
Thanks,
Ryan

@luislavena

This comment has been minimized.

Member

luislavena commented Oct 11, 2010

Hello Ryan.

I bring this topic to RubyGems about making the progress bar something part of UI component to have better control of it.

Also, this print/flush approach do not work nice with remote automations like Chef, so move of this to the UI and have an option to turn it of will be the best.

See my thread and further comments there:

http://rubyforge.org/pipermail/rubygems-developers/2010-September/005573.html

This should be integrated, but to my bad, I'm not 100 percent sure on the approach and to my bad haven't received the feedback from other RubyGems maintainers

Will keep you posted.

@luislavena

This comment has been minimized.

Member

luislavena commented Nov 20, 2010

Hello Ryan,

I'm working today on extend UserInteraction to support a configurable Download reporter, in that way, it will make more easy for non-tty interfaces to work and not generate a bunch of output.

Thank you again for your contribution. Will post a link to the commits once I'm done for you to test and review.

@qrush

This comment has been minimized.

Member

qrush commented Dec 10, 2010

Been wanting this forever. Any kind of feedback when gem install happens would be AWESOME.

@zenspider

This comment has been minimized.

Contributor

zenspider commented Dec 10, 2010

I defer to Luis (who needs to stop deferring to the list).

@luislavena

This comment has been minimized.

Member

luislavena commented Dec 27, 2010

Hello guys,

I've posted this to the list for review:

http://rubyforge.org/pipermail/rubygems-developers/2010-December/005942.html

I've implemented Ryan idea into a more modular and non-tty friendly version under download-reporter branch:

https://github.com/rubygems/rubygems/tree/download-reporter

Let me know your thoughts guys.

@luislavena

This comment has been minimized.

Member

luislavena commented Dec 29, 2010

Hello Guys,

Wanted to let you know this has been merged into master (slightly different code, same idea) into master:

db2ce03

Closing this out.

Ryan, thank you for your contribution, patience and initial code for this implementation.

nobu pushed a commit to nobu/rubygems that referenced this pull request Jan 12, 2014

@jfeng5150 jfeng5150 referenced this pull request Oct 31, 2014

Closed

gem install rails issue #1055

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 27, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 27, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 27, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 27, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 27, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 27, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 28, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 28, 2017

MSP-Greg added a commit to MSP-Greg/rubygems that referenced this pull request Dec 30, 2017

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment