Skip to content

Commit

Permalink
Finish 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jul 9, 2020
2 parents 6eabc80 + c70a728 commit 4190826
Show file tree
Hide file tree
Showing 19 changed files with 229 additions and 123 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Community contributions are essential for keeping Ruby RDF great. We want to kee

This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.

* create or respond to an issue on the [Github Repository](http://github.com/ruby-rdf/rdf-microdata/issues)
* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/rdf-microdata/issues)
* Fork and clone the repo:
`git clone [email protected]:your-username/rdf-microdata.git`
* Install bundle:
Expand All @@ -30,7 +30,7 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage devel
of thumb, additions larger than about 15 lines of code), we need an
explicit [public domain dedication][PDD] on record from you.

[YARD]: http://yardoc.org/
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
[YARD]: https://yardoc.org/
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
[pr]: https://github.com/ruby-rdf/rdf-microdata/compare/
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"
source "https://rubygems.org"

gemspec

Expand All @@ -15,6 +15,7 @@ group :development do
gem 'rdf-isomorphic', git: "https://github.com/ruby-rdf/rdf-isomorphic", branch: "develop"
gem "rdf-spec", git: "https://github.com/ruby-rdf/rdf-spec", branch: "develop"
gem 'rdf-turtle', git: "https://github.com/ruby-rdf/rdf-turtle", branch: "develop"
gem 'rdf-vocab', git: "https://github.com/ruby-rdf/rdf-vocab", branch: "develop"
gem 'sxp', git: "https://github.com/dryruby/sxp.rb", branch: "develop"
end

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[Microdata][] parser for RDF.rb.

[![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](http://badge.fury.io/rb/rdf-microdata)
[![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-microdata)
[![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](https://badge.fury.io/rb/rdf-microdata)
[![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](https://travis-ci.org/ruby-rdf/rdf-microdata)

## DESCRIPTION
RDF::Microdata is a Microdata reader for Ruby using the [RDF.rb][RDF.rb] library suite.
Expand Down Expand Up @@ -45,10 +45,10 @@ GRDDL-type triple generation, such as for html>head>title anchor tags.
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.

## Dependencies
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 3.1)
* [RDF::XSD](http://rubygems.org/gems/rdf-xsd) (>= 3.1)
* [RDF.rb](https://rubygems.org/gems/rdf) (>= 3.1)
* [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (>= 3.1)
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('>= 4.3.0')
* [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.10)
* [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10)
* Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0)

## Documentation
Expand All @@ -70,13 +70,13 @@ The reader exposes a `#rdfa` method, which can be used to retrieve the transform

## Resources
* [RDF.rb][RDF.rb]
* [Documentation](http://www.rubydoc.info/github/ruby-rdf/rdf-microdata/)
* [Documentation](https://www.rubydoc.info/github/ruby-rdf/rdf-microdata/)
* [History](file:History.md)
* [Microdata][]
* [Microdata RDF][]

## Author
* [Gregg Kellogg](http://github.com/gkellogg) - <http://greggkellogg.net/>
* [Gregg Kellogg](https://github.com/gkellogg) - <https://greggkellogg.net/>

## Contributing

Expand All @@ -95,20 +95,20 @@ The reader exposes a `#rdfa` method, which can be used to retrieve the transform
## License

This is free and unencumbered public domain software. For more information,
see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.

## FEEDBACK

* [email protected]
* <http://rubygems.org/rdf-microdata>
* <http://github.com/ruby-rdf/rdf-microdata>
* <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
* <https://rubygems.org/rdf-microdata>
* <https://github.com/ruby-rdf/rdf-microdata>
* <https://lists.w3.org/Archives/Public/public-rdf-ruby/>

[RDF.rb]: https://github.com/ruby-rdf/rdf
[YARD]: http://yardoc.org/
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
[Microdata]: http://dev.w3.org/html5/md/Overview.html "HTML Microdata"
[Microdata RDF]: http://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html "Microdata to RDF"
[Microdata doc]: http://rubydoc.info/github/ruby-rdf/rdf-microdata/frames
[YARD]: https://yardoc.org/
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
[Microdata]: https://dev.w3.org/html5/md/Overview.html "HTML Microdata"
[Microdata RDF]: https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html "Microdata to RDF"
[Microdata doc]: https://rubydoc.info/github/ruby-rdf/rdf-microdata/frames
[Nokogumbo]: https://github.com/rubys/nokogumbo/#readme
2 changes: 1 addition & 1 deletion UNLICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
For more information, please refer to <https://unlicense.org/1.0/>
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.1.1
18 changes: 9 additions & 9 deletions etc/doap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title lang="en" itemprop="shortdesc">Microdata reader for Ruby.</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<base href="http://rubygems.org/gems/rdf-microdata">
<base href="https://rubygems.org/gems/rdf-microdata">
</head>
<body>
<p>Project description for <span itemprop="name">RDF::Microdata</span>.</p>
Expand All @@ -18,26 +18,26 @@
<dt>Created</dt><dd><time itemprop="created" datetime="2011-08-29">2011-08-29</time></dd>
<dt>Blog</dt><dd><a href="http://greggkellogg.net/" itemprop="blog">http://greggkellogg.net/</a></dd>
<dt>Bug DB</dt><dd>
<a href="http://github.com/ruby-rdf/rdf-microdata/issues" itemprop="bug-database">
http://github.com/ruby-rdf/rdf-microdata/issues
<a href="https://github.com/ruby-rdf/rdf-microdata/issues" itemprop="bug-database">
https://github.com/ruby-rdf/rdf-microdata/issues
</a>
</dd>
<dt>Category</dt><dd>
<a itemprop="category" href="http://dbpedia.org/resource/Resource_Description_Framework">Resource Description Framework</a>
for
<a itemprop="programming-language" href="http://dbpedia.org/resource/Ruby_(programming_language)">Ruby</a>
<span itemprop="programming-language">Ruby</span>
</dd>
<dt>Implements</dt><dd>
<a itemprop="implements" href="http://www.w3.org/TR/microdata-rdf/">Microdata to RDF</a>
</dd>
<dt>Download</dt><dd><a href="http://rubygems.org/gems/rdf-microdata" itemprop="download-page">
http://rubygems.org/gems/rdf-microdata
<dt>Download</dt><dd><a href="https://rubygems.org/gems/rdf-microdata" itemprop="download-page">
https://rubygems.org/gems/rdf-microdata
</a></dd>
<dt>Home Page</dt><dd><a href="http://github.com/ruby-rdf/rdf-microdata" itemprop="homepage">
http://github.com/ruby-rdf/rdf-microdata
<dt>Home Page</dt><dd><a href="https://github.com/ruby-rdf/rdf-microdata" itemprop="homepage">
https://github.com/ruby-rdf/rdf-microdata
</a></dd>
<dt>License</dt><dd>
<a href="http://creativecommons.org/licenses/publicdomain/" itemprop="license">Public Domain</a>
<a href="https://unlicense.org/1.0/" itemprop="license">Public Domain</a>
</dd>
<dt>Mailing List</dt><dd><a href="http://lists.w3.org/Archives/Public/public-rdf-ruby/" itemprop="mailing-list">
http://lists.w3.org/Archives/Public/public-rdf-ruby/
Expand Down
38 changes: 19 additions & 19 deletions etc/doap.nt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<http://rubygems.org/gems/rdf-microdata> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#shortdesc> "Microdata reader for Ruby."@en .
<http://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 .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#name> "RDF::Microdata" .
<http://rubygems.org/gems/rdf-microdata> <http://purl.org/dc/terms/creator> <http://greggkellogg.net/foaf#me> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#developer> <http://greggkellogg.net/foaf#me> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#documenter> <http://greggkellogg.net/foaf#me> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#maintainer> <http://greggkellogg.net/foaf#me> .
<http://rubygems.org/gems/rdf-microdata> <http://xmlns.com/foaf/0.1/creator> <http://greggkellogg.net/foaf#me> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#created> "2011-08-29"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#blog> <http://greggkellogg.net/> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#bug-database> <http://github.com/ruby-rdf/rdf-microdata/issues> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Resource_Description_Framework> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#programming-language> <http://dbpedia.org/resource/Ruby_(programming_language)> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/microdata-rdf/> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#download-page> <http://rubygems.org/gems/rdf-microdata> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#homepage> <http://github.com/ruby-rdf/rdf-microdata> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#license> <http://creativecommons.org/licenses/publicdomain/> .
<http://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#mailing-list> <http://lists.w3.org/Archives/Public/public-rdf-ruby/> .
<https://rubygems.org/gems/rdf-microdata> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#shortdesc> "Microdata reader for Ruby."@en .
<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 .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#name> "RDF::Microdata" .
<https://rubygems.org/gems/rdf-microdata> <http://purl.org/dc/terms/creator> <http://greggkellogg.net/foaf#me> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#developer> <http://greggkellogg.net/foaf#me> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#documenter> <http://greggkellogg.net/foaf#me> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#maintainer> <http://greggkellogg.net/foaf#me> .
<https://rubygems.org/gems/rdf-microdata> <http://xmlns.com/foaf/0.1/creator> <http://greggkellogg.net/foaf#me> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#created> "2011-08-29"^^<http://www.w3.org/2001/XMLSchema#date> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#blog> <http://greggkellogg.net/> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#bug-database> <https://github.com/ruby-rdf/rdf-microdata/issues> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Resource_Description_Framework> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#programming-language> "Ruby" .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/microdata-rdf/> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#download-page> <https://rubygems.org/gems/rdf-microdata> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#homepage> <https://github.com/ruby-rdf/rdf-microdata> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#license> <https://unlicense.org/1.0/> .
<https://rubygems.org/gems/rdf-microdata> <http://usefulinc.com/ns/doap#mailing-list> <http://lists.w3.org/Archives/Public/public-rdf-ruby/> .
33 changes: 17 additions & 16 deletions etc/doap.ttl
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
@prefix dc: <http://purl.org/dc/terms/> .
@base <https://rubygems.org/gems/rdf-microdata> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://rubygems.org/gems/rdf-microdata> a doap:Project;
dc:creator <http://greggkellogg.net/foaf#me>;
doap:blog <http://greggkellogg.net/>;
doap:bug-database <http://github.com/ruby-rdf/rdf-microdata/issues>;
<> a doap:Project;
dc:creator <https://greggkellogg.net/foaf#me>;
doap:blog <https://greggkellogg.net/>;
doap:bug-database <https://github.com/ruby-rdf/rdf-microdata/issues>;
doap:category <http://dbpedia.org/resource/Resource_Description_Framework>;
doap:created "2011-08-29"^^xsd:date;
doap:description """
RDF::Microdata is an Microdata reader for Ruby using the RDF.rb library suite.
"""@en;
doap:developer <http://greggkellogg.net/foaf#me>;
doap:documenter <http://greggkellogg.net/foaf#me>;
doap:download-page <http://rubygems.org/gems/rdf-microdata>;
doap:homepage <http://github.com/ruby-rdf/rdf-microdata>;
doap:developer <https://greggkellogg.net/foaf#me>;
doap:documenter <https://greggkellogg.net/foaf#me>;
doap:download-page <>;
doap:homepage <https://github.com/ruby-rdf/rdf-microdata>;
doap:implements <http://www.w3.org/TR/microdata-rdf/>;
doap:license <http://creativecommons.org/licenses/publicdomain/>;
doap:mailing-list <http://lists.w3.org/Archives/Public/public-rdf-ruby/>;
doap:maintainer <http://greggkellogg.net/foaf#me>;
doap:license <https://unlicense.org/1.0/>;
doap:mailing-list <https://lists.w3.org/Archives/Public/public-rdf-ruby/>;
doap:maintainer <https://greggkellogg.net/foaf#me>;
doap:name "RDF::Microdata";
doap:programming-language <http://dbpedia.org/resource/Ruby_(programming_language)>;
doap:programming-language "Ruby";
doap:shortdesc "Microdata reader for Ruby."@en;
foaf:creator <http://greggkellogg.net/foaf#me> .
foaf:creator <https://greggkellogg.net/foaf#me> .
6 changes: 3 additions & 3 deletions lib/rdf/microdata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ module RDF
# end
# end
#
# @see http://www.rubydoc.info/github/ruby-rdf/rdf/
# @see http://www.w3.org/TR/2011/WD-microdata-20110525/
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/
# @see https://www.w3.org/TR/2011/WD-microdata-20110525/
#
# @author [Gregg Kellogg](http://greggkellogg.net/)
# @author [Gregg Kellogg](https://greggkellogg.net/)
module Microdata
USES_VOCAB = RDF::URI("http://www.w3.org/ns/rdfa#usesVocabulary")
DEFAULT_REGISTRY = File.expand_path("../../../etc/registry.json", __FILE__)
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/microdata/format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module RDF::Microdata
# @example Obtaining serialization format MIME types
# RDF::Format.content_types #=> {"text/html" => [RDF::Microdata::Format]}
#
# @see http://www.w3.org/TR/rdf-testcases/#ntriples
# @see https://www.w3.org/TR/rdf-testcases/#ntriples
class Format < RDF::Format
content_encoding 'utf-8'

Expand Down
6 changes: 3 additions & 3 deletions lib/rdf/microdata/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module RDF::Microdata
#
# Based on processing rules, amended with the following:
#
# @see http://dvcs.w3.org/hg/htmldata/raw-file/0d6b89f5befb/microdata-rdf/index.html
# @author [Gregg Kellogg](http://greggkellogg.net/)
# @see https://dvcs.w3.org/hg/htmldata/raw-file/0d6b89f5befb/microdata-rdf/index.html
# @author [Gregg Kellogg](https://greggkellogg.net/)
class Reader < RDF::Reader
format Format
include Expansion
Expand Down Expand Up @@ -39,7 +39,7 @@ def base_uri

##
# Reader options
# @see http://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Reader#options-class_method
# @see https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Reader#options-class_method
def self.options
super + [
RDF::CLI::Option.new(
Expand Down
8 changes: 5 additions & 3 deletions lib/rdf/microdata/reader/nokogiri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Reader < RDF::Reader
##
# Nokogiri implementation of an HTML parser.
#
# @see http://nokogiri.org/
# @see https://nokogiri.org/
module Nokogiri
##
# Returns the name of the underlying XML library.
Expand Down Expand Up @@ -212,7 +212,9 @@ def root
##
# Document errors
def doc_errors
@doc.errors.reject {|e| e.to_s =~ /The doctype must be the first token in the document/}
@doc.errors.reject do |e|
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)}
end
end

##
Expand All @@ -230,7 +232,7 @@ def doc_base(base)
##
# Based on Microdata element.getItems
#
# @see http://www.w3.org/TR/2011/WD-microdata-20110525/#top-level-microdata-items
# @see https://www.w3.org/TR/2011/WD-microdata-20110525/#top-level-microdata-items
def getItems
@doc.css('[itemscope]').select {|el| !el.has_attribute?('itemprop')}.map {|n| NodeProxy.new(n)}
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/microdata/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.find(type)
# Generate a predicateURI given a `name`
#
# @param [#to_s] name
# @param [Hash{}] ec Evaluation Context
# @param [RDF::URI] base_uri base URI for resolving `name`.
# @return [RDF::URI]
def predicateURI(name, base_uri)
u = RDF::URI(name)
Expand Down
2 changes: 1 addition & 1 deletion rdf-microdata.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
gem.date = File.mtime('VERSION').strftime('%Y-%m-%d')

gem.name = "rdf-microdata"
gem.homepage = "http://ruby-rdf.github.com/rdf-microdata"
gem.homepage = "https://ruby-rdf.github.com/rdf-microdata"
gem.license = 'Unlicense'
gem.summary = "Microdata reader for Ruby."
gem.description = 'Reads HTML Microdata as RDF.'
Expand Down
Loading

0 comments on commit 4190826

Please sign in to comment.