en14960 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/en14960/calculators/slide_calculator.rb +4 -4
- data/lib/en14960/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3220910f74f8d578db2a99f5900e5d4bdc4aa800b54098ea1c69a26d1de72f04
|
4
|
+
data.tar.gz: 22add5465f6d3769afbc8863976626f1b2b162b58a7474246214329871110197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63ec6ca760d7e4c6503e6e867ec8c1ae01781713e5e0fdb3757f119d93b33ebeb4ca3f172c492b4d1bd9c9c9b861dfb4f06ece491f3320468487e1dce5f35eb4
|
7
|
+
data.tar.gz: eb1ffc995d295e01457a6aa81006219bfd5fc2ca3c9714fd0936d83f952acf247c95ff1b931ea1316177ee2a71e2cd6ea7a9b65f094c726b4f93d1bedbae85b2
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.4.1] - 2025-08-16
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
- Fixed TypeError when `calculate_wall_height` is called with platform_height < 0.6m
|
14
|
+
- Method now correctly returns Float 0.0 instead of Integer 0
|
15
|
+
- Added test coverage for the "no walls required" edge case
|
16
|
+
|
17
|
+
## [0.4.0] - Previous Release
|
18
|
+
|
10
19
|
### Added
|
11
20
|
- Full Sorbet type signatures for all public APIs
|
12
21
|
- Runtime type checking with sorbet-runtime
|
@@ -33,7 +33,7 @@ module EN14960
|
|
33
33
|
# highest platform (measured from ground level), with an absolute minimum of 300mm
|
34
34
|
# Line 936: If a stop-wall is installed at the runout's end, an additional
|
35
35
|
# 50cm must be added to the total runout length
|
36
|
-
return CalculatorResponse.new(value: 0, value_suffix: "m", breakdown: []) if platform_height <= 0
|
36
|
+
return CalculatorResponse.new(value: 0.0, value_suffix: "m", breakdown: []) if platform_height <= 0
|
37
37
|
|
38
38
|
# Get constants
|
39
39
|
height_ratio = Constants::RUNOUT_CALCULATION_CONSTANTS[:platform_height_ratio]
|
@@ -113,7 +113,7 @@ module EN14960
|
|
113
113
|
sig { params(platform_height: Float, user_height: Float, has_permanent_roof: T.nilable(T::Boolean)).returns(CalculatorResponse) }
|
114
114
|
def calculate_wall_height_requirements(platform_height, user_height, has_permanent_roof = nil)
|
115
115
|
# EN 14960-1:2019 Section 4.2.9 (Lines 854-887) - Containment requirements
|
116
|
-
return CalculatorResponse.new(value: 0, value_suffix: "m", breakdown: []) if platform_height <= 0 || user_height <= 0
|
116
|
+
return CalculatorResponse.new(value: 0.0, value_suffix: "m", breakdown: []) if platform_height <= 0 || user_height <= 0
|
117
117
|
|
118
118
|
# Get requirement details and breakdown
|
119
119
|
requirement_details = get_wall_height_requirement_details(platform_height, user_height, has_permanent_roof)
|
@@ -261,14 +261,14 @@ module EN14960
|
|
261
261
|
|
262
262
|
case platform_height
|
263
263
|
when 0..thresholds[:no_walls_required]
|
264
|
-
0 # No walls required
|
264
|
+
0.0 # No walls required
|
265
265
|
when (thresholds[:no_walls_required]..thresholds[:basic_walls])
|
266
266
|
user_height # Equal to user height
|
267
267
|
when (thresholds[:basic_walls]..thresholds[:enhanced_walls]),
|
268
268
|
(thresholds[:enhanced_walls]..thresholds[:max_safe_height])
|
269
269
|
(user_height * enhanced_multiplier).round(2) # 1.25× user height
|
270
270
|
else
|
271
|
-
0 # Exceeds safe limits
|
271
|
+
0.0 # Exceeds safe limits
|
272
272
|
end
|
273
273
|
end
|
274
274
|
end
|
data/lib/en14960/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: en14960
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chobble.com
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|