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

Compatibility with non-tty devices #10

Merged
merged 2 commits into from Dec 16, 2011

Conversation

Projects
None yet
3 participants
@jim
Contributor

jim commented Dec 16, 2011

We have several scripts we use during application development that monitor long running processes with ruby-progressbar. We also have these scripts running in automated environments (such as CI), and the output in these situations is very noisy. We could alter the scripts, but I think it would be nicer if this library could gracefully handle these situations.

This patch adds a baseline behavior in non-tty environments so that things like log files aren't filled with every frame of the progress bar animation.

jim added some commits Dec 16, 2011

Detect whether the output device is a terminal, and use a simplified …
…output strategy when it is not.

Use IO.tty? to make this determination.

This is really only useful for some ProgressBars. ReverseProgressBar and using
file_transfer_mode don't make much sense when writing to a non-terminal device.

nex3 added a commit that referenced this pull request Dec 16, 2011

Merge pull request #10 from jim/optional-tty
Compatibility with non-tty devices

@nex3 nex3 merged commit 4283f72 into jfelchner:master Dec 16, 2011

@jfelchner

This comment has been minimized.

Show comment
Hide comment
@jfelchner

jfelchner Jul 30, 2012

Owner

@jim I'd love to get this ported over to the rewrite on the development branch. Is there any way you could let me know what the specifications are or, better yet, create a pull request with some failing specs?

Any assistance you could give me would be fantastic. And thanks again for the contribution.

Owner

jfelchner commented Jul 30, 2012

@jim I'd love to get this ported over to the rewrite on the development branch. Is there any way you could let me know what the specifications are or, better yet, create a pull request with some failing specs?

Any assistance you could give me would be fantastic. And thanks again for the contribution.

@jim

This comment has been minimized.

Show comment
Hide comment
@jim

jim Jul 31, 2012

Contributor

@jfelchner I can try to write some failing specs for you (and hopefully even some code that fixes them).

Contributor

jim commented Jul 31, 2012

@jfelchner I can try to write some failing specs for you (and hopefully even some code that fixes them).

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