json-ld 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/json/ld/to_rdf.rb +1 -0
- data/spec/to_rdf_spec.rb +11 -0
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3706821b8a066ed641ac19ac5d098cc8475e8a4
|
4
|
+
data.tar.gz: 0aa9613452431fc878ce23724ee7830056ce52a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e539bb0fa82a1e0f3c7a30868f255812d8410cd437dcd5744171c0e34da2223b22e4b8bb6c195bb77ed328dc16234f5287b7c2920457e918691b7ba0a384733
|
7
|
+
data.tar.gz: 1fdec19c7d4fc56d018bf102883be735c5f711ae233f844aeedb8ccb70747be9993c09092ccaf468fe54351af76fda6f0405278c44a56b3968974a0e11457b1b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/lib/json/ld/to_rdf.rb
CHANGED
@@ -84,6 +84,7 @@ module JSON::LD
|
|
84
84
|
# Otherwise, if datatype is null, set it to xsd:string or xsd:langString, depending on if item has a @language key.
|
85
85
|
datatype ||= item.has_key?('@language') ? RDF.langString : RDF::XSD.string
|
86
86
|
end
|
87
|
+
datatype = RDF::URI(datatype) if datatype && !datatype.is_a?(RDF::URI)
|
87
88
|
|
88
89
|
# Initialize literal as an RDF literal using value and datatype. If element has the key @language and datatype is xsd:string, then add the value associated with the @language key as the language of the object.
|
89
90
|
language = item.fetch('@language', nil)
|
data/spec/to_rdf_spec.rb
CHANGED
@@ -637,6 +637,17 @@ describe JSON::LD::API do
|
|
637
637
|
<http://example.com/#you> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
|
638
638
|
)
|
639
639
|
],
|
640
|
+
"XMLLiteral" => [
|
641
|
+
%q({
|
642
|
+
"http://rdfs.org/sioc/ns#content": {
|
643
|
+
"@value": "foo",
|
644
|
+
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
|
645
|
+
}
|
646
|
+
}),
|
647
|
+
%q(
|
648
|
+
[<http://rdfs.org/sioc/ns#content> "foo"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>] .
|
649
|
+
)
|
650
|
+
]
|
640
651
|
}.each do |title, (js, ttl)|
|
641
652
|
it title do
|
642
653
|
ttl = "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . #{ttl}"
|
metadata
CHANGED
@@ -1,159 +1,159 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-ld
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: equivalent-xml
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.4'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: open-uri-cached
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.0'
|
48
|
-
- -
|
48
|
+
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: 0.0.5
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - ~>
|
55
|
+
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0.0'
|
58
|
-
- -
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 0.0.5
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: yard
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - ~>
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0.8'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - ~>
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0.8'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rspec
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - ~>
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '2.14'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - ~>
|
86
|
+
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '2.14'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rdf-spec
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - ~>
|
93
|
+
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '1.1'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - ~>
|
100
|
+
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '1.1'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rdf-turtle
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - ~>
|
107
|
+
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '1.1'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - ~>
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '1.1'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: rdf-trig
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - ~>
|
121
|
+
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '1.1'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - ~>
|
128
|
+
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '1.1'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: rdf-isomorphic
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- - ~>
|
135
|
+
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '1.1'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - ~>
|
142
|
+
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '1.1'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: rdf-xsd
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- - ~>
|
149
|
+
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '1.1'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- - ~>
|
156
|
+
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '1.1'
|
159
159
|
description: JSON::LD parses and serializes JSON-LD into RDF and implements expansion,
|
@@ -275,12 +275,12 @@ require_paths:
|
|
275
275
|
- lib
|
276
276
|
required_ruby_version: !ruby/object:Gem::Requirement
|
277
277
|
requirements:
|
278
|
-
- -
|
278
|
+
- - ">="
|
279
279
|
- !ruby/object:Gem::Version
|
280
280
|
version: 1.9.2
|
281
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
282
282
|
requirements:
|
283
|
-
- -
|
283
|
+
- - ">="
|
284
284
|
- !ruby/object:Gem::Version
|
285
285
|
version: '0'
|
286
286
|
requirements: []
|