epb_view_models 2.0.1 → 2.0.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/lib/epb_view_models.rb +1 -1
- data/lib/presenter/dec/xml_summary.rb +1 -1
- data/lib/presenter/xml/parser.rb +2 -2
- data/lib/presenter/xsd.rb +1 -1
- data/lib/view_model/dec_summary_wrapper.rb +1 -1
- data/lib/view_model/factory.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: eba0fe6457b3cf5f495a525078f3133925a4912aeb79d4bcc6cc51198ec6dde4
|
4
|
+
data.tar.gz: 2cd6472f1cee4ccfcb204011e3934fea2869a1ee05ac92fc90134107a974cc2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb77bd68775de7d39a2b6392b7db48a3b6270368538666ba01e28621f23575a12f2021815a10569fa52c24b250644ce90a4d20f28e97dd76dace2a163de2235b
|
7
|
+
data.tar.gz: b307a6b3678c5de25174be0dce9bd0ff86f617127a1954ace9c218b0773e4bd742d14379fb07a228483fcb1e482f384d23c4f821d8705849f20a435951c568f6
|
data/lib/epb_view_models.rb
CHANGED
@@ -32,7 +32,7 @@ module Presenter
|
|
32
32
|
xml = ERB.new(get_template).result_with_hash dec_data
|
33
33
|
|
34
34
|
if !@view_model.respond_to?(:dec_status) || @view_model.dec_status.nil?
|
35
|
-
doc = Nokogiri.XML(xml)
|
35
|
+
doc = Nokogiri.XML(xml) { |config| config.huge.strict }
|
36
36
|
doc.at("DEC-Status").remove
|
37
37
|
xml = doc.to_xml
|
38
38
|
end
|
data/lib/presenter/xml/parser.rb
CHANGED
@@ -22,7 +22,7 @@ module Presenter
|
|
22
22
|
preferred_keys: @preferred_keys,
|
23
23
|
list_nodes: @list_nodes,
|
24
24
|
rootless_list_nodes: @rootless_list_nodes
|
25
|
-
@sax_parser ||= Nokogiri::XML::SAX::Parser.new
|
25
|
+
@sax_parser ||= Nokogiri::XML::SAX::Parser.new(@assessment_document) { |config| config.huge.strict }
|
26
26
|
end
|
27
27
|
|
28
28
|
private
|
@@ -40,7 +40,7 @@ module Presenter
|
|
40
40
|
@preferred_keys = preferred_keys
|
41
41
|
@list_nodes = list_nodes
|
42
42
|
@rootless_list_nodes = rootless_list_nodes
|
43
|
-
super()
|
43
|
+
super() { |config| config.huge.strict }
|
44
44
|
end
|
45
45
|
|
46
46
|
def start_document
|
data/lib/presenter/xsd.rb
CHANGED
@@ -12,7 +12,7 @@ module ViewModel
|
|
12
12
|
schema_type = schema_type.to_sym
|
13
13
|
|
14
14
|
# FIXME: For some reasons the XML is received as a string and not a Nokogiri Document (like other wrappers)
|
15
|
-
xml_doc = Nokogiri.XML(xml).remove_namespaces!
|
15
|
+
xml_doc = Nokogiri.XML(xml, nil, nil, Nokogiri::XML::ParseOptions.new.huge.strict).remove_namespaces!
|
16
16
|
@view_model = build_view_model(xml_doc, schema_type)
|
17
17
|
@xml_summary = Presenter::Dec::XmlSummary.new(view_model)
|
18
18
|
end
|
data/lib/view_model/factory.rb
CHANGED
@@ -65,7 +65,7 @@ module ViewModel
|
|
65
65
|
# Hack to use symbols, we need to update all callers to use symbols instead
|
66
66
|
schema_type = schema_type.to_sym
|
67
67
|
|
68
|
-
xml_doc = Nokogiri.XML(xml).remove_namespaces!
|
68
|
+
xml_doc = Nokogiri.XML(xml, nil, nil, Nokogiri::XML::ParseOptions.new.huge.strict).remove_namespaces!
|
69
69
|
|
70
70
|
if TYPES_OF_CEPC.include?(schema_type)
|
71
71
|
filtered_results =
|
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: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DLUHC Energy Performance of Buildings
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|