committee 1.5.1 → 1.5.2

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: b5866c6d0e099206a30958c836ad4b49473f68cd
4
- data.tar.gz: d05049dcb5e2970c4451ce7e163790fb8199e95e
3
+ metadata.gz: d81f47d2d3b01e41ad680cfd912940ef3f40f66e
4
+ data.tar.gz: 1d71cb79efc366f9d270290924ff5d8b61f38699
5
5
  SHA512:
6
- metadata.gz: 0c4c4c60032ef9e6b7874e9078f6be8a6d3aee3d32949591abf7b4569057cbd4498c55b1d8d4a10ccd9d0970e7c422dc26933b171bb4efb5a72a9635b90a0247
7
- data.tar.gz: 20acabc46e24f3eb85dc8b3dcce37794988a0dd559a534c46b2be17bb8861051f1927914df7f6b28bb4271b813a7228f69c03d9051baa0ae724e307d8dce697a
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.1
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-08 00:00:00.000000000 Z
12
+ date: 2014-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_schema