rdf-microdata 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +21 -45
- data/VERSION +1 -1
- data/etc/doap.html +42 -0
- data/etc/registry.json +39 -0
- data/lib/rdf/microdata.rb +0 -2
- data/lib/rdf/microdata/reader.rb +316 -193
- data/lib/rdf/microdata/reader/nokogiri.rb +232 -0
- data/lib/rdf/microdata/reader/rexml.rb +277 -0
- data/lib/rdf/microdata/vocab.rb +1 -1
- metadata +58 -21
- data/lib/rdf/microdata/extensions.rb +0 -34
data/lib/rdf/microdata/vocab.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-microdata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-11-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdf
|
17
|
-
requirement: &
|
17
|
+
requirement: &2152261200 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,21 +22,54 @@ dependencies:
|
|
22
22
|
version: 0.3.4
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2152261200
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
|
-
name:
|
28
|
-
requirement: &
|
27
|
+
name: rdf-xsd
|
28
|
+
requirement: &2152258800 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.3.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *2152258800
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: htmlentities
|
39
|
+
requirement: &2152250000 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
41
|
requirements:
|
31
42
|
- - ! '>='
|
32
43
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
44
|
+
version: 4.3.0
|
34
45
|
type: :runtime
|
35
46
|
prerelease: false
|
36
|
-
version_requirements: *
|
47
|
+
version_requirements: *2152250000
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: nokogiri
|
50
|
+
requirement: &2152248260 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.5.0
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *2152248260
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: equivalent-xml
|
61
|
+
requirement: &2152246940 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 0.2.8
|
67
|
+
type: :development
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *2152246940
|
37
70
|
- !ruby/object:Gem::Dependency
|
38
71
|
name: yard
|
39
|
-
requirement: &
|
72
|
+
requirement: &2152246140 !ruby/object:Gem::Requirement
|
40
73
|
none: false
|
41
74
|
requirements:
|
42
75
|
- - ! '>='
|
@@ -44,10 +77,10 @@ dependencies:
|
|
44
77
|
version: 0.6.0
|
45
78
|
type: :development
|
46
79
|
prerelease: false
|
47
|
-
version_requirements: *
|
80
|
+
version_requirements: *2152246140
|
48
81
|
- !ruby/object:Gem::Dependency
|
49
82
|
name: rspec
|
50
|
-
requirement: &
|
83
|
+
requirement: &2152245380 !ruby/object:Gem::Requirement
|
51
84
|
none: false
|
52
85
|
requirements:
|
53
86
|
- - ! '>='
|
@@ -55,10 +88,10 @@ dependencies:
|
|
55
88
|
version: 2.5.0
|
56
89
|
type: :development
|
57
90
|
prerelease: false
|
58
|
-
version_requirements: *
|
91
|
+
version_requirements: *2152245380
|
59
92
|
- !ruby/object:Gem::Dependency
|
60
93
|
name: rdf-spec
|
61
|
-
requirement: &
|
94
|
+
requirement: &2152244580 !ruby/object:Gem::Requirement
|
62
95
|
none: false
|
63
96
|
requirements:
|
64
97
|
- - ! '>='
|
@@ -66,21 +99,21 @@ dependencies:
|
|
66
99
|
version: 0.3.4
|
67
100
|
type: :development
|
68
101
|
prerelease: false
|
69
|
-
version_requirements: *
|
102
|
+
version_requirements: *2152244580
|
70
103
|
- !ruby/object:Gem::Dependency
|
71
|
-
name: rdf-
|
72
|
-
requirement: &
|
104
|
+
name: rdf-turtle
|
105
|
+
requirement: &2152243980 !ruby/object:Gem::Requirement
|
73
106
|
none: false
|
74
107
|
requirements:
|
75
108
|
- - ! '>='
|
76
109
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
110
|
+
version: 0.1.0
|
78
111
|
type: :development
|
79
112
|
prerelease: false
|
80
|
-
version_requirements: *
|
113
|
+
version_requirements: *2152243980
|
81
114
|
- !ruby/object:Gem::Dependency
|
82
115
|
name: rdf-isomorphic
|
83
|
-
requirement: &
|
116
|
+
requirement: &2152223460 !ruby/object:Gem::Requirement
|
84
117
|
none: false
|
85
118
|
requirements:
|
86
119
|
- - ! '>='
|
@@ -88,7 +121,7 @@ dependencies:
|
|
88
121
|
version: 0.3.4
|
89
122
|
type: :development
|
90
123
|
prerelease: false
|
91
|
-
version_requirements: *
|
124
|
+
version_requirements: *2152223460
|
92
125
|
description: Microdata reader for Ruby.
|
93
126
|
email: public-rdf-ruby@w3.org
|
94
127
|
executables: []
|
@@ -99,12 +132,15 @@ files:
|
|
99
132
|
- README
|
100
133
|
- UNLICENSE
|
101
134
|
- VERSION
|
102
|
-
- lib/rdf/microdata/extensions.rb
|
103
135
|
- lib/rdf/microdata/format.rb
|
136
|
+
- lib/rdf/microdata/reader/nokogiri.rb
|
137
|
+
- lib/rdf/microdata/reader/rexml.rb
|
104
138
|
- lib/rdf/microdata/reader.rb
|
105
139
|
- lib/rdf/microdata/version.rb
|
106
140
|
- lib/rdf/microdata/vocab.rb
|
107
141
|
- lib/rdf/microdata.rb
|
142
|
+
- etc/doap.html
|
143
|
+
- etc/registry.json
|
108
144
|
homepage: http://github.com/gkellogg/rdf-microdata
|
109
145
|
licenses:
|
110
146
|
- Public Domain
|
@@ -131,3 +167,4 @@ signing_key:
|
|
131
167
|
specification_version: 3
|
132
168
|
summary: Microdata reader for Ruby.
|
133
169
|
test_files: []
|
170
|
+
has_rdoc: false
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'nokogiri'
|
2
|
-
class Nokogiri::XML::Node
|
3
|
-
##
|
4
|
-
# Language, taken recursively from element and ancestors
|
5
|
-
def language
|
6
|
-
@lang ||= attribute('lang') ||
|
7
|
-
attributes["lang"] ||
|
8
|
-
attributes["xml:lang"] ||
|
9
|
-
(parent && parent.element? && parent.language)
|
10
|
-
end
|
11
|
-
|
12
|
-
##
|
13
|
-
# Get any xml:base in effect for this element
|
14
|
-
def base
|
15
|
-
if @base.nil?
|
16
|
-
@base = attributes['xml:base'] ||
|
17
|
-
(parent && parent.element? && parent.base) ||
|
18
|
-
false
|
19
|
-
end
|
20
|
-
|
21
|
-
@base == false ? nil : @base
|
22
|
-
end
|
23
|
-
|
24
|
-
def display_path
|
25
|
-
@display_path ||= case self
|
26
|
-
when Nokogiri::XML::Document then ""
|
27
|
-
when Nokogiri::XML::Element then parent ? "#{parent.display_path}/#{name}" : name
|
28
|
-
when Nokogiri::XML::Attr then "#{parent.display_path}@#{name}"
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class Nokogiri::XML::Document
|
34
|
-
end
|