rdf-microdata 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -17
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/etc/doap.html +9 -9
- data/etc/doap.nt +19 -19
- data/etc/doap.ttl +17 -16
- data/lib/rdf/microdata.rb +3 -3
- data/lib/rdf/microdata/format.rb +1 -1
- data/lib/rdf/microdata/reader.rb +3 -3
- data/lib/rdf/microdata/reader/nokogiri.rb +5 -3
- data/lib/rdf/microdata/registry.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cf57a5354b695916b671d885b9a9b024ef084b0c3ec2ae34bcf7668264f2c27
|
4
|
+
data.tar.gz: 8e3e2c9c8a212e77bd652b76998246bbf9ef019e85be8c18001fa4d9db887b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1ad276f98f0ef1b83fabb7b37b8d96ec7df2f4c139fedd1681be98e9eccc62e65e7c363aecb46a0208c979ab99fc7d882343b408624d19396801d5cd2894ffb
|
7
|
+
data.tar.gz: 6343a17bca689225145a1f6bcd6364ab284b47ba1c8dac0c4bf64578df14955f08bf003500a7938127cdcc3b40b2460c865f49a3ed0f4eb6fcec6cb02692ac2c
|
data/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
[Microdata][] parser for RDF.rb.
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](
|
6
|
-
[![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](https://badge.fury.io/rb/rdf-microdata)
|
6
|
+
[![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](https://travis-ci.org/ruby-rdf/rdf-microdata)
|
7
7
|
|
8
8
|
## DESCRIPTION
|
9
9
|
RDF::Microdata is a Microdata reader for Ruby using the [RDF.rb][RDF.rb] library suite.
|
@@ -45,10 +45,10 @@ GRDDL-type triple generation, such as for html>head>title anchor tags.
|
|
45
45
|
If the `RDFa` parser is available, {RDF::Microdata::Format} will not assert content type `text/html` or file extension `.html`, as this is also asserted by RDFa. Instead, the RDFa reader will invoke the microdata reader if an `@itemscope` attribute is detected.
|
46
46
|
|
47
47
|
## Dependencies
|
48
|
-
* [RDF.rb](
|
49
|
-
* [RDF::XSD](
|
48
|
+
* [RDF.rb](https://rubygems.org/gems/rdf) (>= 3.1)
|
49
|
+
* [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (>= 3.1)
|
50
50
|
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('>= 4.3.0')
|
51
|
-
* [Nokogiri](
|
51
|
+
* [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10)
|
52
52
|
* Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0)
|
53
53
|
|
54
54
|
## Documentation
|
@@ -70,13 +70,13 @@ The reader exposes a `#rdfa` method, which can be used to retrieve the transform
|
|
70
70
|
|
71
71
|
## Resources
|
72
72
|
* [RDF.rb][RDF.rb]
|
73
|
-
* [Documentation](
|
73
|
+
* [Documentation](https://www.rubydoc.info/github/ruby-rdf/rdf-microdata/)
|
74
74
|
* [History](file:History.md)
|
75
75
|
* [Microdata][]
|
76
76
|
* [Microdata RDF][]
|
77
77
|
|
78
78
|
## Author
|
79
|
-
* [Gregg Kellogg](
|
79
|
+
* [Gregg Kellogg](https://github.com/gkellogg) - <https://greggkellogg.net/>
|
80
80
|
|
81
81
|
## Contributing
|
82
82
|
|
@@ -95,20 +95,20 @@ The reader exposes a `#rdfa` method, which can be used to retrieve the transform
|
|
95
95
|
## License
|
96
96
|
|
97
97
|
This is free and unencumbered public domain software. For more information,
|
98
|
-
see <
|
98
|
+
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
|
99
99
|
|
100
100
|
## FEEDBACK
|
101
101
|
|
102
102
|
* gregg@greggkellogg.net
|
103
|
-
* <
|
104
|
-
* <
|
105
|
-
* <
|
103
|
+
* <https://rubygems.org/rdf-microdata>
|
104
|
+
* <https://github.com/ruby-rdf/rdf-microdata>
|
105
|
+
* <https://lists.w3.org/Archives/Public/public-rdf-ruby/>
|
106
106
|
|
107
107
|
[RDF.rb]: https://github.com/ruby-rdf/rdf
|
108
|
-
[YARD]:
|
109
|
-
[YARD-GS]:
|
110
|
-
[PDD]:
|
111
|
-
[Microdata]:
|
112
|
-
[Microdata RDF]:
|
113
|
-
[Microdata doc]:
|
108
|
+
[YARD]: https://yardoc.org/
|
109
|
+
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
|
110
|
+
[PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
|
111
|
+
[Microdata]: https://dev.w3.org/html5/md/Overview.html "HTML Microdata"
|
112
|
+
[Microdata RDF]: https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html "Microdata to RDF"
|
113
|
+
[Microdata doc]: https://rubydoc.info/github/ruby-rdf/rdf-microdata/frames
|
114
114
|
[Nokogumbo]: https://github.com/rubys/nokogumbo/#readme
|
data/UNLICENSE
CHANGED
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
21
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
22
|
OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
-
For more information, please refer to <
|
24
|
+
For more information, please refer to <https://unlicense.org/1.0/>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.1
|
data/etc/doap.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title lang="en" itemprop="shortdesc">Microdata reader for Ruby.</title>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
|
6
|
-
<base href="
|
6
|
+
<base href="https://rubygems.org/gems/rdf-microdata">
|
7
7
|
</head>
|
8
8
|
<body>
|
9
9
|
<p>Project description for <span itemprop="name">RDF::Microdata</span>.</p>
|
@@ -18,26 +18,26 @@
|
|
18
18
|
<dt>Created</dt><dd><time itemprop="created" datetime="2011-08-29">2011-08-29</time></dd>
|
19
19
|
<dt>Blog</dt><dd><a href="http://greggkellogg.net/" itemprop="blog">http://greggkellogg.net/</a></dd>
|
20
20
|
<dt>Bug DB</dt><dd>
|
21
|
-
<a href="
|
22
|
-
|
21
|
+
<a href="https://github.com/ruby-rdf/rdf-microdata/issues" itemprop="bug-database">
|
22
|
+
https://github.com/ruby-rdf/rdf-microdata/issues
|
23
23
|
</a>
|
24
24
|
</dd>
|
25
25
|
<dt>Category</dt><dd>
|
26
26
|
<a itemprop="category" href="http://dbpedia.org/resource/Resource_Description_Framework">Resource Description Framework</a>
|
27
27
|
for
|
28
|
-
<
|
28
|
+
<span itemprop="programming-language">Ruby</span>
|
29
29
|
</dd>
|
30
30
|
<dt>Implements</dt><dd>
|
31
31
|
<a itemprop="implements" href="http://www.w3.org/TR/microdata-rdf/">Microdata to RDF</a>
|
32
32
|
</dd>
|
33
|
-
<dt>Download</dt><dd><a href="
|
34
|
-
|
33
|
+
<dt>Download</dt><dd><a href="https://rubygems.org/gems/rdf-microdata" itemprop="download-page">
|
34
|
+
https://rubygems.org/gems/rdf-microdata
|
35
35
|
</a></dd>
|
36
|
-
<dt>Home Page</dt><dd><a href="
|
37
|
-
|
36
|
+
<dt>Home Page</dt><dd><a href="https://github.com/ruby-rdf/rdf-microdata" itemprop="homepage">
|
37
|
+
https://github.com/ruby-rdf/rdf-microdata
|
38
38
|
</a></dd>
|
39
39
|
<dt>License</dt><dd>
|
40
|
-
<a href="
|
40
|
+
<a href="https://unlicense.org/1.0/" itemprop="license">Public Domain</a>
|
41
41
|
</dd>
|
42
42
|
<dt>Mailing List</dt><dd><a href="http://lists.w3.org/Archives/Public/public-rdf-ruby/" itemprop="mailing-list">
|
43
43
|
http://lists.w3.org/Archives/Public/public-rdf-ruby/
|
data/etc/doap.nt
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
<
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
<
|
11
|
-
<
|
12
|
-
<
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<
|
18
|
-
<
|
19
|
-
<
|
1
|
+
<https://rubygems.org/gems/rdf-microdata> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
|
2
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#shortdesc> "Microdata reader for Ruby."@en .
|
3
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#description> "\n RDF::Microdata is an Microdata reader for Ruby using the RDF.rb library suite.\n "@en .
|
4
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#name> "RDF::Microdata" .
|
5
|
+
<https://rubygems.org/gems/rdf-microdata> <http://purl.org/dc/terms/creator> <http://greggkellogg.net/foaf#me> .
|
6
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#developer> <http://greggkellogg.net/foaf#me> .
|
7
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#documenter> <http://greggkellogg.net/foaf#me> .
|
8
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#maintainer> <http://greggkellogg.net/foaf#me> .
|
9
|
+
<https://rubygems.org/gems/rdf-microdata> <http://xmlns.com/foaf/0.1/creator> <http://greggkellogg.net/foaf#me> .
|
10
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#created> "2011-08-29"^^<http://www.w3.org/2001/XMLSchema#date> .
|
11
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#blog> <http://greggkellogg.net/> .
|
12
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#bug-database> <https://github.com/ruby-rdf/rdf-microdata/issues> .
|
13
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Resource_Description_Framework> .
|
14
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#programming-language> "Ruby" .
|
15
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/microdata-rdf/> .
|
16
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#download-page> <https://rubygems.org/gems/rdf-microdata> .
|
17
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#homepage> <https://github.com/ruby-rdf/rdf-microdata> .
|
18
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#license> <https://unlicense.org/1.0/> .
|
19
|
+
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#mailing-list> <http://lists.w3.org/Archives/Public/public-rdf-ruby/> .
|
data/etc/doap.ttl
CHANGED
@@ -1,27 +1,28 @@
|
|
1
|
-
@
|
1
|
+
@base <https://rubygems.org/gems/rdf-microdata> .
|
2
|
+
@prefix dc: <http://purl.org/dc/terms/> .
|
2
3
|
@prefix doap: <http://usefulinc.com/ns/doap#> .
|
3
4
|
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
4
|
-
@prefix rdf:
|
5
|
-
@prefix xsd:
|
5
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
6
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
6
7
|
|
7
|
-
|
8
|
-
dc:creator <
|
9
|
-
doap:blog <
|
10
|
-
doap:bug-database <
|
8
|
+
<> a doap:Project;
|
9
|
+
dc:creator <https://greggkellogg.net/foaf#me>;
|
10
|
+
doap:blog <https://greggkellogg.net/>;
|
11
|
+
doap:bug-database <https://github.com/ruby-rdf/rdf-microdata/issues>;
|
11
12
|
doap:category <http://dbpedia.org/resource/Resource_Description_Framework>;
|
12
13
|
doap:created "2011-08-29"^^xsd:date;
|
13
14
|
doap:description """
|
14
15
|
RDF::Microdata is an Microdata reader for Ruby using the RDF.rb library suite.
|
15
16
|
"""@en;
|
16
|
-
doap:developer <
|
17
|
-
doap:documenter <
|
18
|
-
doap:download-page
|
19
|
-
doap:homepage <
|
17
|
+
doap:developer <https://greggkellogg.net/foaf#me>;
|
18
|
+
doap:documenter <https://greggkellogg.net/foaf#me>;
|
19
|
+
doap:download-page <>;
|
20
|
+
doap:homepage <https://github.com/ruby-rdf/rdf-microdata>;
|
20
21
|
doap:implements <http://www.w3.org/TR/microdata-rdf/>;
|
21
|
-
doap:license <
|
22
|
-
doap:mailing-list <
|
23
|
-
doap:maintainer <
|
22
|
+
doap:license <https://unlicense.org/1.0/>;
|
23
|
+
doap:mailing-list <https://lists.w3.org/Archives/Public/public-rdf-ruby/>;
|
24
|
+
doap:maintainer <https://greggkellogg.net/foaf#me>;
|
24
25
|
doap:name "RDF::Microdata";
|
25
|
-
doap:programming-language
|
26
|
+
doap:programming-language "Ruby";
|
26
27
|
doap:shortdesc "Microdata reader for Ruby."@en;
|
27
|
-
foaf:creator <
|
28
|
+
foaf:creator <https://greggkellogg.net/foaf#me> .
|
data/lib/rdf/microdata.rb
CHANGED
@@ -15,10 +15,10 @@ module RDF
|
|
15
15
|
# end
|
16
16
|
# end
|
17
17
|
#
|
18
|
-
# @see
|
19
|
-
# @see
|
18
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/
|
19
|
+
# @see https://www.w3.org/TR/2011/WD-microdata-20110525/
|
20
20
|
#
|
21
|
-
# @author [Gregg Kellogg](
|
21
|
+
# @author [Gregg Kellogg](https://greggkellogg.net/)
|
22
22
|
module Microdata
|
23
23
|
USES_VOCAB = RDF::URI("http://www.w3.org/ns/rdfa#usesVocabulary")
|
24
24
|
DEFAULT_REGISTRY = File.expand_path("../../../etc/registry.json", __FILE__)
|
data/lib/rdf/microdata/format.rb
CHANGED
@@ -19,7 +19,7 @@ module RDF::Microdata
|
|
19
19
|
# @example Obtaining serialization format MIME types
|
20
20
|
# RDF::Format.content_types #=> {"text/html" => [RDF::Microdata::Format]}
|
21
21
|
#
|
22
|
-
# @see
|
22
|
+
# @see https://www.w3.org/TR/rdf-testcases/#ntriples
|
23
23
|
class Format < RDF::Format
|
24
24
|
content_encoding 'utf-8'
|
25
25
|
|
data/lib/rdf/microdata/reader.rb
CHANGED
@@ -8,8 +8,8 @@ module RDF::Microdata
|
|
8
8
|
#
|
9
9
|
# Based on processing rules, amended with the following:
|
10
10
|
#
|
11
|
-
# @see
|
12
|
-
# @author [Gregg Kellogg](
|
11
|
+
# @see https://dvcs.w3.org/hg/htmldata/raw-file/0d6b89f5befb/microdata-rdf/index.html
|
12
|
+
# @author [Gregg Kellogg](https://greggkellogg.net/)
|
13
13
|
class Reader < RDF::Reader
|
14
14
|
format Format
|
15
15
|
include Expansion
|
@@ -39,7 +39,7 @@ module RDF::Microdata
|
|
39
39
|
|
40
40
|
##
|
41
41
|
# Reader options
|
42
|
-
# @see
|
42
|
+
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Reader#options-class_method
|
43
43
|
def self.options
|
44
44
|
super + [
|
45
45
|
RDF::CLI::Option.new(
|
@@ -3,7 +3,7 @@ module RDF::Microdata
|
|
3
3
|
##
|
4
4
|
# Nokogiri implementation of an HTML parser.
|
5
5
|
#
|
6
|
-
# @see
|
6
|
+
# @see https://nokogiri.org/
|
7
7
|
module Nokogiri
|
8
8
|
##
|
9
9
|
# Returns the name of the underlying XML library.
|
@@ -212,7 +212,9 @@ module RDF::Microdata
|
|
212
212
|
##
|
213
213
|
# Document errors
|
214
214
|
def doc_errors
|
215
|
-
@doc.errors.reject
|
215
|
+
@doc.errors.reject do |e|
|
216
|
+
e.to_s =~ %r{(The doctype must be the first token in the document)|(Expected a doctype token)|(Unexpected '\?' where start tag name is expected)}
|
217
|
+
end
|
216
218
|
end
|
217
219
|
|
218
220
|
##
|
@@ -230,7 +232,7 @@ module RDF::Microdata
|
|
230
232
|
##
|
231
233
|
# Based on Microdata element.getItems
|
232
234
|
#
|
233
|
-
# @see
|
235
|
+
# @see https://www.w3.org/TR/2011/WD-microdata-20110525/#top-level-microdata-items
|
234
236
|
def getItems
|
235
237
|
@doc.css('[itemscope]').select {|el| !el.has_attribute?('itemprop')}.map {|n| NodeProxy.new(n)}
|
236
238
|
end
|
@@ -55,7 +55,7 @@ module RDF::Microdata
|
|
55
55
|
# Generate a predicateURI given a `name`
|
56
56
|
#
|
57
57
|
# @param [#to_s] name
|
58
|
-
# @param [
|
58
|
+
# @param [RDF::URI] base_uri base URI for resolving `name`.
|
59
59
|
# @return [RDF::URI]
|
60
60
|
def predicateURI(name, base_uri)
|
61
61
|
u = RDF::URI(name)
|
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: 3.1.
|
4
|
+
version: 3.1.1
|
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:
|
12
|
+
date: 2020-07-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -216,7 +216,7 @@ files:
|
|
216
216
|
- lib/rdf/microdata/registry.rb
|
217
217
|
- lib/rdf/microdata/version.rb
|
218
218
|
- lib/rdf/microdata/vocab.rb
|
219
|
-
homepage:
|
219
|
+
homepage: https://ruby-rdf.github.com/rdf-microdata
|
220
220
|
licenses:
|
221
221
|
- Unlicense
|
222
222
|
metadata: {}
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
238
|
+
rubygems_version: 3.1.3
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Microdata reader for Ruby.
|