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

bugfix crash on missing headway_secs #182

Merged
merged 1 commit into from
Sep 9, 2019
Merged

bugfix crash on missing headway_secs #182

merged 1 commit into from
Sep 9, 2019

Conversation

skyqrose
Copy link
Member

@skyqrose skyqrose commented Sep 6, 2019

Oops. #179 undid handling of a different nil.

) do
nil -> nil
expected_seconds -> Headway.current_headway_spacing(expected_seconds, headway_secs)
case headway_secs do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is just an either or would if-else be more appropriate/ readable?

@arkadyan
Copy link
Contributor

arkadyan commented Sep 6, 2019

Also, seems like this is worth a test case to make sure this is always covered.

@codecov
Copy link

codecov bot commented Sep 9, 2019

Codecov Report

Merging #182 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #182      +/-   ##
=========================================
+ Coverage   95.79%   95.8%   +<.01%     
=========================================
  Files         114     114              
  Lines        2404    2405       +1     
  Branches      244     244              
=========================================
+ Hits         2303    2304       +1     
  Misses         99      99              
  Partials        2       2
Impacted Files Coverage Δ
lib/realtime/vehicle.ex 93.75% <100%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd0cb8f...4564490. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 9, 2019

Codecov Report

Merging #182 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #182      +/-   ##
=========================================
+ Coverage   95.79%   95.8%   +<.01%     
=========================================
  Files         114     114              
  Lines        2404    2405       +1     
  Branches      244     244              
=========================================
+ Hits         2303    2304       +1     
  Misses         99      99              
  Partials        2       2
Impacted Files Coverage Δ
lib/realtime/vehicle.ex 93.75% <100%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd0cb8f...4564490. Read the comment docs.

@skyqrose
Copy link
Member Author

skyqrose commented Sep 9, 2019

Ready for another look

@skyqrose skyqrose merged commit 3ca7267 into master Sep 9, 2019
@skyqrose skyqrose deleted the sqr-bugfix branch September 9, 2019 14:41
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 this pull request may close these issues.

2 participants