rdf-rdfxml 1.1.0 → 1.1.0.1

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: 6998ff50cd28297520f5141f5b4bd06afc7208eb
4
- data.tar.gz: 6b446b7d8d586debd5063f9a8e5c728c4f4a7e9e
3
+ metadata.gz: 797c847e7d56536c343b623f5ae6e36f6c555a47
4
+ data.tar.gz: 9cda7caa4d27971472bed4a1dbcbec0cff6e46c6
5
5
  SHA512:
6
- metadata.gz: 011b3251a3f25d692dc46bca35cfab75982e223b87904c6aac4d48628e7b9cace7afac59377a696a3921be52f60003a0f26b0581a3b1f4b57eb29c89c714a09e
7
- data.tar.gz: 32ee1dc0dda497897e6e9d3aa1d1abe4030af232574233297d12f626d4c8d59fdf476cf2cca311d5bd9432f7909d507a009bf166c45b0c1b2160b2a3b525ed54
6
+ metadata.gz: 9e65a1fab2cd0a3af7b25a467105bb47fde74dbc27ec4206a317c61095f15de208c07cd9140bf13caa1195006653dff2f6c63a18f02da674756407a8e9f1d5ec
7
+ data.tar.gz: 827174e8a4263365f1a760fd00784ca57f264d280e26a209a0b0dbe783d7656a1afb62f070359e6460cd1642d649fad17ab37e49fe3aac524425f96abd8da8d9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.0.1
@@ -3,7 +3,7 @@ require 'rdf'
3
3
 
4
4
  module RDF
5
5
  ##
6
- # **`RDF::RDFXML`** is an RDF/XML plugin for RDF.rb.
6
+ # **`RDF::RDFXML`** is an RDF/XML extension for RDF.rb.
7
7
  #
8
8
  # @example Requiring the `RDF::RDFXML` module
9
9
  # require 'rdf/rdfxml'
@@ -179,42 +179,45 @@ module RDF::RDFXML
179
179
  # @yieldparam [RDF::Statement] statement
180
180
  # @return [void]
181
181
  def each_statement(&block)
182
- # Block called from add_statement
183
- @callback = block
182
+ if block_given?
183
+ # Block called from add_statement
184
+ @callback = block
184
185
 
185
- raise "root must be a proxy not a #{root.class}" unless root.is_a?(@implementation::NodeProxy)
186
+ raise "root must be a proxy not a #{root.class}" unless root.is_a?(@implementation::NodeProxy)
186
187
 
187
- add_debug(root, "base_uri: #{base_uri.inspect}")
188
+ add_debug(root, "base_uri: #{base_uri.inspect}")
188
189
 
189
- rdf_nodes = root.xpath("//rdf:RDF", "rdf" => RDF.to_uri.to_s)
190
- if rdf_nodes.length == 0
191
- # If none found, root element may be processed as an RDF Node
190
+ rdf_nodes = root.xpath("//rdf:RDF", "rdf" => RDF.to_uri.to_s)
191
+ if rdf_nodes.length == 0
192
+ # If none found, root element may be processed as an RDF Node
192
193
 
193
- ec = EvaluationContext.new(base_uri, root, @graph) do |prefix, value|
194
- prefix(prefix, value)
195
- end
196
-
197
- nodeElement(root, ec)
198
- else
199
- rdf_nodes.each do |node|
200
- raise "node must be a proxy not a #{node.class}" unless node.is_a?(@implementation::NodeProxy)
201
- # XXX Skip this element if it's contained within another rdf:RDF element
202
-
203
- # Extract base, lang and namespaces from parents to create proper evaluation context
204
- ec = EvaluationContext.new(base_uri, nil, @graph)
205
- ec.extract_from_ancestors(node) do |prefix, value|
194
+ ec = EvaluationContext.new(base_uri, root, @graph) do |prefix, value|
206
195
  prefix(prefix, value)
207
196
  end
208
- node.children.each {|el|
209
- next unless el.elem?
210
- raise "el must be a proxy not a #{el.class}" unless el.is_a?(@implementation::NodeProxy)
211
- new_ec = ec.clone(el) do |prefix, value|
197
+
198
+ nodeElement(root, ec)
199
+ else
200
+ rdf_nodes.each do |node|
201
+ raise "node must be a proxy not a #{node.class}" unless node.is_a?(@implementation::NodeProxy)
202
+ # XXX Skip this element if it's contained within another rdf:RDF element
203
+
204
+ # Extract base, lang and namespaces from parents to create proper evaluation context
205
+ ec = EvaluationContext.new(base_uri, nil, @graph)
206
+ ec.extract_from_ancestors(node) do |prefix, value|
212
207
  prefix(prefix, value)
213
208
  end
214
- nodeElement(el, new_ec)
215
- }
209
+ node.children.each {|el|
210
+ next unless el.elem?
211
+ raise "el must be a proxy not a #{el.class}" unless el.is_a?(@implementation::NodeProxy)
212
+ new_ec = ec.clone(el) do |prefix, value|
213
+ prefix(prefix, value)
214
+ end
215
+ nodeElement(el, new_ec)
216
+ }
217
+ end
216
218
  end
217
219
  end
220
+ enum_for(:each_statement)
218
221
  end
219
222
 
220
223
  ##
@@ -226,9 +229,12 @@ module RDF::RDFXML
226
229
  # @yieldparam [RDF::Value] object
227
230
  # @return [void]
228
231
  def each_triple(&block)
229
- each_statement do |statement|
230
- block.call(*statement.to_triple)
232
+ if block_given?
233
+ each_statement do |statement|
234
+ block.call(*statement.to_triple)
235
+ end
231
236
  end
237
+ enum_for(:each_triple)
232
238
  end
233
239
 
234
240
  private
metadata CHANGED
@@ -1,225 +1,197 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-rdfxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.0.1
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: 2013-11-13 00:00:00.000000000 Z
12
+ date: 2014-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '1.1'
21
- type: :runtime
22
- prerelease: false
23
16
  version_requirements: !ruby/object:Gem::Requirement
24
17
  requirements:
25
- - - '>='
18
+ - - ~>
26
19
  - !ruby/object:Gem::Version
27
20
  version: '1.1'
28
- - !ruby/object:Gem::Dependency
29
- name: rdf-rdfa
30
21
  requirement: !ruby/object:Gem::Requirement
31
22
  requirements:
32
- - - '>='
23
+ - - ~>
33
24
  - !ruby/object:Gem::Version
34
25
  version: '1.1'
35
- type: :runtime
36
26
  prerelease: false
27
+ type: :runtime
28
+ - !ruby/object:Gem::Dependency
29
+ name: rdf-rdfa
37
30
  version_requirements: !ruby/object:Gem::Requirement
38
31
  requirements:
39
- - - '>='
32
+ - - ~>
40
33
  - !ruby/object:Gem::Version
41
34
  version: '1.1'
42
- - !ruby/object:Gem::Dependency
43
- name: rdf-xsd
44
35
  requirement: !ruby/object:Gem::Requirement
45
36
  requirements:
46
- - - '>='
37
+ - - ~>
47
38
  - !ruby/object:Gem::Version
48
39
  version: '1.1'
49
- type: :runtime
50
40
  prerelease: false
41
+ type: :runtime
42
+ - !ruby/object:Gem::Dependency
43
+ name: rdf-xsd
51
44
  version_requirements: !ruby/object:Gem::Requirement
52
45
  requirements:
53
- - - '>='
46
+ - - ~>
54
47
  - !ruby/object:Gem::Version
55
48
  version: '1.1'
56
- - !ruby/object:Gem::Dependency
57
- name: nokogiri
58
49
  requirement: !ruby/object:Gem::Requirement
59
50
  requirements:
60
- - - '>='
51
+ - - ~>
61
52
  - !ruby/object:Gem::Version
62
- version: 1.6.0
63
- type: :development
53
+ version: '1.1'
64
54
  prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - '>='
68
- - !ruby/object:Gem::Version
69
- version: 1.6.0
55
+ type: :runtime
70
56
  - !ruby/object:Gem::Dependency
71
57
  name: equivalent-xml
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - '>='
75
- - !ruby/object:Gem::Version
76
- version: 0.2.8
77
- type: :development
78
- prerelease: false
79
58
  version_requirements: !ruby/object:Gem::Requirement
80
59
  requirements:
81
- - - '>='
60
+ - - ~>
82
61
  - !ruby/object:Gem::Version
83
- version: 0.2.8
84
- - !ruby/object:Gem::Dependency
85
- name: open-uri-cached
62
+ version: '0.2'
86
63
  requirement: !ruby/object:Gem::Requirement
87
64
  requirements:
88
- - - '>='
65
+ - - ~>
89
66
  - !ruby/object:Gem::Version
90
- version: 0.0.5
91
- type: :development
67
+ version: '0.2'
92
68
  prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - '>='
96
- - !ruby/object:Gem::Version
97
- version: 0.0.5
69
+ type: :development
98
70
  - !ruby/object:Gem::Dependency
99
71
  name: spira
100
- requirement: !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
101
73
  requirements:
102
74
  - - '='
103
75
  - !ruby/object:Gem::Version
104
76
  version: 0.0.12
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
77
+ requirement: !ruby/object:Gem::Requirement
108
78
  requirements:
109
79
  - - '='
110
80
  - !ruby/object:Gem::Version
111
81
  version: 0.0.12
82
+ prerelease: false
83
+ type: :development
112
84
  - !ruby/object:Gem::Dependency
113
85
  name: json-ld
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
86
  version_requirements: !ruby/object:Gem::Requirement
122
87
  requirements:
123
- - - '>='
88
+ - - ~>
124
89
  - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: rspec
90
+ version: '1.1'
128
91
  requirement: !ruby/object:Gem::Requirement
129
92
  requirements:
130
- - - '>='
93
+ - - ~>
131
94
  - !ruby/object:Gem::Version
132
- version: 2.12.0
133
- type: :development
95
+ version: '1.1'
134
96
  prerelease: false
97
+ type: :development
98
+ - !ruby/object:Gem::Dependency
99
+ name: rspec
135
100
  version_requirements: !ruby/object:Gem::Requirement
136
101
  requirements:
137
- - - '>='
102
+ - - ~>
138
103
  - !ruby/object:Gem::Version
139
- version: 2.12.0
140
- - !ruby/object:Gem::Dependency
141
- name: rdf-isomorphic
104
+ version: '2.14'
142
105
  requirement: !ruby/object:Gem::Requirement
143
106
  requirements:
144
- - - '>='
107
+ - - ~>
145
108
  - !ruby/object:Gem::Version
146
- version: '0'
147
- type: :development
109
+ version: '2.14'
148
110
  prerelease: false
111
+ type: :development
112
+ - !ruby/object:Gem::Dependency
113
+ name: rdf-isomorphic
149
114
  version_requirements: !ruby/object:Gem::Requirement
150
115
  requirements:
151
- - - '>='
116
+ - - ~>
152
117
  - !ruby/object:Gem::Version
153
- version: '0'
154
- - !ruby/object:Gem::Dependency
155
- name: rdf-turtle
118
+ version: '1.1'
156
119
  requirement: !ruby/object:Gem::Requirement
157
120
  requirements:
158
- - - '>='
121
+ - - ~>
159
122
  - !ruby/object:Gem::Version
160
123
  version: '1.1'
161
- type: :development
162
124
  prerelease: false
125
+ type: :development
126
+ - !ruby/object:Gem::Dependency
127
+ name: rdf-turtle
163
128
  version_requirements: !ruby/object:Gem::Requirement
164
129
  requirements:
165
- - - '>='
130
+ - - ~>
166
131
  - !ruby/object:Gem::Version
167
132
  version: '1.1'
168
- - !ruby/object:Gem::Dependency
169
- name: rdf-spec
170
133
  requirement: !ruby/object:Gem::Requirement
171
134
  requirements:
172
- - - '>='
135
+ - - ~>
173
136
  - !ruby/object:Gem::Version
174
137
  version: '1.1'
175
- type: :development
176
138
  prerelease: false
139
+ type: :development
140
+ - !ruby/object:Gem::Dependency
141
+ name: rdf-spec
177
142
  version_requirements: !ruby/object:Gem::Requirement
178
143
  requirements:
179
- - - '>='
144
+ - - ~>
180
145
  - !ruby/object:Gem::Version
181
146
  version: '1.1'
182
- - !ruby/object:Gem::Dependency
183
- name: yard
184
147
  requirement: !ruby/object:Gem::Requirement
185
148
  requirements:
186
- - - '>='
149
+ - - ~>
187
150
  - !ruby/object:Gem::Version
188
- version: 0.8.5
189
- type: :development
151
+ version: '1.1'
190
152
  prerelease: false
153
+ type: :development
154
+ - !ruby/object:Gem::Dependency
155
+ name: yard
191
156
  version_requirements: !ruby/object:Gem::Requirement
192
157
  requirements:
193
- - - '>='
158
+ - - ~>
159
+ - !ruby/object:Gem::Version
160
+ version: '0.8'
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ~>
194
164
  - !ruby/object:Gem::Version
195
- version: 0.8.5
165
+ version: '0.8'
166
+ prerelease: false
167
+ type: :development
196
168
  description: RDF::RDFXML is an RDF/XML reader and writer for the RDF.rb library suite.
197
169
  email: public-rdf-ruby@w3.org
198
170
  executables: []
199
171
  extensions: []
200
172
  extra_rdoc_files: []
201
173
  files:
202
- - README.md
203
- - History.md
204
174
  - AUTHORS
205
175
  - CONTRIBUTORS
206
- - VERSION
176
+ - History.md
177
+ - README.md
207
178
  - UNLICENSE
179
+ - VERSION
180
+ - lib/rdf/rdfxml.rb
208
181
  - lib/rdf/rdfxml/format.rb
209
182
  - lib/rdf/rdfxml/patches/nokogiri_hacks.rb
183
+ - lib/rdf/rdfxml/reader.rb
210
184
  - lib/rdf/rdfxml/reader/nokogiri.rb
211
185
  - lib/rdf/rdfxml/reader/rexml.rb
212
- - lib/rdf/rdfxml/reader.rb
213
186
  - lib/rdf/rdfxml/version.rb
214
187
  - lib/rdf/rdfxml/vocab.rb
215
- - lib/rdf/rdfxml/writer/haml_templates.rb
216
188
  - lib/rdf/rdfxml/writer.rb
217
- - lib/rdf/rdfxml.rb
189
+ - lib/rdf/rdfxml/writer/haml_templates.rb
218
190
  homepage: http://ruby-rdf.github.com/rdf-rdfxml
219
191
  licenses:
220
192
  - Public Domain
221
193
  metadata: {}
222
- post_install_message:
194
+ post_install_message:
223
195
  rdoc_options: []
224
196
  require_paths:
225
197
  - lib
@@ -235,8 +207,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
207
  version: '0'
236
208
  requirements: []
237
209
  rubyforge_project: rdf-rdfxml
238
- rubygems_version: 2.1.11
239
- signing_key:
210
+ rubygems_version: 2.2.2
211
+ signing_key:
240
212
  specification_version: 4
241
213
  summary: RDF/XML reader/writer for RDF.rb.
242
214
  test_files: []