json_schema 0.12.4 → 0.12.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json_schema/validator.rb +2 -2
- data/test/json_schema/validator_test.rb +1 -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: d87d815bb6c20fc65a9ad48af9265104bcf9c5c7
|
4
|
+
data.tar.gz: a149e736977aed85958982fd36a2a6e1274e6e3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9edabc7c8136900b13aee695380f0577db4f65ac9a12c79706382133f2b8c125f990fd1ebccd2a4d8965979a55816b8ee8ee4abf3e8608c783cef2184703aca9
|
7
|
+
data.tar.gz: 045903e56013bde3e950f5231cdfd06c3420bd2e99093aef36493eeb260de9c66d316df85e06afb8d8a8d0244ed261cd307cdeee9457d08002b1ba19e2b15ad9
|
@@ -375,8 +375,8 @@ module JsonSchema
|
|
375
375
|
if data.keys.size >= schema.min_properties
|
376
376
|
true
|
377
377
|
else
|
378
|
-
message = %{At least #{schema.
|
379
|
-
(schema.
|
378
|
+
message = %{At least #{schema.min_properties} propert}+
|
379
|
+
(schema.min_properties == 1 ? "y is" : "ies are") +
|
380
380
|
%{ required; #{data.keys.size} }+
|
381
381
|
(data.keys.size == 1 ? "was" : "were") +
|
382
382
|
%{ supplied.}
|
@@ -445,7 +445,7 @@ describe JsonSchema::Validator do
|
|
445
445
|
)
|
446
446
|
data_sample["name"] = "cloudnasium"
|
447
447
|
refute validate
|
448
|
-
assert_includes error_messages, %{At least
|
448
|
+
assert_includes error_messages, %{At least 2 properties are required; 1 was supplied.}
|
449
449
|
assert_includes error_types, :min_properties_failed
|
450
450
|
assert_includes error_data, { "name" => "cloudnasium" }
|
451
451
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ecma-re-validator
|