Skip to content

Commit

Permalink
Finish 3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Mar 6, 2021
2 parents 4190826 + 1df279d commit b045f19
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 25 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
@@ -0,0 +1 @@
repo_token: Me6Vqlj2P292rGH0feiRAVt6hc6jwjndv
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,40 @@
# This workflow runs continuous CI across different versions of ruby on all branches and pull requests to develop.

name: CI
on:
push:
branches: [ '**' ]
pull_request:
branches: [ develop ]
workflow_dispatch:

jobs:
tests:
name: Ruby ${{ matrix.ruby }}
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
runs-on: ubuntu-latest
env:
CI: true
strategy:
fail-fast: false
matrix:
ruby:
- 2.4
- 2.5
- 2.6
- 2.7
- 3.0
- ruby-head
#- jruby # No Nokogumbo on JRuby
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rspec spec

1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@
/.rbx/
Gemfile.lock
/.byebug_history
coverage
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -28,9 +28,11 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage devel
enough, be assured we will eventually add you in there.
* Do note that in order for us to merge any non-trivial changes (as a rule
of thumb, additions larger than about 15 lines of code), we need an
explicit [public domain dedication][PDD] on record from you.
explicit [public domain dedication][PDD] on record from you,
which you will be asked to agree to on the first commit to a repo within the organization.
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.

[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/
[PDD]: https://unlicense.org/#unlicensing-contributions
[pr]: https://github.com/ruby-rdf/rdf/compare/
6 changes: 5 additions & 1 deletion Gemfile
Expand Up @@ -9,7 +9,6 @@ gem "nokogumbo", '~> 2.0'

group :development do
gem "json-ld", git: "https://github.com/ruby-rdf/json-ld", branch: "develop"
#gem 'linkeddata'
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"
gem 'rdf-aggregate-repo', git: "https://github.com/ruby-rdf/rdf-aggregate-repo", branch: "develop"
gem 'rdf-isomorphic', git: "https://github.com/ruby-rdf/rdf-isomorphic", branch: "develop"
Expand All @@ -22,3 +21,8 @@ end
group :debug do
gem "byebug", platform: :mri
end

group :test do
gem 'simplecov', '~> 0.16', platforms: :mri
gem 'coveralls', '~> 0.8', platforms: :mri
end
19 changes: 12 additions & 7 deletions README.md
Expand Up @@ -3,7 +3,9 @@
[Microdata][] parser for RDF.rb.

[![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)
[![Build Status](https://github.com/ruby-rdf/rdf-microdata/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-microdata/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-microdata/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-microdata?branch=develop)
[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)

## DESCRIPTION
RDF::Microdata is a Microdata reader for Ruby using the [RDF.rb][RDF.rb] library suite.
Expand Down Expand Up @@ -45,10 +47,11 @@ 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](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](https://rubygems.org/gems/nokogiri) (>= 1.10)
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1)
* [RDF::RDFa](https://rubygems.org/gems/rdf-xsd) (~> 3.1)
* [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (~> 3.1)
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('~> 4.3')
* [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.10)
* Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0)

## Documentation
Expand Down Expand Up @@ -90,7 +93,9 @@ The reader exposes a `#rdfa` method, which can be used to retrieve the transform
list in the the `README`. Alphabetical order applies.
* Do note that in order for us to merge any non-trivial changes (as a rule
of thumb, additions larger than about 15 lines of code), we need an
explicit [public domain dedication][PDD] on record from you.
explicit [public domain dedication][PDD] on record from you,
which you will be asked to agree to on the first commit to a repo within the organization.
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.

## License

Expand All @@ -107,7 +112,7 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
[RDF.rb]: https://github.com/ruby-rdf/rdf
[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
[PDD]: https://unlicense.org/#unlicensing-contributions
[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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.1.1
3.1.2
8 changes: 3 additions & 5 deletions etc/doap.ttl
Expand Up @@ -6,14 +6,14 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<> a doap:Project;
doap:name "RDF::Microdata";
doap:shortdesc "Microdata reader for Ruby RDF.rb."@en;
doap:description "RDF::Microdata is an Microdata reader for Ruby using the RDF.rb library suite."@en;
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 <https://greggkellogg.net/foaf#me>;
doap:documenter <https://greggkellogg.net/foaf#me>;
doap:download-page <>;
Expand All @@ -22,7 +22,5 @@
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 "Ruby";
doap:shortdesc "Microdata reader for Ruby."@en;
foaf:creator <https://greggkellogg.net/foaf#me> .
12 changes: 6 additions & 6 deletions rdf-microdata.gemspec
Expand Up @@ -20,21 +20,21 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = '>= 2.4'
gem.requirements = []
gem.add_runtime_dependency 'rdf', '~> 3.1'
gem.add_runtime_dependency 'rdf', '~> 3.1', '>= 3.1.13'
gem.add_runtime_dependency 'rdf-rdfa', '~> 3.1', '>= 3.1.3'
gem.add_runtime_dependency 'rdf-xsd', '~> 3.1'
gem.add_runtime_dependency 'htmlentities', '~> 4.3'
gem.add_runtime_dependency 'nokogiri' , '~> 1.10'
gem.add_runtime_dependency 'nokogiri' , '~> 1.10' # 1.11 Ruby 2.5

gem.add_development_dependency 'equivalent-xml' , '~> 0.6'
gem.add_development_dependency 'yard' , '~> 0.9.20'
gem.add_development_dependency 'rspec', '~> 3.9'
gem.add_development_dependency 'yard' , '~> 0.9'
gem.add_development_dependency 'rspec', '~> 3.10'
gem.add_development_dependency 'rspec-its', '~> 1.3'

gem.add_development_dependency 'rdf-spec', '~> 3.1'
gem.add_development_dependency 'rdf-turtle', '>= 3.1'
gem.add_development_dependency 'rdf-turtle', '~> 3.1'
gem.add_development_dependency 'rdf-isomorphic', '~> 3.1'
gem.add_development_dependency 'json-ld', '~> 3.1'
gem.add_development_dependency 'rdf-rdfa', '~> 3.1'

gem.post_install_message = nil
end
15 changes: 14 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -17,7 +17,20 @@
c.include(RDF::Spec::Matchers)
end

TMP_DIR = File.join(File.expand_path(File.dirname(__FILE__)), "tmp")
begin
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
])
SimpleCov.start do
add_filter "/spec/"
end
Coveralls.wear!
rescue LoadError => e
STDERR.puts "Coverage Skipped: #{e.message}"
end

# Heuristically detect the input stream
def detect_format(stream)
Expand Down
2 changes: 1 addition & 1 deletion spec/suite_spec.rb
Expand Up @@ -47,7 +47,7 @@
if t.evaluate?

# Remove any rdfa:usesVocabulary property
graph.query(predicate: RDF::RDFA.usesVocabulary) do |st|
graph.query({predicate: RDF::RDFA.usesVocabulary}) do |st|
graph.delete!(st)
end
output_graph = RDF::Graph.load(t.result, base_uri: t.action)
Expand Down

0 comments on commit b045f19

Please sign in to comment.