json_schema 0.13.5 → 0.13.6
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/error.rb +5 -1
- data/test/json_schema/error_test.rb +18 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad178e92388beab0aa3fb7711c8302cc2b82e28d
|
4
|
+
data.tar.gz: 4b49ae2eb3984d02e2fe22d2cf64850cf0ca1a47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19a0ecfe134501cd724985385611a5bb9b04613f6cc25f81f5163fb228c757555bfb363fe1dacae7e7a420235e46d6034eed0c5177d29ffd40c2f9b0c382db1d
|
7
|
+
data.tar.gz: 28db95313452012277f5ce37426e15f04e342c30c7c637f72dc58763a3d6f66e419534c25782ee72ebe22e92a4f17b9af86c4aab401590babf27be695f94de8c
|
data/lib/json_schema/error.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
require "json_schema"
|
4
|
+
|
5
|
+
describe JsonSchema::SchemaError do
|
6
|
+
it "can print a message with a pointer" do
|
7
|
+
schema = JsonSchema::Schema.new
|
8
|
+
schema.fragment = "#"
|
9
|
+
|
10
|
+
e = JsonSchema::SchemaError.new(schema, "problem", nil)
|
11
|
+
assert_equal "#: problem", e.to_s
|
12
|
+
end
|
13
|
+
|
14
|
+
it "can print a message without a pointer" do
|
15
|
+
e = JsonSchema::SchemaError.new(nil, "problem", nil)
|
16
|
+
assert_equal "problem", e.to_s
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandur
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- test/json_pointer/evaluator_test.rb
|
126
126
|
- test/json_reference/reference_test.rb
|
127
127
|
- test/json_schema/document_store_test.rb
|
128
|
+
- test/json_schema/error_test.rb
|
128
129
|
- test/json_schema/parser_test.rb
|
129
130
|
- test/json_schema/reference_expander_test.rb
|
130
131
|
- test/json_schema/validator_test.rb
|