committee 1.5.1 → 1.5.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/committee/response_validator.rb +4 -0
- 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: d81f47d2d3b01e41ad680cfd912940ef3f40f66e
|
|
4
|
+
data.tar.gz: 1d71cb79efc366f9d270290924ff5d8b61f38699
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9be392115770ca98523c10ba45e2a56bd16a92ffc3f29782af386d27e1809e12c78ea00eace5b49f7a34048ee3790394e481a1c6eb4390bb15c65874caccd646
|
|
7
|
+
data.tar.gz: 5947b7124d67460a576d384807f61d4d10f79bab30eb1e21e06f71abf78c5c9e6037674b84e5e210a872ae25a31eb54ca83c5899299db40bbd807906068cc4e9
|
|
@@ -18,9 +18,13 @@ module Committee
|
|
|
18
18
|
if !data.is_a?(Array)
|
|
19
19
|
raise InvalidResponse, "List endpoints must return an array of objects."
|
|
20
20
|
end
|
|
21
|
+
|
|
21
22
|
# only consider the first object during the validation from here on
|
|
22
23
|
# (but only in cases where `targetSchema` is not set)
|
|
23
24
|
data = data[0]
|
|
25
|
+
|
|
26
|
+
# if the array was empty, allow it through
|
|
27
|
+
return if data == nil
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
if !@validator.validate(data)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: committee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brandur
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-10-
|
|
12
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: json_schema
|