[Rubygems-developers] RemoteFetcher and progress reporting
luislavena at gmail.com
Wed Dec 30 17:04:33 EST 2009
I've been looking over remote_fetcher.rb code to find a way to perform
HTTP and HTTPS request with visual feedback.
You may wonder why that?
Even with todays internet connection speeds, sometimes "feels like"
installing gems like rails takes ages.
Rails gem, itself without dependencies weight 1.2MB. Add to that
1.69MB from Active* and Action* gems.
So, no visual feedback of what is going on.
There is an old but working "progress bar" implementation for Ruby:
Which I used to provide download feedback for RubyInstaller building
recipes, extending open-uri:
When trying to make a similar approach work for RemoteFetcher, found
that due the way is being implemented, the complete request is
processed, not being able to perform a chunk'ed read of the body of
the request, and thus, not being able to provide visual feedback about
Change those methods will require some serious refactoring.
Has anyone explored creating a rubygems plugin for this before? Just
wanted to avoid reinventing the wheel and collaborate with others.
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
More information about the Rubygems-developers