json-ld-preloaded 3.0.0 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHORS +1 -1
- data/README.md +19 -22
- data/VERSION +1 -1
- data/lib/json/ld/preloaded.rb +2 -0
- data/lib/json/ld/preloaded/activitystreams.rb +4 -3
- data/lib/json/ld/preloaded/csvw.rb +4 -3
- data/lib/json/ld/preloaded/datacube.rb +2 -1
- data/lib/json/ld/preloaded/entityfacts.rb +20 -9
- data/lib/json/ld/preloaded/foaf.rb +2 -1
- data/lib/json/ld/preloaded/geojson.rb +2 -1
- data/lib/json/ld/preloaded/hydra.rb +11 -1
- data/lib/json/ld/preloaded/identity.rb +2 -1
- data/lib/json/ld/preloaded/iiif.rb +2 -1
- data/lib/json/ld/preloaded/linkedart.rb +437 -0
- data/lib/json/ld/preloaded/lov.rb +40 -4
- data/lib/json/ld/preloaded/oa.rb +2 -1
- data/lib/json/ld/preloaded/prefix.rb +336 -23
- data/lib/json/ld/preloaded/presentation.rb +2 -1
- data/lib/json/ld/preloaded/rdfa.rb +4 -1
- data/lib/json/ld/preloaded/research.rb +2 -1
- data/lib/json/ld/preloaded/schema.rb +188 -101
- data/lib/json/ld/preloaded/vc.rb +20 -0
- data/lib/json/ld/preloaded/vcard.rb +2 -1
- data/spec/preloaded_spec.rb +3 -0
- metadata +9 -15
- data/lib/json/ld/preloaded/actions.rb +0 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# This file generated automatically from http://www.w3.org/2018/credentials/v1
|
4
|
+
require 'json/ld'
|
5
|
+
class JSON::LD::Context
|
6
|
+
add_preloaded("http://www.w3.org/2018/credentials/v1") do
|
7
|
+
new(processingMode: "json-ld-1.1", term_definitions: {
|
8
|
+
"EcdsaSecp256k1Signature2019" => TermDefinition.new("EcdsaSecp256k1Signature2019", id: "https://w3id.org/security#EcdsaSecp256k1Signature2019", context: {"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "xsd"=>"http://www.w3.org/2001/XMLSchema#", "challenge"=>"sec:challenge", "created"=>{"@id"=>"http://purl.org/dc/terms/created", "@type"=>"xsd:dateTime"}, "domain"=>"sec:domain", "expires"=>{"@id"=>"sec:expiration", "@type"=>"xsd:dateTime"}, "jws"=>"sec:jws", "nonce"=>"sec:nonce", "proofPurpose"=>{"@id"=>"sec:proofPurpose", "@type"=>"@vocab", "@context"=>{"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "assertionMethod"=>{"@id"=>"sec:assertionMethod", "@type"=>"@id", "@container"=>"@set"}, "authentication"=>{"@id"=>"sec:authenticationMethod", "@type"=>"@id", "@container"=>"@set"}}}, "proofValue"=>"sec:proofValue", "verificationMethod"=>{"@id"=>"sec:verificationMethod", "@type"=>"@id"}}, protected: true),
|
9
|
+
"EcdsaSecp256r1Signature2019" => TermDefinition.new("EcdsaSecp256r1Signature2019", id: "https://w3id.org/security#EcdsaSecp256r1Signature2019", context: {"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "xsd"=>"http://www.w3.org/2001/XMLSchema#", "challenge"=>"sec:challenge", "created"=>{"@id"=>"http://purl.org/dc/terms/created", "@type"=>"xsd:dateTime"}, "domain"=>"sec:domain", "expires"=>{"@id"=>"sec:expiration", "@type"=>"xsd:dateTime"}, "jws"=>"sec:jws", "nonce"=>"sec:nonce", "proofPurpose"=>{"@id"=>"sec:proofPurpose", "@type"=>"@vocab", "@context"=>{"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "assertionMethod"=>{"@id"=>"sec:assertionMethod", "@type"=>"@id", "@container"=>"@set"}, "authentication"=>{"@id"=>"sec:authenticationMethod", "@type"=>"@id", "@container"=>"@set"}}}, "proofValue"=>"sec:proofValue", "verificationMethod"=>{"@id"=>"sec:verificationMethod", "@type"=>"@id"}}, protected: true),
|
10
|
+
"Ed25519Signature2018" => TermDefinition.new("Ed25519Signature2018", id: "https://w3id.org/security#Ed25519Signature2018", context: {"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "xsd"=>"http://www.w3.org/2001/XMLSchema#", "challenge"=>"sec:challenge", "created"=>{"@id"=>"http://purl.org/dc/terms/created", "@type"=>"xsd:dateTime"}, "domain"=>"sec:domain", "expires"=>{"@id"=>"sec:expiration", "@type"=>"xsd:dateTime"}, "jws"=>"sec:jws", "nonce"=>"sec:nonce", "proofPurpose"=>{"@id"=>"sec:proofPurpose", "@type"=>"@vocab", "@context"=>{"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "assertionMethod"=>{"@id"=>"sec:assertionMethod", "@type"=>"@id", "@container"=>"@set"}, "authentication"=>{"@id"=>"sec:authenticationMethod", "@type"=>"@id", "@container"=>"@set"}}}, "proofValue"=>"sec:proofValue", "verificationMethod"=>{"@id"=>"sec:verificationMethod", "@type"=>"@id"}}, protected: true),
|
11
|
+
"RsaSignature2018" => TermDefinition.new("RsaSignature2018", id: "https://w3id.org/security#RsaSignature2018", context: {"@version"=>1.1, "@protected"=>true, "challenge"=>"sec:challenge", "created"=>{"@id"=>"http://purl.org/dc/terms/created", "@type"=>"xsd:dateTime"}, "domain"=>"sec:domain", "expires"=>{"@id"=>"sec:expiration", "@type"=>"xsd:dateTime"}, "jws"=>"sec:jws", "nonce"=>"sec:nonce", "proofPurpose"=>{"@id"=>"sec:proofPurpose", "@type"=>"@vocab", "@context"=>{"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "sec"=>"https://w3id.org/security#", "assertionMethod"=>{"@id"=>"sec:assertionMethod", "@type"=>"@id", "@container"=>"@set"}, "authentication"=>{"@id"=>"sec:authenticationMethod", "@type"=>"@id", "@container"=>"@set"}}}, "proofValue"=>"sec:proofValue", "verificationMethod"=>{"@id"=>"sec:verificationMethod", "@type"=>"@id"}}, protected: true),
|
12
|
+
"VerifiableCredential" => TermDefinition.new("VerifiableCredential", id: "https://www.w3.org/2018/credentials#VerifiableCredential", context: {"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "cred"=>"https://www.w3.org/2018/credentials#", "sec"=>"https://w3id.org/security#", "xsd"=>"http://www.w3.org/2001/XMLSchema#", "credentialSchema"=>{"@id"=>"cred:credentialSchema", "@type"=>"@id", "@context"=>{"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "cred"=>"https://www.w3.org/2018/credentials#", "JsonSchemaValidator2018"=>"cred:JsonSchemaValidator2018"}}, "credentialStatus"=>{"@id"=>"cred:credentialStatus", "@type"=>"@id"}, "credentialSubject"=>{"@id"=>"cred:credentialSubject", "@type"=>"@id"}, "evidence"=>{"@id"=>"cred:evidence", "@type"=>"@id"}, "expirationDate"=>{"@id"=>"cred:expirationDate", "@type"=>"xsd:dateTime"}, "holder"=>{"@id"=>"cred:holder", "@type"=>"@id"}, "issued"=>{"@id"=>"cred:issued", "@type"=>"xsd:dateTime"}, "issuer"=>{"@id"=>"cred:issuer", "@type"=>"@id"}, "issuanceDate"=>{"@id"=>"cred:issuanceDate", "@type"=>"xsd:dateTime"}, "proof"=>{"@id"=>"sec:proof", "@type"=>"@id", "@container"=>"@graph"}, "refreshService"=>{"@id"=>"cred:refreshService", "@type"=>"@id", "@context"=>{"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "cred"=>"https://www.w3.org/2018/credentials#", "ManualRefreshService2018"=>"cred:ManualRefreshService2018"}}, "termsOfUse"=>{"@id"=>"cred:termsOfUse", "@type"=>"@id"}, "validFrom"=>{"@id"=>"cred:validFrom", "@type"=>"xsd:dateTime"}, "validUntil"=>{"@id"=>"cred:validUntil", "@type"=>"xsd:dateTime"}}, protected: true),
|
13
|
+
"VerifiablePresentation" => TermDefinition.new("VerifiablePresentation", id: "https://www.w3.org/2018/credentials#VerifiablePresentation", context: {"@version"=>1.1, "@protected"=>true, "id"=>"@id", "type"=>"@type", "cred"=>"https://www.w3.org/2018/credentials#", "sec"=>"https://w3id.org/security#", "holder"=>{"@id"=>"cred:holder", "@type"=>"@id"}, "proof"=>{"@id"=>"sec:proof", "@type"=>"@id", "@container"=>"@graph"}, "verifiableCredential"=>{"@id"=>"cred:verifiableCredential", "@type"=>"@id", "@container"=>"@graph"}}, protected: true),
|
14
|
+
"id" => TermDefinition.new("id", id: "@id", simple: true, protected: true),
|
15
|
+
"proof" => TermDefinition.new("proof", id: "https://w3id.org/security#proof", type_mapping: "@id", container_mapping: "@graph", protected: true),
|
16
|
+
"type" => TermDefinition.new("type", id: "@type", simple: true, protected: true)
|
17
|
+
})
|
18
|
+
end
|
19
|
+
alias_preloaded("https://www.w3.org/2018/credentials/v1", "http://www.w3.org/2018/credentials/v1")
|
20
|
+
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'json/ld'
|
5
5
|
class JSON::LD::Context
|
6
6
|
add_preloaded("http://www.w3.org/2006/vcard/ns") do
|
7
|
-
new(
|
7
|
+
new(term_definitions: {
|
8
8
|
"Acquaintance" => TermDefinition.new("Acquaintance", id: "http://www.w3.org/2006/vcard/ns#Acquaintance", simple: true),
|
9
9
|
"Address" => TermDefinition.new("Address", id: "http://www.w3.org/2006/vcard/ns#Address", simple: true),
|
10
10
|
"Agent" => TermDefinition.new("Agent", id: "http://www.w3.org/2006/vcard/ns#Agent", simple: true),
|
@@ -155,4 +155,5 @@ class JSON::LD::Context
|
|
155
155
|
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
|
156
156
|
})
|
157
157
|
end
|
158
|
+
alias_preloaded("https://www.w3.org/2006/vcard/ns", "http://www.w3.org/2006/vcard/ns")
|
158
159
|
end
|
data/spec/preloaded_spec.rb
CHANGED
@@ -13,12 +13,15 @@ describe JSON::LD::Context::Preloaded do
|
|
13
13
|
hydra: "http://www.w3.org/ns/hydra/core",
|
14
14
|
identity: "https://w3id.org/identity/v1",
|
15
15
|
iiif: "http://iiif.io/api/image/2/context.json",
|
16
|
+
linkedart: "http://linked.art/ns/v1/linked-art.json",
|
16
17
|
lov: "http://lov.okfn.org/dataset/lov/context",
|
18
|
+
oa: "http://www.w3.org/ns/oa",
|
17
19
|
prefix: "http://prefix.cc/context",
|
18
20
|
presentation: "http://iiif.io/api/presentation/2/context.json",
|
19
21
|
rdfa: "http://www.w3.org/2013/json-ld-context/rdfa11",
|
20
22
|
research: "https://w3id.org/bundle/context",
|
21
23
|
schema: "http://schema.org/",
|
24
|
+
vc: "https://www.w3.org/2018/credentials/v1",
|
22
25
|
vcard: "http://www.w3.org/2006/vcard/ns",
|
23
26
|
}.each do |id, url|
|
24
27
|
it "preloads #{id}" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-ld-preloaded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -28,22 +28,16 @@ dependencies:
|
|
28
28
|
name: json-ld
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.2'
|
34
|
-
- - "<"
|
31
|
+
- - "~>"
|
35
32
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
33
|
+
version: '3.0'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- - "
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '2.2'
|
44
|
-
- - "<"
|
38
|
+
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
40
|
+
version: '3.0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: multi_json
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +119,6 @@ files:
|
|
125
119
|
- UNLICENSE
|
126
120
|
- VERSION
|
127
121
|
- lib/json/ld/preloaded.rb
|
128
|
-
- lib/json/ld/preloaded/actions.rb
|
129
122
|
- lib/json/ld/preloaded/activitystreams.rb
|
130
123
|
- lib/json/ld/preloaded/csvw.rb
|
131
124
|
- lib/json/ld/preloaded/datacube.rb
|
@@ -135,6 +128,7 @@ files:
|
|
135
128
|
- lib/json/ld/preloaded/hydra.rb
|
136
129
|
- lib/json/ld/preloaded/identity.rb
|
137
130
|
- lib/json/ld/preloaded/iiif.rb
|
131
|
+
- lib/json/ld/preloaded/linkedart.rb
|
138
132
|
- lib/json/ld/preloaded/lov.rb
|
139
133
|
- lib/json/ld/preloaded/oa.rb
|
140
134
|
- lib/json/ld/preloaded/obi.rb
|
@@ -143,6 +137,7 @@ files:
|
|
143
137
|
- lib/json/ld/preloaded/rdfa.rb
|
144
138
|
- lib/json/ld/preloaded/research.rb
|
145
139
|
- lib/json/ld/preloaded/schema.rb
|
140
|
+
- lib/json/ld/preloaded/vc.rb
|
146
141
|
- lib/json/ld/preloaded/vcard.rb
|
147
142
|
- lib/json/ld/preloaded/version.rb
|
148
143
|
- spec/preloaded_spec.rb
|
@@ -166,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
161
|
- !ruby/object:Gem::Version
|
167
162
|
version: '0'
|
168
163
|
requirements: []
|
169
|
-
|
170
|
-
rubygems_version: 2.7.6
|
164
|
+
rubygems_version: 3.0.4
|
171
165
|
signing_key:
|
172
166
|
specification_version: 4
|
173
167
|
summary: JSON-LD with preloaded contexts.
|
File without changes
|