json_schema 0.7.0 → 0.7.1
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/README.md +9 -1
- data/lib/json_schema/validator.rb +1 -1
- data/test/json_schema/validator_test.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74070c11982417365297631d11c3b51befca70ef
|
4
|
+
data.tar.gz: 6a058b821110127e4205bed95bf8753b56a6bfe9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 186f9cf65a896ca14b456f4d690e1d95ea2dd3fedc2777fa13988f1efd5bc91b35c267b9c8db412c7fcadd909539e0402b0d5901cc650fe18a4f74a1b944cdb2
|
7
|
+
data.tar.gz: e9274430be6b9cf1b284b47634d0c7b0bf79c995c93584c39f91e7c9bce9fef8e1f13dc27bccf8275120ca3554e00145238217dbfa60339f69a7042c986986ce
|
data/README.md
CHANGED
@@ -50,4 +50,12 @@ Or run specific suites or tests with:
|
|
50
50
|
```
|
51
51
|
ruby -Ilib -Itest test/json_schema/validator_test.rb
|
52
52
|
ruby -Ilib -Itest test/json_schema/validator_test.rb -n /anyOf/
|
53
|
-
```
|
53
|
+
```
|
54
|
+
|
55
|
+
## Release
|
56
|
+
|
57
|
+
Use the `release` task:
|
58
|
+
|
59
|
+
```
|
60
|
+
bundle exec rake release
|
61
|
+
```
|
@@ -523,7 +523,7 @@ module JsonSchema
|
|
523
523
|
end
|
524
524
|
end
|
525
525
|
|
526
|
-
EMAIL_PATTERN = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]
|
526
|
+
EMAIL_PATTERN = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]+$/i
|
527
527
|
|
528
528
|
HOSTNAME_PATTERN = /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/
|
529
529
|
|
@@ -602,6 +602,14 @@ describe JsonSchema::Validator do
|
|
602
602
|
assert validate
|
603
603
|
end
|
604
604
|
|
605
|
+
it "validates email format with long TLDs successfully" do
|
606
|
+
pointer("#/definitions/app/definitions/owner").merge!(
|
607
|
+
"format" => "email"
|
608
|
+
)
|
609
|
+
data_sample["owner"] = "dwarf@example.technology"
|
610
|
+
assert validate
|
611
|
+
end
|
612
|
+
|
605
613
|
it "validates email format unsuccessfully" do
|
606
614
|
pointer("#/definitions/app/definitions/owner").merge!(
|
607
615
|
"format" => "email"
|
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.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ecma-re-validator
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.2.2
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: A JSON Schema V4 and Hyperschema V4 parser and validator.
|