Fix EN14960 wall height calculation and update related tests in SafetyStandardsController#213
Merged
stefan-burke merged 4 commits intomainfrom Aug 18, 2025
Merged
Conversation
…ving workaround code Removed the workaround for EN14960 v0.4.0 bug in build_wall_height_result method. The method now directly calls EN14960.calculate_wall_height without rescue block, simplifying the code and improving maintainability. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
… of Float 0.0 Workaround for EN14960 v0.4.0 bug where it returns Integer 0 instead of Float 0.0 when platform_height < 0.6. Added rescue for TypeError to return expected CalculatorResponse for no walls required scenario. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
…pdate tests The workaround for the EN14960 v0.4.0 bug in build_wall_height_result was removed as the library was updated to v0.4.2 which fixes the issue. Corresponding test expectations were updated to reflect the new message text for no walls required. Also updated Gemfile.lock to use en14960 v0.4.2. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
build_wall_height_resultmethodEN14960.calculate_wall_heighten14960gem version from 0.4.0 to 0.4.2Changes
SafetyStandardsController
TypeErrorcaused by EN14960 returning Integer 0 instead of Float 0.0build_wall_height_resultmethod to directly return the result ofEN14960.calculate_wall_heightTest Helpers
Dependencies
en14960gem from version 0.4.0 to 0.4.2Test plan
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/5aad34d6-9e74-4436-9cd6-2f05ca0f59e0