rdf-rdfa 0.3.1.1 → 0.3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +4 -0
- data/Rakefile +6 -5
- data/VERSION +1 -1
- data/lib/rdf/rdfa/format.rb +40 -0
- data/rdf-rdfa.gemspec +20 -17
- data/spec/rdfa_reader_spec.rb +18 -1
- metadata +24 -13
data/History.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 0.3.1.2
|
2
|
+
* Assert :html and xhtml as a format types (by creating RDF::RDFa::HTML/XHTML as a sub-classs of Format that uses RDFa::Reader/Writer)
|
3
|
+
* Added :svg format, image/svg+xml and .svg as looks for RDFa parser as well.
|
4
|
+
|
1
5
|
### 0.3.1
|
2
6
|
* Bug fix relating to datatypes in literals being ignored.
|
3
7
|
* Bug fix parsing non-RDFa profiles to ensure they don't cause processing to terminate (or recurse).
|
data/Rakefile
CHANGED
@@ -13,12 +13,13 @@ begin
|
|
13
13
|
gemspec.email = "gregg@kellogg-assoc.com"
|
14
14
|
gemspec.homepage = "http://github.com/gkellogg/rdf-rdfa"
|
15
15
|
gemspec.authors = ["Gregg Kellogg"]
|
16
|
-
gemspec.add_dependency('rdf', '>= 0.3.
|
16
|
+
gemspec.add_dependency('rdf', '>= 0.3.1')
|
17
17
|
gemspec.add_dependency('nokogiri', '>= 1.3.3')
|
18
|
-
gemspec.add_development_dependency('
|
19
|
-
gemspec.add_development_dependency('
|
20
|
-
gemspec.add_development_dependency('rdf-
|
21
|
-
gemspec.add_development_dependency('rdf-
|
18
|
+
gemspec.add_development_dependency('spira', '>= 0.0.12')
|
19
|
+
gemspec.add_development_dependency('rspec', '>= 2.5.0')
|
20
|
+
gemspec.add_development_dependency('rdf-spec', '>= 0.3.1')
|
21
|
+
gemspec.add_development_dependency('rdf-rdfxml', '>= 0.3.1')
|
22
|
+
gemspec.add_development_dependency('rdf-isomorphic', '>= 0.3.4')
|
22
23
|
gemspec.add_development_dependency('yard')
|
23
24
|
gemspec.extra_rdoc_files = %w(README.md History.md AUTHORS CONTRIBUTORS)
|
24
25
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.1.
|
1
|
+
0.3.1.2
|
data/lib/rdf/rdfa/format.rb
CHANGED
@@ -20,9 +20,49 @@ module RDF::RDFa
|
|
20
20
|
class Format < RDF::Format
|
21
21
|
content_type 'text/html', :extension => :html
|
22
22
|
content_type 'application/xhtml+xml', :extension => :xhtml
|
23
|
+
content_type 'image/svg+xml', :extension => :svg
|
23
24
|
content_encoding 'utf-8'
|
24
25
|
|
25
26
|
reader { RDF::RDFa::Reader }
|
26
27
|
XMLNS = 'http://www.w3.org/1999/xhtml' # FIXME: This or XHV or none at all?
|
27
28
|
end
|
29
|
+
|
30
|
+
# Aliases for RDFa::Format
|
31
|
+
#
|
32
|
+
# This allows the following:
|
33
|
+
#
|
34
|
+
# @example Obtaining an HTML format class
|
35
|
+
# RDF::Format.for(:html) # RDF::RDFa::HTML
|
36
|
+
# RDF::Format.for(:html).reader # RDF::RDFa::Reader
|
37
|
+
# RDF::Format.for(:html).writer # RDF::RDFa::Writer
|
38
|
+
class HTML < RDF::Format
|
39
|
+
reader { RDF::RDFa::Reader }
|
40
|
+
writer { RDF::RDFa::Writer }
|
41
|
+
end
|
42
|
+
|
43
|
+
# Aliases for RDFa::Format
|
44
|
+
#
|
45
|
+
# This allows the following:
|
46
|
+
#
|
47
|
+
# @example Obtaining an HTML format class
|
48
|
+
# RDF::Format.for(:xhtml) # RDF::RDFa::XHTML
|
49
|
+
# RDF::Format.for(:xhtml).reader # RDF::RDFa::Reader
|
50
|
+
# RDF::Format.for(:xhtml).writer # RDF::RDFa::Writer
|
51
|
+
class XHTML < RDF::Format
|
52
|
+
reader { RDF::RDFa::Reader }
|
53
|
+
writer { RDF::RDFa::Writer }
|
54
|
+
end
|
55
|
+
|
56
|
+
# Aliases for RDFa::Format
|
57
|
+
#
|
58
|
+
# This allows the following:
|
59
|
+
#
|
60
|
+
# @example Obtaining an HTML format class
|
61
|
+
# RDF::Format.for(:svg) # RDF::RDFa::SVG
|
62
|
+
# RDF::Format.for(:svg).reader # RDF::RDFa::Reader
|
63
|
+
# RDF::Format.for(:svg).writer # RDF::RDFa::Writer
|
64
|
+
class SVG < RDF::Format
|
65
|
+
reader { RDF::RDFa::Reader }
|
66
|
+
writer { RDF::RDFa::Writer }
|
67
|
+
end
|
28
68
|
end
|
data/rdf-rdfa.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rdf-rdfa}
|
8
|
-
s.version = "0.3.1.
|
8
|
+
s.version = "0.3.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Gregg Kellogg"]
|
12
|
-
s.date = %q{2011-02-
|
12
|
+
s.date = %q{2011-02-18}
|
13
13
|
s.description = %q{ RDF::RDFa is an RDFa reader for Ruby using the RDF.rb library suite.
|
14
14
|
}
|
15
15
|
s.email = %q{gregg@kellogg-assoc.com}
|
@@ -77,29 +77,32 @@ Gem::Specification.new do |s|
|
|
77
77
|
s.specification_version = 3
|
78
78
|
|
79
79
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
80
|
-
s.add_runtime_dependency(%q<rdf>, [">= 0.3.
|
80
|
+
s.add_runtime_dependency(%q<rdf>, [">= 0.3.1"])
|
81
81
|
s.add_runtime_dependency(%q<nokogiri>, [">= 1.3.3"])
|
82
|
-
s.add_development_dependency(%q<
|
83
|
-
s.add_development_dependency(%q<
|
84
|
-
s.add_development_dependency(%q<rdf-
|
85
|
-
s.add_development_dependency(%q<rdf-
|
82
|
+
s.add_development_dependency(%q<spira>, [">= 0.0.12"])
|
83
|
+
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
|
84
|
+
s.add_development_dependency(%q<rdf-spec>, [">= 0.3.1"])
|
85
|
+
s.add_development_dependency(%q<rdf-rdfxml>, [">= 0.3.1"])
|
86
|
+
s.add_development_dependency(%q<rdf-isomorphic>, [">= 0.3.4"])
|
86
87
|
s.add_development_dependency(%q<yard>, [">= 0"])
|
87
88
|
else
|
88
|
-
s.add_dependency(%q<rdf>, [">= 0.3.
|
89
|
+
s.add_dependency(%q<rdf>, [">= 0.3.1"])
|
89
90
|
s.add_dependency(%q<nokogiri>, [">= 1.3.3"])
|
90
|
-
s.add_dependency(%q<
|
91
|
-
s.add_dependency(%q<
|
92
|
-
s.add_dependency(%q<rdf-
|
93
|
-
s.add_dependency(%q<rdf-
|
91
|
+
s.add_dependency(%q<spira>, [">= 0.0.12"])
|
92
|
+
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
93
|
+
s.add_dependency(%q<rdf-spec>, [">= 0.3.1"])
|
94
|
+
s.add_dependency(%q<rdf-rdfxml>, [">= 0.3.1"])
|
95
|
+
s.add_dependency(%q<rdf-isomorphic>, [">= 0.3.4"])
|
94
96
|
s.add_dependency(%q<yard>, [">= 0"])
|
95
97
|
end
|
96
98
|
else
|
97
|
-
s.add_dependency(%q<rdf>, [">= 0.3.
|
99
|
+
s.add_dependency(%q<rdf>, [">= 0.3.1"])
|
98
100
|
s.add_dependency(%q<nokogiri>, [">= 1.3.3"])
|
99
|
-
s.add_dependency(%q<
|
100
|
-
s.add_dependency(%q<
|
101
|
-
s.add_dependency(%q<rdf-
|
102
|
-
s.add_dependency(%q<rdf-
|
101
|
+
s.add_dependency(%q<spira>, [">= 0.0.12"])
|
102
|
+
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
103
|
+
s.add_dependency(%q<rdf-spec>, [">= 0.3.1"])
|
104
|
+
s.add_dependency(%q<rdf-rdfxml>, [">= 0.3.1"])
|
105
|
+
s.add_dependency(%q<rdf-isomorphic>, [">= 0.3.4"])
|
103
106
|
s.add_dependency(%q<yard>, [">= 0"])
|
104
107
|
end
|
105
108
|
end
|
data/spec/rdfa_reader_spec.rb
CHANGED
@@ -3,18 +3,35 @@ require File.join(File.dirname(__FILE__), 'spec_helper')
|
|
3
3
|
require 'rdfa_helper'
|
4
4
|
|
5
5
|
describe RDF::RDFa::Format do
|
6
|
-
it "should be
|
6
|
+
it "should be discover 'rdfa'" do
|
7
7
|
formats = [
|
8
8
|
RDF::Format.for(:rdfa),
|
9
9
|
RDF::Format.for("etc/foaf.html"),
|
10
10
|
RDF::Format.for(:file_name => "etc/foaf.html"),
|
11
11
|
RDF::Format.for(:file_extension => "html"),
|
12
12
|
RDF::Format.for(:file_extension => "xhtml"),
|
13
|
+
RDF::Format.for(:file_extension => "svg"),
|
13
14
|
RDF::Format.for(:content_type => "text/html"),
|
14
15
|
RDF::Format.for(:content_type => "application/xhtml+xml"),
|
16
|
+
RDF::Format.for(:content_type => "image/svg+xml"),
|
15
17
|
]
|
16
18
|
formats.each { |format| format.should == RDF::RDFa::Format }
|
17
19
|
end
|
20
|
+
|
21
|
+
it "should discover 'html'" do
|
22
|
+
RDF::Format.for(:html).reader.should == RDF::RDFa::Reader
|
23
|
+
#RDF::Format.for(:html).writer.should == RDF::RDFa::Writer
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should discover 'xhtml'" do
|
27
|
+
RDF::Format.for(:xhtml).reader.should == RDF::RDFa::Reader
|
28
|
+
#RDF::Format.for(:xhtml).writer.should == RDF::RDFa::Writer
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should discover 'svg'" do
|
32
|
+
RDF::Format.for(:svg).reader.should == RDF::RDFa::Reader
|
33
|
+
#RDF::Format.for(:svg).writer.should == RDF::RDFa::Writer
|
34
|
+
end
|
18
35
|
end
|
19
36
|
|
20
37
|
describe "RDF::RDFa::Reader" do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rdf-rdfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.1.
|
5
|
+
version: 0.3.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Gregg Kellogg
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-02-
|
13
|
+
date: 2011-02-18 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 0.3.
|
24
|
+
version: 0.3.1
|
25
25
|
type: :runtime
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -36,60 +36,71 @@ dependencies:
|
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: spira
|
40
40
|
prerelease: false
|
41
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 0.0.12
|
47
47
|
type: :development
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: rspec
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: 2.5.0
|
58
58
|
type: :development
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name: rdf-
|
61
|
+
name: rdf-spec
|
62
62
|
prerelease: false
|
63
63
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.3.1
|
69
69
|
type: :development
|
70
70
|
version_requirements: *id005
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
name: rdf-
|
72
|
+
name: rdf-rdfxml
|
73
73
|
prerelease: false
|
74
74
|
requirement: &id006 !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
79
|
+
version: 0.3.1
|
80
80
|
type: :development
|
81
81
|
version_requirements: *id006
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
|
-
name:
|
83
|
+
name: rdf-isomorphic
|
84
84
|
prerelease: false
|
85
85
|
requirement: &id007 !ruby/object:Gem::Requirement
|
86
86
|
none: false
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 0.3.4
|
91
91
|
type: :development
|
92
92
|
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: yard
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: "0"
|
102
|
+
type: :development
|
103
|
+
version_requirements: *id008
|
93
104
|
description: " RDF::RDFa is an RDFa reader for Ruby using the RDF.rb library suite.\n"
|
94
105
|
email: gregg@kellogg-assoc.com
|
95
106
|
executables: []
|