goserv-util 0.0.1.alpha.4 → 0.0.1.alpha.5
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/goserv-util/request.rb +7 -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: 7e319522094cb613184fec6ecc40a2970e7c126c
|
|
4
|
+
data.tar.gz: bdbb38f250b71b66242fd09272a5a31f6617c852
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8829869627289f4e7c56128e1fed8ca39ee531a7ddabe779c4f6258db070582a52d32e594a662a5af5c9add220dbca4b1f3ecdf757366db8a494472d6fb4b651
|
|
7
|
+
data.tar.gz: 5872d062aa48f5b19ad97c7c1ceeaf1725a81a810c1fa21b4ba67b3818b62a45dcaec407829c8b95fbff889fa80bfa9e54ffc0c05931ea361aa6bcfb04d0660b
|
data/lib/goserv-util/request.rb
CHANGED
|
@@ -5,6 +5,12 @@ module GoUtil
|
|
|
5
5
|
module Request
|
|
6
6
|
# Error for schema validation problems.
|
|
7
7
|
class SchemaValidationError < StandardError
|
|
8
|
+
def initialize(violations)
|
|
9
|
+
@full_messages = violations
|
|
10
|
+
super
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attr_reader :full_messages
|
|
8
14
|
end
|
|
9
15
|
|
|
10
16
|
# provides prehandling methods.
|
|
@@ -41,7 +47,7 @@ module GoUtil
|
|
|
41
47
|
|
|
42
48
|
unless @schema.nil?
|
|
43
49
|
errs = JSON::Validator.fully_validate(@schema, json)
|
|
44
|
-
raise(SchemaValidationError, errs) unless errs.empty?
|
|
50
|
+
raise(SchemaValidationError.new(errs), errs) unless errs.empty?
|
|
45
51
|
end
|
|
46
52
|
|
|
47
53
|
json
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: goserv-util
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.1.alpha.
|
|
4
|
+
version: 0.0.1.alpha.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben C Lewis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-04-
|
|
11
|
+
date: 2017-04-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|