Skip to content
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

Documentation of progress percent does not match behaviour. #45

Closed
DivXZero opened this issue Nov 8, 2018 · 1 comment · Fixed by #107
Closed

Documentation of progress percent does not match behaviour. #45

DivXZero opened this issue Nov 8, 2018 · 1 comment · Fixed by #107

Comments

@DivXZero
Copy link

DivXZero commented Nov 8, 2018

The Progress component displays "100.0%" no matter what value is passed to the tick method, both of these examples were taken from the documentation and neither one displays properly:

CLI::UI::Progress.progress do |bar|
  20.times do
    sleep 1
    bar.tick(percent: 5)
  end
end
CLI::UI::Progress.progress do |bar|
  tick_amount = 5
  index = 0
  20.times do
    sleep 1
    index += 1
    bar.tick(set_percent: index * tick_amount)
  end
end
@DivXZero DivXZero closed this as completed Nov 8, 2018
@lugray
Copy link
Contributor

lugray commented Nov 9, 2018

I assume you closed this because you discovered that the problem was that percentages should be passed in as 0.05 rather than 5. That said, the documentation is indeed as you have it, and that should be fixed.

@lugray lugray reopened this Nov 9, 2018
@lugray lugray changed the title Explicitly setting Progress value always displays 100% Documentation of progress percent does not match behaviour. Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants