rdf-microdata 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDZhZDYyNWExYjA1ZmM5ZmRhNWRhZmJlMDkzZmNkOTJiZjU5ZTdhYQ==
5
+ data.tar.gz: !binary |-
6
+ ZTc3MjViNWJhY2E4NzJiMzgyNjBjZGQ4NjUxNmFlNTE2NWJiODlmMA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NmJmZGYzNTI1YjhjY2NmYjdmZWY3NmNkNmYyNWU3YWU5NTY5ZjJhNDM4ZjAy
10
+ NDlmYjc2ZjU4N2M5MjU4YjgxNDI4YWE1ZmM2M2Q2NWNlZDBhODIyYjJhNmEw
11
+ ZjAyYWY5MmQ2NzhkMmRlYWI0YWFhZjQ1YjQ0ODJkYTcxOGI0MWE=
12
+ data.tar.gz: !binary |-
13
+ NjRmNDk1YTliYTI5NjhhOTk2Y2M4ZGU0NWVjZTY2OWQ5MWE2N2QyNmM4YjVm
14
+ M2Y4ZmViYjNlMDIwNjg4YzdhMmRjNDJiYmRhMmRiODIwN2UyYjkwNDM1ZjUy
15
+ YjhhZTRiZjU4N2MzZGU4NzFkZjBkNDg3MTgxNTc1ODU1YjJkM2M=
data/README CHANGED
@@ -1,8 +1,10 @@
1
1
  # RDF::Microdata reader/writer
2
- [![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-microdata)
3
2
 
4
3
  [Microdata][] parser for RDF.rb.
5
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](http://badge.fury.io/rb/rdf-microdata)
6
+ [![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-microdata)
7
+
6
8
  ## DESCRIPTION
7
9
  RDF::Microdata is a Microdata reader for Ruby using the [RDF.rb][RDF.rb] library suite.
8
10
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.2
@@ -1,3 +1,10 @@
1
+ # Attempt to load RDF::RDFa first, so that RDF::Format.for(:rdfa) is defined
2
+ begin
3
+ require 'rdf/rdfa'
4
+ rescue => LoadError
5
+ # Soft error
6
+ end
7
+
1
8
  module RDF::Microdata
2
9
  ##
3
10
  # Microdata format specification.
@@ -174,13 +174,13 @@ module RDF::Microdata
174
174
  tok = tokenize(predicateURI)
175
175
  if @properties[tok].is_a?(Hash)
176
176
  if value = @properties[tok]["equivalentProperty"]
177
- [value].flatten.each do |v|
177
+ Array(value).each do |v|
178
178
  yield RDF::Statement.new(predicateURI,
179
179
  RDF::OWL.equivalentProperty,
180
180
  RDF::URI(v))
181
181
  end
182
182
  elsif value = @properties[tok]["subPropertyOf"]
183
- [value].flatten.each do |v|
183
+ Array(value).each do |v|
184
184
  yield RDF::Statement.new(predicateURI,
185
185
  RDF::RDFS.subPropertyOf,
186
186
  RDF::URI(v))
@@ -350,6 +350,7 @@ module RDF::Microdata
350
350
  # @raise [ReaderError] Checks parameter types and raises if they are incorrect if parsing mode is _validate_.
351
351
  def add_triple(node, subject, predicate, object)
352
352
  statement = RDF::Statement.new(subject, predicate, object)
353
+ raise RDF::ReaderError, "#{statement.inspect} is inalid" if validate? && statement.invalid?
353
354
  add_debug(node) {"statement: #{RDF::NTriples.serialize(statement)}"}
354
355
  @callback.call(statement)
355
356
  end
metadata CHANGED
@@ -1,245 +1,218 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rdf-microdata
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 0
10
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Gregg
14
8
  - Kellogg
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2013-01-20 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2013-10-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rdf
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 15
30
- segments:
31
- - 1
32
- - 0
33
- version: "1.0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: 1.0.7
34
21
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: json
38
22
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 7
45
- segments:
46
- - 1
47
- - 7
48
- - 6
49
- version: 1.7.6
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 1.0.7
28
+ - !ruby/object:Gem::Dependency
29
+ name: json
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: 1.7.7
50
35
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: rdf-xsd
54
36
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 15
61
- segments:
62
- - 1
63
- - 0
64
- version: "1.0"
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: 1.7.7
42
+ - !ruby/object:Gem::Dependency
43
+ name: rdf-xsd
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '1.0'
65
49
  type: :runtime
66
- version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: htmlentities
69
50
  prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- hash: 51
76
- segments:
77
- - 4
78
- - 3
79
- - 0
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '1.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: htmlentities
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
80
62
  version: 4.3.0
81
63
  type: :runtime
82
- version_requirements: *id004
83
- - !ruby/object:Gem::Dependency
84
- name: nokogiri
85
64
  prerelease: false
86
- requirement: &id005 !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- hash: 15
92
- segments:
93
- - 1
94
- - 5
95
- - 6
96
- version: 1.5.6
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 4.3.0
70
+ - !ruby/object:Gem::Dependency
71
+ name: nokogiri
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 1.5.9
97
77
  type: :development
98
- version_requirements: *id005
99
- - !ruby/object:Gem::Dependency
100
- name: equivalent-xml
101
78
  prerelease: false
102
- requirement: &id006 !ruby/object:Gem::Requirement
103
- none: false
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- hash: 19
108
- segments:
109
- - 0
110
- - 3
111
- - 0
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: 1.5.9
84
+ - !ruby/object:Gem::Dependency
85
+ name: equivalent-xml
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
112
90
  version: 0.3.0
113
91
  type: :development
114
- version_requirements: *id006
115
- - !ruby/object:Gem::Dependency
116
- name: open-uri-cached
117
92
  prerelease: false
118
- requirement: &id007 !ruby/object:Gem::Requirement
119
- none: false
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- hash: 21
124
- segments:
125
- - 0
126
- - 0
127
- - 5
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: 0.3.0
98
+ - !ruby/object:Gem::Dependency
99
+ name: open-uri-cached
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
128
104
  version: 0.0.5
129
105
  type: :development
130
- version_requirements: *id007
131
- - !ruby/object:Gem::Dependency
132
- name: yard
133
106
  prerelease: false
134
- requirement: &id008 !ruby/object:Gem::Requirement
135
- none: false
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- hash: 57
140
- segments:
141
- - 0
142
- - 8
143
- - 3
144
- version: 0.8.3
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: 0.0.5
112
+ - !ruby/object:Gem::Dependency
113
+ name: yard
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: 0.8.5
145
119
  type: :development
146
- version_requirements: *id008
147
- - !ruby/object:Gem::Dependency
148
- name: spira
149
120
  prerelease: false
150
- requirement: &id009 !ruby/object:Gem::Requirement
151
- none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- hash: 3
156
- segments:
157
- - 0
158
- version: "0"
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 0.8.5
126
+ - !ruby/object:Gem::Dependency
127
+ name: spira
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '='
131
+ - !ruby/object:Gem::Version
132
+ version: 0.0.12
159
133
  type: :development
160
- version_requirements: *id009
161
- - !ruby/object:Gem::Dependency
162
- name: rspec
163
134
  prerelease: false
164
- requirement: &id010 !ruby/object:Gem::Requirement
165
- none: false
166
- requirements:
167
- - - ">="
168
- - !ruby/object:Gem::Version
169
- hash: 63
170
- segments:
171
- - 2
172
- - 12
173
- - 0
174
- version: 2.12.0
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '='
138
+ - !ruby/object:Gem::Version
139
+ version: 0.0.12
140
+ - !ruby/object:Gem::Dependency
141
+ name: rspec
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ! '>='
145
+ - !ruby/object:Gem::Version
146
+ version: 2.14.0
175
147
  type: :development
176
- version_requirements: *id010
177
- - !ruby/object:Gem::Dependency
178
- name: rdf-spec
179
148
  prerelease: false
180
- requirement: &id011 !ruby/object:Gem::Requirement
181
- none: false
182
- requirements:
183
- - - ">="
184
- - !ruby/object:Gem::Version
185
- hash: 15
186
- segments:
187
- - 1
188
- - 0
189
- version: "1.0"
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: 2.14.0
154
+ - !ruby/object:Gem::Dependency
155
+ name: rdf-spec
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '1.0'
190
161
  type: :development
191
- version_requirements: *id011
192
- - !ruby/object:Gem::Dependency
193
- name: rdf-rdfa
194
162
  prerelease: false
195
- requirement: &id012 !ruby/object:Gem::Requirement
196
- none: false
197
- requirements:
198
- - - ">="
199
- - !ruby/object:Gem::Version
200
- hash: 3
201
- segments:
202
- - 0
203
- version: "0"
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '1.0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: rdf-rdfa
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
204
175
  type: :development
205
- version_requirements: *id012
206
- - !ruby/object:Gem::Dependency
207
- name: rdf-turtle
208
176
  prerelease: false
209
- requirement: &id013 !ruby/object:Gem::Requirement
210
- none: false
211
- requirements:
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- hash: 3
215
- segments:
216
- - 0
217
- version: "0"
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: rdf-turtle
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ! '>='
187
+ - !ruby/object:Gem::Version
188
+ version: 1.0.7
218
189
  type: :development
219
- version_requirements: *id013
220
- - !ruby/object:Gem::Dependency
221
- name: rdf-isomorphic
222
190
  prerelease: false
223
- requirement: &id014 !ruby/object:Gem::Requirement
224
- none: false
225
- requirements:
226
- - - ">="
227
- - !ruby/object:Gem::Version
228
- hash: 3
229
- segments:
230
- - 0
231
- version: "0"
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ! '>='
194
+ - !ruby/object:Gem::Version
195
+ version: 1.0.7
196
+ - !ruby/object:Gem::Dependency
197
+ name: rdf-isomorphic
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ! '>='
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
232
203
  type: :development
233
- version_requirements: *id014
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ! '>='
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
234
210
  description: Microdata reader for Ruby.
235
211
  email: public-rdf-ruby@w3.org
236
212
  executables: []
237
-
238
213
  extensions: []
239
-
240
214
  extra_rdoc_files: []
241
-
242
- files:
215
+ files:
243
216
  - AUTHORS
244
217
  - README
245
218
  - UNLICENSE
@@ -254,41 +227,29 @@ files:
254
227
  - lib/rdf/microdata.rb
255
228
  - etc/doap.html
256
229
  - etc/registry.json
257
- homepage: http://github.com/ruby-rdf/rdf-microdata
258
- licenses:
230
+ homepage: http://ruby-rdf.github.com/rdf-microdata
231
+ licenses:
259
232
  - Public Domain
233
+ metadata: {}
260
234
  post_install_message:
261
235
  rdoc_options: []
262
-
263
- require_paths:
236
+ require_paths:
264
237
  - lib
265
- required_ruby_version: !ruby/object:Gem::Requirement
266
- none: false
267
- requirements:
268
- - - ">="
269
- - !ruby/object:Gem::Version
270
- hash: 53
271
- segments:
272
- - 1
273
- - 8
274
- - 1
238
+ required_ruby_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ! '>='
241
+ - !ruby/object:Gem::Version
275
242
  version: 1.8.1
276
- required_rubygems_version: !ruby/object:Gem::Requirement
277
- none: false
278
- requirements:
279
- - - ">="
280
- - !ruby/object:Gem::Version
281
- hash: 3
282
- segments:
283
- - 0
284
- version: "0"
243
+ required_rubygems_version: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - ! '>='
246
+ - !ruby/object:Gem::Version
247
+ version: '0'
285
248
  requirements: []
286
-
287
249
  rubyforge_project: rdf-microdata
288
- rubygems_version: 1.8.24
250
+ rubygems_version: 2.0.5
289
251
  signing_key:
290
- specification_version: 3
252
+ specification_version: 4
291
253
  summary: Microdata reader for Ruby.
292
254
  test_files: []
293
-
294
255
  has_rdoc: false