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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a499cbd58c45486a20fa936b0b24993b8b3a8725ddf887ba5cc6c60f1acde44
4
- data.tar.gz: 0f43ff3d54951b01bbb9bf129886c5075e1ff89948b28daf7184b44eb319dc18
3
+ metadata.gz: bd8d12842a3b54fa5bcdd2c2386a23aac0a1c48c56ca71499355890ff213088e
4
+ data.tar.gz: 4b0b49a18dc2f69ca5543c836f7651c8f080d40bfdc42ade1542ade68dc7828c
5
5
  SHA512:
6
- metadata.gz: ceabc28647ef710885f3782080b965d6ac84f8b2e2acccdd099a5b59f1c62945d23ddad5aa99ada254cf6cb973d9a0a235beba1adb8e502d5200eabf7fa56620
7
- data.tar.gz: 30d7d252d232df2ecd9d878608a810d9568389781ffd00a24d5ed73449c585ad3213746de17dac741e1b37a72ada20d655e15aa34ecc7d53c026be9270ea8dc0
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
- # Add roof status if known
154
- if !has_permanent_roof.nil?
155
- breakdown << if has_permanent_roof
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
- else
158
- ["Permanent roof", "Not fitted "]
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: "Walls must be at least #{required_height}m (1.25× user height)",
173
+ text: text,
164
174
  breakdown: breakdown
165
175
  }
166
176
  when (thresholds[:enhanced_walls]..thresholds[:max_safe_height])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EN14960
4
- VERSION = "0.1.8"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.8
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-07-31 00:00:00.000000000 Z
11
+ date: 2025-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler