epb_view_models 1.0.6 → 1.0.7
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/epb_view_models.rb +1 -1
- data/lib/helper/xml_enums_to_output.rb +12 -12
- data/lib/presenter/rd_sap/report.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: e84293861022176f883ddae06d91d887da347b27ca44d9ed52ad2bb7135d0a53
|
|
4
|
+
data.tar.gz: 0cb5910f39ba8e6272c2427b3255346005e5c5636777334158a457f258807f71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 243a54697bca19151c977439193fa2b2651235f4289a9c853916ba91d9237fed64e67ca4df8cd6351a77bae268ecdcc6b29e8ea55cb0b95887fd202703f33a39
|
|
7
|
+
data.tar.gz: 5e0182f480eef682e2b46c4335161ec1e68e3c3463f95ec5609ee7b6103cd8ba87f682da26c362d120ff3b884a21090fd6c3aa88761aa9c478277e3a96ed2f76
|
data/lib/epb_view_models.rb
CHANGED
|
@@ -331,7 +331,7 @@ module Helper
|
|
|
331
331
|
end
|
|
332
332
|
|
|
333
333
|
def self.construction_age_band_lookup(value, schema_type, report_type)
|
|
334
|
-
types_of_sap_pre17 = %
|
|
334
|
+
types_of_sap_pre17 = %i[
|
|
335
335
|
SAP-Schema-16.3
|
|
336
336
|
SAP-Schema-16.2
|
|
337
337
|
SAP-Schema-16.1
|
|
@@ -346,7 +346,7 @@ module Helper
|
|
|
346
346
|
SAP-Schema-11.0
|
|
347
347
|
].freeze
|
|
348
348
|
|
|
349
|
-
schemes_that_use_not_recorded = %
|
|
349
|
+
schemes_that_use_not_recorded = %i[
|
|
350
350
|
SAP-Schema-16.3
|
|
351
351
|
SAP-Schema-16.2
|
|
352
352
|
SAP-Schema-16.1
|
|
@@ -357,7 +357,7 @@ module Helper
|
|
|
357
357
|
RdSAP-Schema-17.0
|
|
358
358
|
]
|
|
359
359
|
|
|
360
|
-
schemes_that_use_l = %
|
|
360
|
+
schemes_that_use_l = %i[
|
|
361
361
|
SAP-Schema-18.0.0
|
|
362
362
|
SAP-Schema-17.1
|
|
363
363
|
SAP-Schema-17.0
|
|
@@ -368,7 +368,7 @@ module Helper
|
|
|
368
368
|
RdSAP-Schema-17.0
|
|
369
369
|
]
|
|
370
370
|
|
|
371
|
-
schemes_that_use_0 = %
|
|
371
|
+
schemes_that_use_0 = %i[
|
|
372
372
|
SAP-Schema-16.3
|
|
373
373
|
SAP-Schema-16.2
|
|
374
374
|
SAP-Schema-16.1
|
|
@@ -386,7 +386,7 @@ module Helper
|
|
|
386
386
|
RdSAP-Schema-17.0
|
|
387
387
|
]
|
|
388
388
|
|
|
389
|
-
sap_schemas_ni = %
|
|
389
|
+
sap_schemas_ni = %i[
|
|
390
390
|
SAP-Schema-NI-18.0.0
|
|
391
391
|
SAP-Schema-NI-17.4
|
|
392
392
|
SAP-Schema-NI-17.3
|
|
@@ -402,7 +402,7 @@ module Helper
|
|
|
402
402
|
SAP-Schema-NI-13.0
|
|
403
403
|
]
|
|
404
404
|
|
|
405
|
-
rdsap_schemas_ni = %
|
|
405
|
+
rdsap_schemas_ni = %i[
|
|
406
406
|
RdSAP-Schema-NI-20.0.0
|
|
407
407
|
RdSAP-Schema-NI-19.0
|
|
408
408
|
RdSAP-Schema-NI-18.0
|
|
@@ -410,29 +410,29 @@ module Helper
|
|
|
410
410
|
RdSAP-Schema-NI-17.3
|
|
411
411
|
]
|
|
412
412
|
|
|
413
|
-
ni_schemas_pre_12 = %
|
|
413
|
+
ni_schemas_pre_12 = %i[
|
|
414
414
|
SAP-Schema-NI-12.0
|
|
415
415
|
SAP-Schema-NI-11.2
|
|
416
416
|
]
|
|
417
417
|
|
|
418
418
|
if value == "K" && rdsap_schemas_ni.include?(schema_type)
|
|
419
|
-
return CONSTRUCTION_AGE_BAND_NI["K-RdSAP-NI"]
|
|
419
|
+
return CONSTRUCTION_AGE_BAND_NI["K-RdSAP-NI"] || value
|
|
420
420
|
end
|
|
421
421
|
|
|
422
422
|
if value == "K" && sap_schemas_ni.include?(schema_type)
|
|
423
|
-
return CONSTRUCTION_AGE_BAND_NI["K-SAP-NI"]
|
|
423
|
+
return CONSTRUCTION_AGE_BAND_NI["K-SAP-NI"] || value
|
|
424
424
|
end
|
|
425
425
|
|
|
426
426
|
if ni_schemas_pre_12.include?(schema_type)
|
|
427
427
|
key = (value == "0" ? value : "#{value}-12.0")
|
|
428
|
-
return CONSTRUCTION_AGE_BAND_NI[key]
|
|
428
|
+
return CONSTRUCTION_AGE_BAND_NI[key] || value
|
|
429
429
|
end
|
|
430
430
|
|
|
431
431
|
if sap_schemas_ni.include?(schema_type) || rdsap_schemas_ni.include?(schema_type)
|
|
432
|
-
return CONSTRUCTION_AGE_BAND_NI[value]
|
|
432
|
+
return CONSTRUCTION_AGE_BAND_NI[value] || value
|
|
433
433
|
end
|
|
434
434
|
|
|
435
|
-
if value == "K" && schema_type == "SAP-Schema-12.0" && is_rdsap(report_type)
|
|
435
|
+
if value == "K" && schema_type == :"SAP-Schema-12.0" && is_rdsap(report_type)
|
|
436
436
|
return CONSTRUCTION_AGE_BAND["K-12.0"]
|
|
437
437
|
end
|
|
438
438
|
|
|
@@ -31,7 +31,7 @@ module Presenter
|
|
|
31
31
|
co2_emissions_potential: @view_model.potential_carbon_emission,
|
|
32
32
|
construction_age_band:
|
|
33
33
|
Helper::XmlEnumsToOutput.construction_age_band_lookup(
|
|
34
|
-
@view_model.
|
|
34
|
+
@view_model.main_dwelling_construction_age_band_or_year,
|
|
35
35
|
@schema_type,
|
|
36
36
|
@view_model.report_type,
|
|
37
37
|
),
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: epb_view_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- MHCLG Energy Performance of Buildings
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-09-
|
|
11
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|