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

Already on GitHub? Sign in to your account

Add support for progress formatters #8

wants to merge 4 commits into


None yet
2 participants

Rspec style formatters for the output of gem dependant

@grosser grosser commented on the diff Sep 17, 2012

@@ -29,11 +39,16 @@ def self.find(gem, options={})
def self.fetch_all_dependencies(specs_and_sources, options={})
- parallel = (options[:parallel] || 15)
+ parallel = (options[:parallel] || 15) # NOTE: 15? A general rule is about 1-4 threads per CPU core

grosser Sep 17, 2012


Depends on how much blocking is going on, this is not high performance computing :)
Maybe add a little benchmark script if you want another number.


grosser commented Sep 17, 2012

Just throw out the old formatter, progress is nicer :)
Can you do without activesupport, it's such a giant lib ...

print "1/1000 - 0%"
print "\r"
print "2/1000 - 0%"

I'll look around for an alternative to the ActiveSupport. I'm really only using it for the demodulize and the underscore String inflections.

I actually kinda liked the 'dot' formatter. Because of the threading, the percentage formatter gets a little screwy and will actually look like the percentage is going down for a second.

The next formatter is going to be a progress bar. When I add that, I'm also going to add "on_error" and "on_kill_thread" (maybe named differently) hooks for the ProgressFormatter class. But I gotta work out the kinks on the threading.

@grosser grosser closed this Aug 24, 2013

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