json_schema 0.20.8 → 0.20.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/json_schema/parser.rb +2 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 239a8df86c5fd746683d265f47f53ee415ac40613c8411abc8e4492cc3e02e18
4
- data.tar.gz: 5614b247d018816964ab128923d4a86fd1fd4e6c397309bb74864c06a4ee95fd
3
+ metadata.gz: e21a1e4dc51b894f1374f46872ed71f49d2b45702dc99783286aafefca69f8c8
4
+ data.tar.gz: 7002f0a54a8de78318b676d9f1c0465dc8ff40d70163b3d83b8fafa412cee52e
5
5
  SHA512:
6
- metadata.gz: fad2007fa5541c260baa72dd32527fba69ed292c7ec589959f023ef8a4edc206a1bb260dc0d3b6421586758f3d707c6284aac5c300d1dda00d30250d3f78c45f
7
- data.tar.gz: cf384d7f97d445df492f9cb67737d852b725d63542d5da2bd30809a91a36c5277ea851c7502cda03724a13ab1eb2036122eaf4c1aeb5a661e25ec4bf81993cc7
6
+ metadata.gz: a9d51a9b64731ad8e2aa3bb79f65e3b7c555a38b181a6a00789b9025903a5049e1be0043a3637456a07d008f8878b2a61f56b3a6b9bacd90c1fc7acb20a5415a
7
+ data.tar.gz: 71e615dc945f0bd926f41211e56a48424f0f45df706df4394779ebf03d96316764a0b6433b2413469e314d0c1a42d08bcc0f479c2c0b2f3736732c4815993361
@@ -362,10 +362,10 @@ module JsonSchema
362
362
  end
363
363
 
364
364
  def validate_type(schema, types, field)
365
- friendly_types =
366
- types.map { |t| FRIENDLY_TYPES[t] || t }.sort.uniq.join("/")
367
365
  value = schema.data[field]
368
366
  if !value.nil? && !types.any? { |t| value.is_a?(t) }
367
+ friendly_types =
368
+ types.map { |t| FRIENDLY_TYPES[t] || t }.sort.uniq.join("/")
369
369
  message = %{#{value.inspect} is not a valid "#{field}", must be a #{friendly_types}.}
370
370
  @errors << SchemaError.new(schema, message, :invalid_type)
371
371
  nil
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.20.8
4
+ version: 0.20.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-13 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.0.6
72
+ rubygems_version: 3.1.4
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: A JSON Schema V4 and Hyperschema V4 parser and validator.