res 1.2.22 → 1.2.23

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
  SHA1:
3
- metadata.gz: 3d2dc809988e475d4c6926be6e7f4c29bc21847d
4
- data.tar.gz: 8c257d8ed722a345f392638383faef2dc1a6c9dd
3
+ metadata.gz: 9de02365114062aa2791439d5b84cfc723c1c27d
4
+ data.tar.gz: 4ec9a6ee26700906dab43cf22c439f25b5da6ab1
5
5
  SHA512:
6
- metadata.gz: e7cc0c951272ac89569770f78ed0d33e11de5babcd987e34598dafeef736ae03ad058d863a7e206c53438950cac0f23eb958f148cae0a551280c73a9f4d3ca81
7
- data.tar.gz: 78484f4592569234b1c2ddae78cd36c7e067fd91b77c6190f71c2afd2928c6b179c827e0dc2697e4afb143d59b3c18c0ecba7d2101ac8ccf7738fb387897bd6e
6
+ metadata.gz: 7449287f8e68b1b68f937a1504af71eb9d6cc4defb3bd92e0cad3eeaddc441b3028ded7169f1b48dc5fef1c399f910fd3146678933b25d2070f657e0f3a484f8
7
+ data.tar.gz: c0c09be97e2ba929f83761f17611ed4a91e9b23dc5b02304ca1f07fc882591bc8ffd271c34bd309bf72650ec0a81b0ca25fec5886838f8b91dbe167b2f728336
@@ -83,7 +83,7 @@ module Res
83
83
  # Recursive function for retrieving values in nodes
84
84
  def self.find_values(nodes)
85
85
  value_hashes = []
86
- nodes.each do |n|
86
+ nodes.compact.each do |n|
87
87
  if n[:values]
88
88
  value_hashes << n[:values]
89
89
  end
@@ -97,7 +97,7 @@ module Res
97
97
  # Recursive function for retrieving test nodes
98
98
  def self.find_tests(nodes)
99
99
  tests = []
100
- nodes.each do |n|
100
+ nodes.compact.each do |n|
101
101
  if IR.is_a_test?(n)
102
102
  tests << n
103
103
  elsif n[:children]
@@ -47,16 +47,18 @@ module Res
47
47
  if node.value == 'testcase'
48
48
  suite[index] = Hash.new
49
49
  suite[index] = attach_cases(node)
50
- else
51
- suite[index] = Hash.new
52
- suite[index]['type'] = "JUnit::#{node.value}"
53
- suite[index]['name'] = node.attributes[:name]
54
- suite[index]['classname'] = node.attributes[:classname] if suite[index]['classname'] != nil
55
- suite[index]['children'] = attach_suite(node)
50
+ else
51
+ if node.respond_to?(:attributes) and node.respond_to?(:value)
52
+ suite[index] = Hash.new
53
+ suite[index]['type'] = "JUnit::#{node.value}"
54
+ suite[index]['name'] = node.attributes[:name]
55
+ suite[index]['classname'] = node.attributes[:classname] if suite[index]['classname'] != nil
56
+ suite[index]['children'] = attach_suite(node)
57
+ end
56
58
  end # if
57
59
  index += 1
58
60
  end # each
59
- suite
61
+ suite.compact
60
62
  end # def attach_suite
61
63
  end # class JUnit
62
64
  end # class Parsers
@@ -1,3 +1,3 @@
1
1
  module Res
2
- VERSION = '1.2.22'
2
+ VERSION = '1.2.23'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: res
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.22
4
+ version: 1.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - BBC
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-14 00:00:00.000000000 Z
13
+ date: 2017-08-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json