rdf-rdfxml 1.1.1 → 1.1.2

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: 8ae34a557269a1403a1ef6900eb26a3680881e0e
4
- data.tar.gz: bdbe47e23fae19a630c8363d49833b0b77be538d
3
+ metadata.gz: 8a008b5ac397b0ac5cc342613446159218c29f9d
4
+ data.tar.gz: 36447993bfa7903128d7a7c34a899c74fae497ca
5
5
  SHA512:
6
- metadata.gz: 43fa7c059e23d91dec2d6677b8ffc64f7928a0f1152ff589fe95b49aa5d6b094caa6cc2df0dd22cae48c12216280e4b2efcb3440ac200db0bbf3ff634399cae3
7
- data.tar.gz: e77b97612430b000e073411e170b230d45f151444fd6ddce7b1292800361e6daafd303fa396503dd4d96bcb59efb48240219f001787a86a8e410a44e47229d1e
6
+ metadata.gz: e666105b18bbeea340dc20da88f0cc5cf4526a6462612c576c8dfca2506062b4dc73c29b871d1a3a68127e73ab7f5b02b8412a7c6498e444a5051dc931ff3b39
7
+ data.tar.gz: bd87404140762049fc29b21d49373e5d408b9f679ada3ecc9c696652144f4b13e19f48702a5a3e5c9dfd5cb72d24554611fbf4cddbf21c7d18d4161720b4e0bf
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
@@ -307,13 +307,26 @@ module RDF::RDFXML
307
307
  # Perform any preprocessing of statements required
308
308
  # @return [ignored]
309
309
  def preprocess
310
+ # Load defined prefixes
311
+ (@options[:prefixes] || {}).each_pair do |k, v|
312
+ @uri_to_prefix[v.to_s] = k
313
+ end
314
+ @options[:prefixes] = {} # Will define actual used when matched
315
+
316
+ prefix(:rdf, RDF.to_uri)
317
+ @uri_to_prefix[RDF.to_uri.to_s] = :rdf
318
+ if base_uri || @options[:lang]
319
+ prefix(:xml, RDF::XML)
320
+ @uri_to_prefix[RDF::XML.to_s] = :xml
321
+ end
322
+
310
323
  if @options[:default_namespace]
324
+ @uri_to_prefix[@options[:default_namespace]] = nil
311
325
  prefix(nil, @options[:default_namespace])
312
326
  end
313
-
314
- super
315
- prefix(:rdf, RDF.to_uri)
316
- prefix(:xml, RDF::XML) if base_uri || @options[:lang]
327
+
328
+ # Process each statement to establish CURIEs and Terms
329
+ @graph.each {|statement| preprocess_statement(statement)}
317
330
  end
318
331
 
319
332
  ##
@@ -30,7 +30,7 @@ module RDF::RDFXML
30
30
  - (types.unshift(first_type); first_type = nil) if first_type && (first_type.include?('/') || first_type.start_with?('_:'))
31
31
  - first_type ||= get_qname(RDF.Description)
32
32
  - first_type = first_type[1..-1] if first_type.to_s.start_with?(":")
33
- - attr_props = attr_props.merge(get_qname(RDF.nodeID) => subject.id) if subject.node? && ref_count(subject) > 1
33
+ - attr_props = attr_props.merge(get_qname(RDF.nodeID) => subject.id) if subject.node? && ref_count(subject) >= 1
34
34
  - attr_props = attr_props.merge(get_qname(RDF.about) => relativize(subject)) if subject.uri?
35
35
  - haml_tag(first_type, attr_props) do
36
36
  - types.each do |type|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-rdfxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-25 00:00:00.000000000 Z
12
+ date: 2014-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -18,6 +18,9 @@ dependencies:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.1'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.1.6
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -25,6 +28,9 @@ dependencies:
25
28
  - - "~>"
26
29
  - !ruby/object:Gem::Version
27
30
  version: '1.1'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.6
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: rdf-rdfa
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -32,6 +38,9 @@ dependencies:
32
38
  - - "~>"
33
39
  - !ruby/object:Gem::Version
34
40
  version: '1.1'
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.1.4.1
35
44
  type: :runtime
36
45
  prerelease: false
37
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,6 +48,9 @@ dependencies:
39
48
  - - "~>"
40
49
  - !ruby/object:Gem::Version
41
50
  version: '1.1'
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.1.4.1
42
54
  - !ruby/object:Gem::Dependency
43
55
  name: rdf-xsd
44
56
  requirement: !ruby/object:Gem::Requirement