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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 037aaca9762cc3546aaf316c2dcf1e62b06c7534be072af78c459d8a8ae75d14
4
- data.tar.gz: 8d021549356ef1996016f03aa3ecb06fc852b3b72f90d41b55690d07117a5f0b
3
+ metadata.gz: eba0fe6457b3cf5f495a525078f3133925a4912aeb79d4bcc6cc51198ec6dde4
4
+ data.tar.gz: 2cd6472f1cee4ccfcb204011e3934fea2869a1ee05ac92fc90134107a974cc2f
5
5
  SHA512:
6
- metadata.gz: 618baf4543be279a2cf0d15055a18fb0c1576404c318b9374739e9295f2254056e1c271499699500749d399507217d41f2ba4c9cdb3814f0ffb307a20ce9bfb9
7
- data.tar.gz: 72529aa32e0e66dac054f7570b72d5b4acad96e26db41aa1ee1961807581411c66cb807b973085c8428bc18fc71710faf5c2c05a9ee045944cbc3ef3d5d5bfbb
6
+ metadata.gz: eb77bd68775de7d39a2b6392b7db48a3b6270368538666ba01e28621f23575a12f2021815a10569fa52c24b250644ce90a4d20f28e97dd76dace2a163de2235b
7
+ data.tar.gz: b307a6b3678c5de25174be0dce9bd0ff86f617127a1954ace9c218b0773e4bd742d14379fb07a228483fcb1e482f384d23c4f821d8705849f20a435951c568f6
@@ -5,7 +5,7 @@ loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
5
5
  loader.setup
6
6
 
7
7
  module EpbViewModels
8
- VERSION = "2.0.1"
8
+ VERSION = "2.0.2"
9
9
  end
10
10
 
11
11
  # Monkey patching to avoid using ActiveRecord::Type::Boolean.new.cast
@@ -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
@@ -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 @assessment_document
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
@@ -54,7 +54,7 @@ module Presenter
54
54
  end
55
55
 
56
56
  def read_xml(file_name, node_name, node_hash)
57
- doc = Nokogiri.XML(File.read(file_name))
57
+ doc = Nokogiri.XML(File.read(file_name)) { |config| config.huge.strict }
58
58
  enums_hash = {}
59
59
 
60
60
  doc.xpath(node_name).each do |node|
@@ -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
@@ -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.1
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-13 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri