rdf-rdfa 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed8c367a15385c1972aedccfeaee95724b96ec8b
4
- data.tar.gz: fbce062b410f2665e9596bd2618e774f9178f088
3
+ metadata.gz: 58fae43e45c36c0ae16fc3ec3e13ca7d37172c1e
4
+ data.tar.gz: c14110e7a10a20418e85f37762d2407ccc2b29e2
5
5
  SHA512:
6
- metadata.gz: 9cc8d2231f5b07e9e56df4be6f6d9291a9240e65fb29d393a4ee6d26b90bb89af7ac921971dc2ed6500fd6f560fdd1776cd9fd8fb75b571f9698fb25045d04ee
7
- data.tar.gz: 88c0271d543240d95e8278ff5755e85d9ea7350fb8d3d6a665180e2059396262beded88f469d1547affebb4c2ca360dfae2048f349b5f6c452bf578f2cf7027c
6
+ metadata.gz: a3921617b492e2cf53595f17bcd3294826c755014cab28b4e1ec6a44861030fc331422ce3d9afea1f2dce2f50b23e62644e40c2f4b2b02c5b01af1733b58beec
7
+ data.tar.gz: cdc1f16371a4572a0a0665937420efc1a5bea7939fef2e950830d4bdcdbf60b4ff7e650956f2dd8696152a3d42e7466678a085399de186db28efb00dac55ff13
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.1.3
@@ -3,7 +3,7 @@ require 'rdf'
3
3
 
4
4
  module RDF
5
5
  ##
6
- # **`RDF::RDFa`** is an RDFa plugin for RDF.rb.
6
+ # **`RDF::RDFa`** is an RDFa extension for RDF.rb.
7
7
  #
8
8
  # @example Requiring the `RDF::RDFa` module
9
9
  # require 'rdf/rdfa'
@@ -367,10 +367,11 @@ module RDF::RDFa
367
367
  add_debug(el, "script element of type #{type}")
368
368
  begin
369
369
  # Formats don't exist unless they've been required
370
- case type
370
+ case type.to_s
371
371
  when 'application/rdf+xml' then require 'rdf/rdfxml'
372
- when 'text/ntriples' then require 'rdf/ntriples'
373
- when 'text/turtle' then require 'text/turtle'
372
+ when 'text/ntriples' then require 'rdf/ntriples'
373
+ when 'text/turtle' then require 'rdf/turtle'
374
+ when 'application/ld+json' then require 'json/ld'
374
375
  end
375
376
  rescue
376
377
  end
@@ -378,6 +379,8 @@ module RDF::RDFa
378
379
  if reader = RDF::Reader.for(:content_type => type)
379
380
  add_debug(el, "=> reader #{reader.to_sym}")
380
381
  reader.new(input, options).each(&block)
382
+ else
383
+ add_debug(el, "=> no reader found")
381
384
  end
382
385
  end
383
386
 
@@ -391,8 +394,10 @@ module RDF::RDFa
391
394
  # Look for Embedded scripts
392
395
  @root.css("script[type]").each do |el|
393
396
  type = el.attribute("type")
394
-
395
- extract_script(el, el.inner_text, type, @options) do |statement|
397
+
398
+ text = el.inner_html.sub(%r(\A\s*\<!\[CDATA\[)m, '').sub(%r(\]\]>\s*\Z)m, '')
399
+
400
+ extract_script(el, text, type, @options) do |statement|
396
401
  @repository << statement
397
402
  end
398
403
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-rdfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg
@@ -9,82 +9,85 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-17 00:00:00.000000000 Z
12
+ date: 2014-04-07 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
- version: 1.1.0
20
+ version: '1.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 1.1.0
27
+ version: '1.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: haml
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '4.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '4.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rdf-xsd
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '1.1'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '1.1'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: htmlentities
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: 4.3.1
62
+ version: '4.3'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 4.3.1
69
+ version: '4.3'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: equivalent-xml
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 0.3.0
76
+ version: '0.4'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ~>
82
82
  - !ruby/object:Gem::Version
83
- version: 0.3.0
83
+ version: '0.4'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: open-uri-cached
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: '0.0'
88
91
  - - '>='
89
92
  - !ruby/object:Gem::Version
90
93
  version: 0.0.5
@@ -92,6 +95,9 @@ dependencies:
92
95
  prerelease: false
93
96
  version_requirements: !ruby/object:Gem::Requirement
94
97
  requirements:
98
+ - - ~>
99
+ - !ruby/object:Gem::Version
100
+ version: '0.0'
95
101
  - - '>='
96
102
  - !ruby/object:Gem::Version
97
103
  version: 0.0.5
@@ -99,114 +105,114 @@ dependencies:
99
105
  name: json-ld
100
106
  requirement: !ruby/object:Gem::Requirement
101
107
  requirements:
102
- - - '>='
108
+ - - ~>
103
109
  - !ruby/object:Gem::Version
104
110
  version: '1.1'
105
111
  type: :development
106
112
  prerelease: false
107
113
  version_requirements: !ruby/object:Gem::Requirement
108
114
  requirements:
109
- - - '>='
115
+ - - ~>
110
116
  - !ruby/object:Gem::Version
111
117
  version: '1.1'
112
118
  - !ruby/object:Gem::Dependency
113
119
  name: rspec
114
120
  requirement: !ruby/object:Gem::Requirement
115
121
  requirements:
116
- - - '>='
122
+ - - ~>
117
123
  - !ruby/object:Gem::Version
118
- version: 2.14.0
124
+ version: '2.14'
119
125
  type: :development
120
126
  prerelease: false
121
127
  version_requirements: !ruby/object:Gem::Requirement
122
128
  requirements:
123
- - - '>='
129
+ - - ~>
124
130
  - !ruby/object:Gem::Version
125
- version: 2.14.0
131
+ version: '2.14'
126
132
  - !ruby/object:Gem::Dependency
127
133
  name: rdf-spec
128
134
  requirement: !ruby/object:Gem::Requirement
129
135
  requirements:
130
- - - '>='
136
+ - - ~>
131
137
  - !ruby/object:Gem::Version
132
138
  version: '1.1'
133
139
  type: :development
134
140
  prerelease: false
135
141
  version_requirements: !ruby/object:Gem::Requirement
136
142
  requirements:
137
- - - '>='
143
+ - - ~>
138
144
  - !ruby/object:Gem::Version
139
145
  version: '1.1'
140
146
  - !ruby/object:Gem::Dependency
141
147
  name: rdf-turtle
142
148
  requirement: !ruby/object:Gem::Requirement
143
149
  requirements:
144
- - - '>='
150
+ - - ~>
145
151
  - !ruby/object:Gem::Version
146
152
  version: '1.1'
147
153
  type: :development
148
154
  prerelease: false
149
155
  version_requirements: !ruby/object:Gem::Requirement
150
156
  requirements:
151
- - - '>='
157
+ - - ~>
152
158
  - !ruby/object:Gem::Version
153
159
  version: '1.1'
154
160
  - !ruby/object:Gem::Dependency
155
161
  name: rdf-rdfxml
156
162
  requirement: !ruby/object:Gem::Requirement
157
163
  requirements:
158
- - - '>='
164
+ - - ~>
159
165
  - !ruby/object:Gem::Version
160
166
  version: '1.1'
161
167
  type: :development
162
168
  prerelease: false
163
169
  version_requirements: !ruby/object:Gem::Requirement
164
170
  requirements:
165
- - - '>='
171
+ - - ~>
166
172
  - !ruby/object:Gem::Version
167
173
  version: '1.1'
168
174
  - !ruby/object:Gem::Dependency
169
175
  name: rdf-isomorphic
170
176
  requirement: !ruby/object:Gem::Requirement
171
177
  requirements:
172
- - - '>='
178
+ - - ~>
173
179
  - !ruby/object:Gem::Version
174
180
  version: '1.1'
175
181
  type: :development
176
182
  prerelease: false
177
183
  version_requirements: !ruby/object:Gem::Requirement
178
184
  requirements:
179
- - - '>='
185
+ - - ~>
180
186
  - !ruby/object:Gem::Version
181
187
  version: '1.1'
182
188
  - !ruby/object:Gem::Dependency
183
189
  name: sparql
184
190
  requirement: !ruby/object:Gem::Requirement
185
191
  requirements:
186
- - - '>='
192
+ - - ~>
187
193
  - !ruby/object:Gem::Version
188
194
  version: '1.1'
189
195
  type: :development
190
196
  prerelease: false
191
197
  version_requirements: !ruby/object:Gem::Requirement
192
198
  requirements:
193
- - - '>='
199
+ - - ~>
194
200
  - !ruby/object:Gem::Version
195
201
  version: '1.1'
196
202
  - !ruby/object:Gem::Dependency
197
203
  name: yard
198
204
  requirement: !ruby/object:Gem::Requirement
199
205
  requirements:
200
- - - '>='
206
+ - - ~>
201
207
  - !ruby/object:Gem::Version
202
- version: 0.8.5
208
+ version: '0.8'
203
209
  type: :development
204
210
  prerelease: false
205
211
  version_requirements: !ruby/object:Gem::Requirement
206
212
  requirements:
207
- - - '>='
213
+ - - ~>
208
214
  - !ruby/object:Gem::Version
209
- version: 0.8.5
215
+ version: '0.8'
210
216
  description: RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library
211
217
  suite.
212
218
  email: public-rdf-ruby@w3.org
@@ -218,10 +224,12 @@ files:
218
224
  - README
219
225
  - UNLICENSE
220
226
  - VERSION
227
+ - lib/rdf/rdfa.rb
228
+ - lib/rdf/rdfa/context.rb
221
229
  - lib/rdf/rdfa/context/html.rb
222
230
  - lib/rdf/rdfa/context/xhtml.rb
223
231
  - lib/rdf/rdfa/context/xml.rb
224
- - lib/rdf/rdfa/context.rb
232
+ - lib/rdf/rdfa/expansion.rb
225
233
  - lib/rdf/rdfa/expansion/cc.rb
226
234
  - lib/rdf/rdfa/expansion/dc.rb
227
235
  - lib/rdf/rdfa/expansion/doap.rb
@@ -232,17 +240,15 @@ files:
232
240
  - lib/rdf/rdfa/expansion/skos.rb
233
241
  - lib/rdf/rdfa/expansion/skosxl.rb
234
242
  - lib/rdf/rdfa/expansion/v.rb
235
- - lib/rdf/rdfa/expansion.rb
236
243
  - lib/rdf/rdfa/format.rb
237
244
  - lib/rdf/rdfa/patches/string_hacks.rb
245
+ - lib/rdf/rdfa/reader.rb
238
246
  - lib/rdf/rdfa/reader/nokogiri.rb
239
247
  - lib/rdf/rdfa/reader/rexml.rb
240
- - lib/rdf/rdfa/reader.rb
241
248
  - lib/rdf/rdfa/version.rb
242
249
  - lib/rdf/rdfa/vocab.rb
243
- - lib/rdf/rdfa/writer/haml_templates.rb
244
250
  - lib/rdf/rdfa/writer.rb
245
- - lib/rdf/rdfa.rb
251
+ - lib/rdf/rdfa/writer/haml_templates.rb
246
252
  homepage: http://ruby-rdf.github.com/rdf-rdfa
247
253
  licenses:
248
254
  - Public Domain
@@ -263,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
269
  version: '0'
264
270
  requirements: []
265
271
  rubyforge_project: rdf-rdfa
266
- rubygems_version: 2.0.14
272
+ rubygems_version: 2.2.2
267
273
  signing_key:
268
274
  specification_version: 4
269
275
  summary: RDFa reader/writer for RDF.rb.