cqm-reports 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qrda-import/base-importers/section_importer.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6af15ff075a9533c61c844f95c5adc741e999dec
|
4
|
+
data.tar.gz: 2cf3f0aeb6c3e1744e5e2f8a45a8d0e90a1ab5a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4ab0c6c763b00dfa1c7985110969e6262ecc977d9a6509ca64c82e3979e6fd6e27f1bd888ae05ac5eaeecf600645a7cfea95d7013f8a5b01d1b85e865d80f52
|
7
|
+
data.tar.gz: fdfe64bbfb95f37e11dae78380147076daeb9b155a05eadb663c063191ffb9155390af0ae32a6f9643d87d852d605a87cb6fd48c4dc1cf0c9f631a7f929c4538
|
@@ -92,7 +92,9 @@ module QRDA
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def extract_interval(parent_element, interval_xpath)
|
95
|
-
|
95
|
+
# nil if the time interval does not exist
|
96
|
+
return nil unless time_interval_exists(parent_element, interval_xpath)
|
97
|
+
|
96
98
|
if parent_element.at_xpath("#{interval_xpath}/@value")
|
97
99
|
low_time = DateTime.parse(parent_element.at_xpath(interval_xpath)['value'])
|
98
100
|
high_time = DateTime.parse(parent_element.at_xpath(interval_xpath)['value'])
|
@@ -129,6 +131,14 @@ module QRDA
|
|
129
131
|
QDM::Interval.new(low_time, high_time).shift_dates(0)
|
130
132
|
end
|
131
133
|
|
134
|
+
def time_interval_exists(parent_element, interval_xpath)
|
135
|
+
# false if the time interval does not exist
|
136
|
+
return false unless parent_element.at_xpath(interval_xpath)
|
137
|
+
# false if the time element exists but has a null Flavor
|
138
|
+
return false if parent_element.at_xpath(interval_xpath)['nullFlavor']
|
139
|
+
true
|
140
|
+
end
|
141
|
+
|
132
142
|
def extract_time(parent_element, datetime_xpath)
|
133
143
|
DateTime.parse(parent_element.at_xpath(datetime_xpath)['value']) if parent_element.at_xpath("#{datetime_xpath}/@value")
|
134
144
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cqm-reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The MITRE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cqm-models
|