-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update Rails and JS dependencies #266
Conversation
ijdickinson
commented
Sep 29, 2020
- Fix sundry Rubocop warnings
- Update Ruby dependencies
- Update Javascript dependencies
- Update version and changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit confused by the 0.0 => 0.0001 change
Looks good otherwise.
app/presenters/landing_state.rb
Outdated
@@ -75,7 +75,7 @@ def to_value(val) | |||
def format_percentage(change) | |||
if change == 'unknown' | |||
change | |||
elsif change == 0.0 | |||
elsif change.abs <= 0.0001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this change for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop was whining that exact comparisons (==
) on floating point numbers are unreliable. While that is true for floating point in general, it shouldn't be true for 0.0
. So a better change might have been to rubocop:disable
that check on that line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
@@ -75,7 +75,7 @@ def to_value(val) | |||
def format_percentage(change) | |||
if change == 'unknown' | |||
change | |||
elsif change == 0.0 | |||
elsif change.zero? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄