json_schema 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 421ca42c0b7fb0754a26c972ab21b5970eaafa92
4
- data.tar.gz: ddb435ca9c6bf52abf17510adb7d1d7484d53234
3
+ metadata.gz: 7e8787587141b0db7b6aa5b94a55ea79c1033136
4
+ data.tar.gz: 053257c0da80f8729d30784a8d60adfdee208cd2
5
5
  SHA512:
6
- metadata.gz: 2017cba51b8e2c1a91a7148aeb5dc4831698d6f5ddf7c19c041663dc645ec0014c64f35e2395df8144f7585719b54c03eacebd2037b7d165edf568e6d4c1feba
7
- data.tar.gz: 79a9c3f2d2c0dcb846249700bcdb91a4ca685937fbd3b1323406222a66006bde176975db1042a8dadd78ca6bd307a664ecd6644686bef0257e7268cddd5acdd1
6
+ metadata.gz: 5edd2fd7082b669c9df06ea9b628dd5caa58027cba8b5041908dc6211111a6b4e0bec65ef256f470f875b20984fa7535f5712024fcfaa88141e8bc2a90ac6ace
7
+ data.tar.gz: 15296350dfd5f30a2187b3f6da5327210c9d8e83fb9718638275beee049ec18d8b119d264dc50f92954a4fefe76d484e0105d16070aef2e3f2c5cc11352c11be
@@ -34,11 +34,11 @@ module JsonSchema
34
34
  private
35
35
 
36
36
  def first_visit(schema, errors, path)
37
- path = path.join("/")
37
+ path_string = path.join("/")
38
38
  pointer = schema.pointer
39
- if !@visits.key?(pointer) || !@visits[pointer].key?(path)
39
+ if !@visits.key?(pointer) || !@visits[pointer].key?(path_string)
40
40
  @visits[pointer] ||= {}
41
- @visits[pointer][path] = true
41
+ @visits[pointer][path_string] = true
42
42
  true
43
43
  else
44
44
  message = %{Validation loop detected.}
@@ -25,16 +25,6 @@ describe JsonSchema::Validator do
25
25
  %{Expected data to be a member of enum ["private", "public"], value was: personal.}
26
26
  end
27
27
 
28
- it "validates enum unsuccessfully with boolean" do
29
- pointer("#/definitions/app/definitions/visibility").merge!(
30
- "enum" => [true]
31
- )
32
- data_sample["visibility"] = false
33
- refute validate
34
- assert_includes error_messages,
35
- %{Expected data to be a member of enum [true], value was: false.}
36
- end
37
-
38
28
  it "validates type successfully" do
39
29
  pointer("#/definitions/app").merge!(
40
30
  "type" => ["object"]
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.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2014-07-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: