json-ld 1.0.8 → 1.0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/VERSION +1 -1
  3. data/lib/json/ld/context.rb +12 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjNiZjRiMzMwODgxOTgwNjdjMjFjMWNkNjY1ZDVlNDk0ODAzYjQ3YQ==
4
+ NDIxMWI3YzU4Y2NkNjI0ZTU3ZDdmMDIwMWYyZWI5Y2UzOTNmOGQxOA==
5
5
  data.tar.gz: !binary |-
6
- ZWFkOWE0MDU0ZTc0YzIyYzdkZGEwNDg0YTgxZjg1ZTc0MWU3MTYzMA==
6
+ YmZlNTU2NDc0YzQ0NTRkY2YxNjQ5Y2E0MzdlYmQyYjI4NDQyZTMzZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDY1MDAxMDMzMmMzYjg4MzA2ODJjYTAxYjdlNmRjYzdkNGVlYTY3YTU1MTI4
10
- NTMwMjQ3ZjYyNDIzNTkyYzUzMTkzNDJlMWI2MzUwZTY5NGE0NTczYTZiMjVh
11
- YWE3MjQ1MzA0NjVmYmYxMGQ4NjJjYzQ0ZWVjOTg4YmEwOTJmZWY=
9
+ ODE4OTY2ODA5MDVmZTMwZThmYWYwOTc0MzEwNjk3MjdhOGExOTViNzgzZjdi
10
+ M2VjM2ZiZDA1YTQxYWY3MmE1N2JhODFiMzQxZTAzMzVmNWMzZWM4Nzg3MTRi
11
+ YWUwMzBjZGRlZjYzMTQ4YjE5ZWY3OGMwYWU5OGNhZDIyYTViY2U=
12
12
  data.tar.gz: !binary |-
13
- MDNhODA1ODViOTlmZTVjZGUxYjBmYmM4NTg1ZGNkNjBhNjliMjA1MzNmMDVm
14
- NTdlZjNmZGExZjkwNThmNzU0YWIwZTExMDIzODVkMjI1M2Q0YzNjYTAzNzU3
15
- MDA0NmI5NjYyYWZiNWM0ZGY4OWE4ZTQ4MDBjODEzZjVmYzU2MDc=
13
+ ZDRiNTE1OWUyYTFkYWNhNGJkZjdhNmVhZWRkNWJjN2I5NzRhNTg2ZTExZjI0
14
+ YTI4ZjFkYWE0NzEyNzFiODFmNmVmYzY3YzhkNjcyMzNlZTY2NGUwY2Y5ZDU3
15
+ OGJiM2VmMjBkOWViY2FkOTA3ZThlYzk2NmVlODRmNjNkZjQ2OTQ=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.8
1
+ 1.0.8.1
@@ -273,8 +273,18 @@ module JSON::LD
273
273
  rescue JsonLdError
274
274
  raise
275
275
  rescue Exception => e
276
- debug("parse") {"Failed to retrieve @context from remote document at #{context_no_base.context_base.inspect}: #{e.message}"}
277
- raise JsonLdError::LoadingRemoteContextFailed, "#{context_no_base.context_base}", e.backtrace if @options[:validate]
276
+ # Speical case for schema.org, until they get their act together
277
+ if context.to_s == 'http://schema.org/'
278
+ RDF::Util::File.open_file("http://json-ld.org/contexts/schema.org.jsonld") do |f|
279
+ context = JSON.parse(f.read)['@context']
280
+ if @options[:processingMode] == "json-ld-1.0"
281
+ context_no_base.provided_context = context.dup
282
+ end
283
+ end
284
+ else
285
+ debug("parse") {"Failed to retrieve @context from remote document at #{context_no_base.context_base.inspect}: #{e.message}"}
286
+ raise JsonLdError::LoadingRemoteContextFailed, "#{context_no_base.context_base}", e.backtrace if @options[:validate]
287
+ end
278
288
  end
279
289
 
280
290
  # 3.2.6) Set context to the result of recursively calling this algorithm, passing context no base for active context, context for local context, and remote contexts.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-ld
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-21 00:00:00.000000000 Z
11
+ date: 2013-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf