Compatibility with non-tty devices#10
Merged
Merged
Conversation
…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
Compatibility with non-tty devices
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. |
Contributor
Author
|
@jfelchner I can try to write some failing specs for you (and hopefully even some code that fixes them). |
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.