rdfobjects 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -358,9 +358,9 @@ module RDFObject
358
358
  if !@hierarchy.empty? && @hierarchy.last[:predicate]
359
359
  self.current_resource.relate(self.current_predicate, layer[:resource])
360
360
  end
361
- elsif attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#resource"] or
361
+ elsif attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#resource"] or attributes["http://purl.org/rss/1.0/resource"] or
362
362
  (attributes['http://www.w3.org/1999/02/22-rdf-syntax-ns#nodeID'] && @hierarchy.length > 1 && @hierarchy.last[:predicate].nil?)
363
- res = attributes['http://www.w3.org/1999/02/22-rdf-syntax-ns#resource'] || attributes['http://www.w3.org/1999/02/22-rdf-syntax-ns#nodeID']
363
+ res = attributes['http://www.w3.org/1999/02/22-rdf-syntax-ns#resource'] || attributes["http://purl.org/rss/1.0/resource"] || attributes['http://www.w3.org/1999/02/22-rdf-syntax-ns#nodeID']
364
364
  self.current_resource.assert("#{uri}#{name}", @collection.find_or_create(sanitize_uri(res)))
365
365
  layer[:predicate] = layer[:name]
366
366
  else
@@ -273,9 +273,8 @@ module RDFObject
273
273
 
274
274
  class BlankNode < OpenStruct
275
275
  include RDFObject::Node
276
- require 'digest/md5'
277
276
  def initialize(node_id = nil)
278
- super(:node_id=>sanitize_bnode_id(node_id||Digest::MD5.hexdigest(self.object_id.to_s + "/" + DateTime.now.to_s).to_s))
277
+ super(:node_id=>sanitize_bnode_id(node_id||"o#{object_id}"))
279
278
  end
280
279
 
281
280
  def describe; end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdfobjects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ hash: 53
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 11
9
+ - 3
10
+ version: 0.11.3
5
11
  platform: ruby
6
12
  authors:
7
13
  - Ross Singer
@@ -9,59 +15,79 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-06-11 00:00:00 -04:00
18
+ date: 2010-06-16 00:00:00 -04:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: nokogiri
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
23
32
  version: "0"
24
- version:
33
+ type: :runtime
34
+ version_requirements: *id001
25
35
  - !ruby/object:Gem::Dependency
26
36
  name: curies
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
30
40
  requirements:
31
41
  - - ">="
32
42
  - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
33
46
  version: "0"
34
- version:
47
+ type: :runtime
48
+ version_requirements: *id002
35
49
  - !ruby/object:Gem::Dependency
36
50
  name: addressable
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
40
54
  requirements:
41
55
  - - ">="
42
56
  - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
43
60
  version: "0"
44
- version:
61
+ type: :runtime
62
+ version_requirements: *id003
45
63
  - !ruby/object:Gem::Dependency
46
64
  name: rdf
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
50
68
  requirements:
51
69
  - - ">="
52
70
  - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
53
74
  version: "0"
54
- version:
75
+ type: :runtime
76
+ version_requirements: *id004
55
77
  - !ruby/object:Gem::Dependency
56
78
  name: rdfa_parser
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
81
+ none: false
60
82
  requirements:
61
83
  - - ">="
62
84
  - !ruby/object:Gem::Version
85
+ hash: 3
86
+ segments:
87
+ - 0
63
88
  version: "0"
64
- version:
89
+ type: :runtime
90
+ version_requirements: *id005
65
91
  description: RDFObjects are intended to simplify working with RDF data by providing a (more) Ruby-like interface to resources (thanks to OpenStruct).
66
92
  email: rossfsinger@gmail.com
67
93
  executables: []
@@ -95,21 +121,27 @@ rdoc_options:
95
121
  require_paths:
96
122
  - lib
97
123
  required_ruby_version: !ruby/object:Gem::Requirement
124
+ none: false
98
125
  requirements:
99
126
  - - ">="
100
127
  - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
101
131
  version: "0"
102
- version:
103
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
+ none: false
104
134
  requirements:
105
135
  - - ">="
106
136
  - !ruby/object:Gem::Version
137
+ hash: 3
138
+ segments:
139
+ - 0
107
140
  version: "0"
108
- version:
109
141
  requirements:
110
142
  - json, json_pure or json-ruby required for parsing RDF/JSON
111
143
  rubyforge_project:
112
- rubygems_version: 1.3.5
144
+ rubygems_version: 1.3.7
113
145
  signing_key:
114
146
  specification_version: 3
115
147
  summary: A DSL for working with RDF resources.