soaspec 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 802d57b54c80ef5ecbae8ebca1a2c0b259b17732
4
- data.tar.gz: 236f51f5c4333e62021bf622edee84cd0cfd7bc9
3
+ metadata.gz: 31e59104f7fe53eab3382cd0e569c6372ceac6f2
4
+ data.tar.gz: bd767b72d3ec217ac2d57416660e5fd848cf7b91
5
5
  SHA512:
6
- metadata.gz: a9e31773f47eb0ecf13ffe57f686c9dd35d5d725aa33d9cd2614f5ce167222390dce14a94bef755da48443fa8e5df4c47c397c9c9d4f7b1d8ea7880ce2b76934
7
- data.tar.gz: 9446bf7a31afba4f05ec9b5b7971f734d3692e1d63d3d67522068e52cf8d52d53ebc6b523f80b98d948f74293283223cace6067652f492b47774fb7bec2e9636
6
+ metadata.gz: 77813ae5339c6ad088f89896d5b67fd63e94b4c5d1c4a979632011dcce5a71c3d87d642d1e560196f65da22279ceac443d9e59a7fac436fabb5720af14cdb1aa
7
+ data.tar.gz: 1ecd9df640c74a646ed9248f24889c2ae41e681fbcb420e154c4aed6344276c2b1acc4778e280bf086e2858e1978b8a4193e495243e3856f9dea9ba325b9d557
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.0.17 / 2018-1-25
2
+ * Fixes
3
+ * Updated hash search so that it handles Array"
4
+
1
5
  Version 0.0.16 / 2018-1-23
2
6
  * Fixes
3
7
  * Corrected logic of auto convert to hash. Previous version did not handle test specific values correctly
@@ -17,7 +17,8 @@ class Hash
17
17
  result = []
18
18
  result << self[key]
19
19
  self.values.each do |hash_value|
20
- values = [hash_value] unless hash_value.is_a? Array
20
+ next if hash_value.is_a? Array
21
+ values = [hash_value]
21
22
  values.each do |value|
22
23
  result += value.find_all_values_for(key) if value.is_a? Hash
23
24
  end
@@ -51,20 +52,20 @@ class Hash
51
52
  # @param [Key] Key within hash to iterate through
52
53
  def each_if_not_null(key)
53
54
  case key.class.to_s
54
- when 'String'
55
- if self[key]
56
- self[key].each do |list_item|
57
- yield(list_item)
58
- end
55
+ when 'String'
56
+ if self[key]
57
+ self[key].each do |list_item|
58
+ yield(list_item)
59
59
  end
60
- when 'Array'
61
- if self[key[0]]
62
- if self[key[0]][key[1]]
63
- self[key[0]][key[1]].each do |list_item|
64
- yield(list_item)
65
- end
60
+ end
61
+ when 'Array', 'Hash'
62
+ if self[key[0]]
63
+ if self[key[0]][key[1]]
64
+ self[key[0]][key[1]].each do |list_item|
65
+ yield(list_item)
66
66
  end
67
67
  end
68
+ end
68
69
  end
69
70
  end
70
71
 
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.16'
2
+ VERSION = '0.0.17'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler