en14960 0.1.8 → 0.2.0
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/lib/en14960/calculators/slide_calculator.rb +21 -11
- 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: bd8d12842a3b54fa5bcdd2c2386a23aac0a1c48c56ca71499355890ff213088e
|
4
|
+
data.tar.gz: 4b0b49a18dc2f69ca5543c836f7651c8f080d40bfdc42ade1542ade68dc7828c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27854d031bda2d5d2492848f23b8ca840911ef78656f334095c4fc3d9592258178120f9fdaa302a37279e0678b20caa12eb5ff7cb58d43c5856ad4129e2e697e
|
7
|
+
data.tar.gz: 9b723fb971121fd27e4fb483196e1ae5146739b24fcbb62d23c39e724eecd2ab4bb92420f003536a2b7759310ddc83dc8be87c980b18fc24a12115424e77783b
|
@@ -144,23 +144,33 @@ module EN14960
|
|
144
144
|
}
|
145
145
|
when (thresholds[:basic_walls]..thresholds[:enhanced_walls])
|
146
146
|
required_height = (user_height * enhanced_multiplier).round(2)
|
147
|
-
breakdown = [
|
148
|
-
["Height range", "3.0m - 6.0m"],
|
149
|
-
["Calculation", "#{user_height}m × #{enhanced_multiplier} = #{required_height}m"],
|
150
|
-
["Alternative requirement", "Permanent roof (can replace heightened walls)"]
|
151
|
-
]
|
152
147
|
|
153
|
-
#
|
154
|
-
if
|
155
|
-
breakdown
|
148
|
+
# Skip wall height requirement message if permanent roof is present
|
149
|
+
if has_permanent_roof
|
150
|
+
breakdown = [
|
151
|
+
["Height range", "3.0m - 6.0m"],
|
152
|
+
["Wall requirement", "#{required_height}m (1.25× user height) - skipped due to permanent roof"],
|
153
|
+
["Alternative requirement", "Permanent roof (can replace heightened walls)"],
|
156
154
|
["Permanent roof", "Fitted ✓"]
|
157
|
-
|
158
|
-
|
155
|
+
]
|
156
|
+
text = "Permanent roof fitted - wall height requirement satisfied"
|
157
|
+
else
|
158
|
+
breakdown = [
|
159
|
+
["Height range", "3.0m - 6.0m"],
|
160
|
+
["Calculation", "#{user_height}m × #{enhanced_multiplier} = #{required_height}m"],
|
161
|
+
["Alternative requirement", "Permanent roof (can replace heightened walls)"]
|
162
|
+
]
|
163
|
+
|
164
|
+
# Add roof status if known
|
165
|
+
if !has_permanent_roof.nil?
|
166
|
+
breakdown << ["Permanent roof", "Not fitted ✗"]
|
159
167
|
end
|
168
|
+
|
169
|
+
text = "Walls must be at least #{required_height}m (1.25× user height)"
|
160
170
|
end
|
161
171
|
|
162
172
|
{
|
163
|
-
text:
|
173
|
+
text: text,
|
164
174
|
breakdown: breakdown
|
165
175
|
}
|
166
176
|
when (thresholds[:enhanced_walls]..thresholds[:max_safe_height])
|
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
|
+
version: 0.2.0
|
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-
|
11
|
+
date: 2025-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|