json-schema 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -6,10 +6,6 @@ h2. Dependencies
6
6
 
7
7
  The JSON::Schema library has no dependencies if the validation methods are called using Ruby objects. However, either the <code>json</code> or the <code>yajl-ruby</code> gem needs to be installed to validate JSON strings or files containing JSON data.
8
8
 
9
- h2. 0.9.3 Notes
10
-
11
- For those upgrading to version 0.9.3 and above and use external file references, the library changed how files are referenced. The JSON Schema spec clearly states that relative URIs are to be referenced against the parent schema's URI, and not the parent schema's 'parent' URI, as the library previously assumed.
12
-
13
9
  h2. Installation
14
10
 
15
11
  From rubygems.org:
@@ -22,7 +18,7 @@ From the git repo:
22
18
 
23
19
  <pre>
24
20
  $ gem build json-schema.gemspec
25
- $ gem install json-schema-0.9.4.gem
21
+ $ gem install json-schema-0.9.5.gem
26
22
  </pre>
27
23
 
28
24
 
@@ -197,4 +193,4 @@ The 'format' attribute is only validated for the following values:
197
193
 
198
194
  All other 'format' attribute values are simply checked to ensure the instance value is of the correct datatype (e.g., an instance value is validated to be an integer or a float in the case of 'utc-millisec').
199
195
 
200
- Additionally, JSON::Validator does not handle any json hyperschema attributes.
196
+ Additionally, JSON::Validator does not handle any json hyperschema attributes.
@@ -12,7 +12,7 @@ module JSON
12
12
  elsif path[0,1] == "/"
13
13
  temp_uri.path = Pathname.new(path).cleanpath.to_s
14
14
  else
15
- temp_uri.path = (Pathname.new(current_schema.uri.path) + path).cleanpath.to_s
15
+ temp_uri = current_schema.uri.merge(path)
16
16
  end
17
17
  temp_uri.fragment = current_schema.schema['$ref'].split("#")[1]
18
18
  end
@@ -51,4 +51,4 @@ module JSON
51
51
  end
52
52
  end
53
53
  end
54
- end
54
+ end
@@ -13,7 +13,7 @@ module JSON
13
13
  if @schema['id']
14
14
  temp_uri = URI.parse(@schema['id'])
15
15
  if temp_uri.relative?
16
- uri.path = (Pathname.new(uri.path) + @schema['id']).cleanpath.to_s
16
+ uri = uri.merge(@schema['id'])
17
17
  temp_uri = uri
18
18
  end
19
19
  @uri = temp_uri
@@ -134,7 +134,7 @@ module JSON
134
134
  if path && path[0,1] == '/'
135
135
  uri.path = Pathname.new(path).cleanpath.to_s
136
136
  else
137
- uri.path = (Pathname.new(parent_schema.uri.path) + path).cleanpath.to_s
137
+ uri = parent_schema.uri.merge(path)
138
138
  end
139
139
  uri.fragment = ''
140
140
  end
@@ -386,4 +386,4 @@ module JSON
386
386
  end
387
387
 
388
388
  end
389
- end
389
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-schema
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 4
10
- version: 0.9.4
9
+ - 5
10
+ version: 0.9.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kenny Hoxworth
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-03 00:00:00 -04:00
18
+ date: 2011-05-31 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21