rdf-rdfa 1.1.3.2 → 1.1.4
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/rdf/rdfa/writer.rb +5 -15
- metadata +104 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b107d1183e8d18d13cca9296d2ae12bfe4364fde
|
4
|
+
data.tar.gz: e394a8db7b5e9a9136a2ea69a6f4e726b23b50d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc85640789f333ccd98987c7ff6a0a9d797486291ea0e65a63cc8464b1bd47d7af1f2f65672cb5aea6dff6ea29afafbac4907923285cc1df370a2c6ad834e133
|
7
|
+
data.tar.gz: d2832ab9ae8e00cb81146150a4d3d2e1587d4c4d7045ee1e2e59ae7c6c7c2f051c0ab59c77fe5f644e7e056b76c981660339f299f0161931a2808bf429eb29b4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
data/lib/rdf/rdfa/writer.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'haml'
|
2
2
|
require 'cgi'
|
3
|
+
require 'rdf/xsd'
|
3
4
|
|
4
5
|
module RDF::RDFa
|
5
6
|
##
|
@@ -611,7 +612,7 @@ module RDF::RDFa
|
|
611
612
|
literal.language if literal.literal? && literal.language && literal.language.to_s != @lang.to_s
|
612
613
|
end
|
613
614
|
|
614
|
-
# Haml rendering helper. Data to be added to a @content value
|
615
|
+
# Haml rendering helper. Data to be added to a @content value, for specific datatypes
|
615
616
|
#
|
616
617
|
# @param [RDF::Literal] literal
|
617
618
|
# @return [String, nil]
|
@@ -619,30 +620,19 @@ module RDF::RDFa
|
|
619
620
|
def get_content(literal)
|
620
621
|
raise RDF::WriterError, "Getting content for #{literal.inspect}, which must be a literal" unless literal.is_a?(RDF::Literal)
|
621
622
|
case literal
|
622
|
-
when RDF::Literal::Date, RDF::Literal::Time, RDF::Literal::DateTime
|
623
|
+
when RDF::Literal::Date, RDF::Literal::Time, RDF::Literal::DateTime, RDF::Literal::Duration
|
623
624
|
literal.to_s
|
624
625
|
end
|
625
626
|
end
|
626
627
|
|
627
|
-
# Haml rendering helper. Display value for object, may be
|
628
|
+
# Haml rendering helper. Display value for object, may be humanized into a non-canonical form
|
628
629
|
#
|
629
630
|
# @param [RDF::Literal] literal
|
630
631
|
# @return [String]
|
631
632
|
# @raise [RDF::WriterError]
|
632
633
|
def get_value(literal)
|
633
634
|
raise RDF::WriterError, "Getting value for #{literal.inspect}, which must be a literal" unless literal.is_a?(RDF::Literal)
|
634
|
-
|
635
|
-
when RDF::Literal::Date
|
636
|
-
literal.object.strftime("%A, %d %B %Y")
|
637
|
-
when RDF::Literal::Time
|
638
|
-
literal.object.strftime("%H:%M:%S %Z").sub(/\+00:00/, "UTC")
|
639
|
-
when RDF::Literal::DateTime
|
640
|
-
literal.object.strftime("%H:%M:%S %Z on %A, %d %B %Y").sub(/\+00:00/, "UTC")
|
641
|
-
else
|
642
|
-
literal.to_s
|
643
|
-
end
|
644
|
-
rescue
|
645
|
-
literal.to_s # When all else fails ...
|
635
|
+
literal.humanize
|
646
636
|
end
|
647
637
|
|
648
638
|
# Haml rendering helper. Return an appropriate label for a resource.
|
metadata
CHANGED
@@ -1,233 +1,240 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-rdfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg
|
8
8
|
- Kellogg
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
16
|
-
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.1'
|
21
|
-
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.1.6
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
27
|
requirements:
|
23
|
-
- - ~>
|
28
|
+
- - "~>"
|
24
29
|
- !ruby/object:Gem::Version
|
25
30
|
version: '1.1'
|
26
|
-
|
27
|
-
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.6
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: haml
|
30
|
-
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
|
-
- - ~>
|
38
|
+
- - "~>"
|
33
39
|
- !ruby/object:Gem::Version
|
34
40
|
version: '4.0'
|
35
|
-
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
44
|
requirements:
|
37
|
-
- - ~>
|
45
|
+
- - "~>"
|
38
46
|
- !ruby/object:Gem::Version
|
39
47
|
version: '4.0'
|
40
|
-
prerelease: false
|
41
|
-
type: :runtime
|
42
48
|
- !ruby/object:Gem::Dependency
|
43
49
|
name: rdf-xsd
|
44
|
-
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
45
51
|
requirements:
|
46
|
-
- - ~>
|
52
|
+
- - "~>"
|
47
53
|
- !ruby/object:Gem::Version
|
48
54
|
version: '1.1'
|
49
|
-
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
58
|
requirements:
|
51
|
-
- - ~>
|
59
|
+
- - "~>"
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '1.1'
|
54
|
-
prerelease: false
|
55
|
-
type: :runtime
|
56
62
|
- !ruby/object:Gem::Dependency
|
57
63
|
name: htmlentities
|
58
|
-
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
59
65
|
requirements:
|
60
|
-
- - ~>
|
66
|
+
- - "~>"
|
61
67
|
- !ruby/object:Gem::Version
|
62
68
|
version: '4.3'
|
63
|
-
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
72
|
requirements:
|
65
|
-
- - ~>
|
73
|
+
- - "~>"
|
66
74
|
- !ruby/object:Gem::Version
|
67
75
|
version: '4.3'
|
68
|
-
prerelease: false
|
69
|
-
type: :runtime
|
70
76
|
- !ruby/object:Gem::Dependency
|
71
77
|
name: equivalent-xml
|
72
|
-
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
73
79
|
requirements:
|
74
|
-
- - ~>
|
80
|
+
- - "~>"
|
75
81
|
- !ruby/object:Gem::Version
|
76
82
|
version: '0.4'
|
77
|
-
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
86
|
requirements:
|
79
|
-
- - ~>
|
87
|
+
- - "~>"
|
80
88
|
- !ruby/object:Gem::Version
|
81
89
|
version: '0.4'
|
82
|
-
prerelease: false
|
83
|
-
type: :development
|
84
90
|
- !ruby/object:Gem::Dependency
|
85
91
|
name: open-uri-cached
|
86
|
-
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
87
93
|
requirements:
|
88
|
-
- - ~>
|
94
|
+
- - "~>"
|
89
95
|
- !ruby/object:Gem::Version
|
90
96
|
version: '0.0'
|
91
|
-
- -
|
97
|
+
- - ">="
|
92
98
|
- !ruby/object:Gem::Version
|
93
99
|
version: 0.0.5
|
94
|
-
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
103
|
requirements:
|
96
|
-
- - ~>
|
104
|
+
- - "~>"
|
97
105
|
- !ruby/object:Gem::Version
|
98
106
|
version: '0.0'
|
99
|
-
- -
|
107
|
+
- - ">="
|
100
108
|
- !ruby/object:Gem::Version
|
101
109
|
version: 0.0.5
|
102
|
-
prerelease: false
|
103
|
-
type: :development
|
104
110
|
- !ruby/object:Gem::Dependency
|
105
111
|
name: json-ld
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ~>
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.1'
|
111
112
|
requirement: !ruby/object:Gem::Requirement
|
112
113
|
requirements:
|
113
|
-
- - ~>
|
114
|
+
- - "~>"
|
114
115
|
- !ruby/object:Gem::Version
|
115
116
|
version: '1.1'
|
116
|
-
prerelease: false
|
117
117
|
type: :development
|
118
|
-
|
119
|
-
name: rspec
|
118
|
+
prerelease: false
|
120
119
|
version_requirements: !ruby/object:Gem::Requirement
|
121
120
|
requirements:
|
122
|
-
- - ~>
|
121
|
+
- - "~>"
|
123
122
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
123
|
+
version: '1.1'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rspec
|
125
126
|
requirement: !ruby/object:Gem::Requirement
|
126
127
|
requirements:
|
127
|
-
- - ~>
|
128
|
+
- - "~>"
|
128
129
|
- !ruby/object:Gem::Version
|
129
130
|
version: '3.0'
|
130
|
-
prerelease: false
|
131
131
|
type: :development
|
132
|
-
|
133
|
-
name: rspec-its
|
132
|
+
prerelease: false
|
134
133
|
version_requirements: !ruby/object:Gem::Requirement
|
135
134
|
requirements:
|
136
|
-
- - ~>
|
135
|
+
- - "~>"
|
137
136
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
137
|
+
version: '3.0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: rspec-its
|
139
140
|
requirement: !ruby/object:Gem::Requirement
|
140
141
|
requirements:
|
141
|
-
- - ~>
|
142
|
+
- - "~>"
|
142
143
|
- !ruby/object:Gem::Version
|
143
144
|
version: '1.0'
|
144
|
-
prerelease: false
|
145
145
|
type: :development
|
146
|
-
|
147
|
-
name: rdf-spec
|
146
|
+
prerelease: false
|
148
147
|
version_requirements: !ruby/object:Gem::Requirement
|
149
148
|
requirements:
|
150
|
-
- - ~>
|
149
|
+
- - "~>"
|
151
150
|
- !ruby/object:Gem::Version
|
152
|
-
version: '1.
|
151
|
+
version: '1.0'
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: rdf-spec
|
153
154
|
requirement: !ruby/object:Gem::Requirement
|
154
155
|
requirements:
|
155
|
-
- - ~>
|
156
|
+
- - "~>"
|
156
157
|
- !ruby/object:Gem::Version
|
157
158
|
version: '1.1'
|
158
|
-
prerelease: false
|
159
159
|
type: :development
|
160
|
-
|
161
|
-
name: rdf-turtle
|
160
|
+
prerelease: false
|
162
161
|
version_requirements: !ruby/object:Gem::Requirement
|
163
162
|
requirements:
|
164
|
-
- - ~>
|
163
|
+
- - "~>"
|
165
164
|
- !ruby/object:Gem::Version
|
166
165
|
version: '1.1'
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
name: rdf-turtle
|
167
168
|
requirement: !ruby/object:Gem::Requirement
|
168
169
|
requirements:
|
169
|
-
- - ~>
|
170
|
+
- - "~>"
|
170
171
|
- !ruby/object:Gem::Version
|
171
172
|
version: '1.1'
|
172
|
-
prerelease: false
|
173
173
|
type: :development
|
174
|
-
|
175
|
-
name: rdf-rdfxml
|
174
|
+
prerelease: false
|
176
175
|
version_requirements: !ruby/object:Gem::Requirement
|
177
176
|
requirements:
|
178
|
-
- - ~>
|
177
|
+
- - "~>"
|
179
178
|
- !ruby/object:Gem::Version
|
180
179
|
version: '1.1'
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: rdf-rdfxml
|
181
182
|
requirement: !ruby/object:Gem::Requirement
|
182
183
|
requirements:
|
183
|
-
- - ~>
|
184
|
+
- - "~>"
|
184
185
|
- !ruby/object:Gem::Version
|
185
186
|
version: '1.1'
|
186
|
-
prerelease: false
|
187
187
|
type: :development
|
188
|
-
|
189
|
-
name: rdf-isomorphic
|
188
|
+
prerelease: false
|
190
189
|
version_requirements: !ruby/object:Gem::Requirement
|
191
190
|
requirements:
|
192
|
-
- - ~>
|
191
|
+
- - "~>"
|
193
192
|
- !ruby/object:Gem::Version
|
194
193
|
version: '1.1'
|
194
|
+
- !ruby/object:Gem::Dependency
|
195
|
+
name: rdf-isomorphic
|
195
196
|
requirement: !ruby/object:Gem::Requirement
|
196
197
|
requirements:
|
197
|
-
- - ~>
|
198
|
+
- - "~>"
|
198
199
|
- !ruby/object:Gem::Version
|
199
200
|
version: '1.1'
|
200
|
-
prerelease: false
|
201
201
|
type: :development
|
202
|
-
|
203
|
-
name: sparql
|
202
|
+
prerelease: false
|
204
203
|
version_requirements: !ruby/object:Gem::Requirement
|
205
204
|
requirements:
|
206
|
-
- - ~>
|
205
|
+
- - "~>"
|
207
206
|
- !ruby/object:Gem::Version
|
208
207
|
version: '1.1'
|
208
|
+
- !ruby/object:Gem::Dependency
|
209
|
+
name: sparql
|
209
210
|
requirement: !ruby/object:Gem::Requirement
|
210
211
|
requirements:
|
211
|
-
- - ~>
|
212
|
+
- - "~>"
|
212
213
|
- !ruby/object:Gem::Version
|
213
214
|
version: '1.1'
|
214
|
-
prerelease: false
|
215
215
|
type: :development
|
216
|
-
|
217
|
-
name: yard
|
216
|
+
prerelease: false
|
218
217
|
version_requirements: !ruby/object:Gem::Requirement
|
219
218
|
requirements:
|
220
|
-
- - ~>
|
219
|
+
- - "~>"
|
221
220
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
221
|
+
version: '1.1'
|
222
|
+
- !ruby/object:Gem::Dependency
|
223
|
+
name: yard
|
223
224
|
requirement: !ruby/object:Gem::Requirement
|
224
225
|
requirements:
|
225
|
-
- - ~>
|
226
|
+
- - "~>"
|
226
227
|
- !ruby/object:Gem::Version
|
227
228
|
version: '0.8'
|
228
|
-
prerelease: false
|
229
229
|
type: :development
|
230
|
-
|
230
|
+
prerelease: false
|
231
|
+
version_requirements: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - "~>"
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0.8'
|
236
|
+
description: RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library
|
237
|
+
suite.
|
231
238
|
email: public-rdf-ruby@w3.org
|
232
239
|
executables: []
|
233
240
|
extensions: []
|
@@ -266,24 +273,24 @@ homepage: http://ruby-rdf.github.com/rdf-rdfa
|
|
266
273
|
licenses:
|
267
274
|
- Public Domain
|
268
275
|
metadata: {}
|
269
|
-
post_install_message:
|
276
|
+
post_install_message:
|
270
277
|
rdoc_options: []
|
271
278
|
require_paths:
|
272
279
|
- lib
|
273
280
|
required_ruby_version: !ruby/object:Gem::Requirement
|
274
281
|
requirements:
|
275
|
-
- -
|
282
|
+
- - ">="
|
276
283
|
- !ruby/object:Gem::Version
|
277
284
|
version: 1.9.3
|
278
285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
279
286
|
requirements:
|
280
|
-
- -
|
287
|
+
- - ">="
|
281
288
|
- !ruby/object:Gem::Version
|
282
289
|
version: '0'
|
283
290
|
requirements: []
|
284
291
|
rubyforge_project: rdf-rdfa
|
285
292
|
rubygems_version: 2.2.2
|
286
|
-
signing_key:
|
293
|
+
signing_key:
|
287
294
|
specification_version: 4
|
288
295
|
summary: RDFa reader/writer for RDF.rb.
|
289
296
|
test_files: []
|