From 9ee4a6691d91afebe5a6f84da2b1d3432286baa6 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 25 Oct 2020 16:43:38 -0700 Subject: [PATCH 1/9] Update PDD info in the README. --- CONTRIBUTING.md | 8 +++++--- README.md | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a5ebbd..5dd3041 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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/ diff --git a/README.md b/README.md index 85e1050..87ba325 100755 --- a/README.md +++ b/README.md @@ -90,7 +90,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 @@ -107,7 +109,7 @@ see 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 From d318180092ea2dd61029481fc1d5c5d406ff79c7 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 20 Dec 2020 14:23:43 -0800 Subject: [PATCH 2/9] Fix query calling sequence. --- spec/suite_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/suite_spec.rb b/spec/suite_spec.rb index 1d63b5e..55beff2 100644 --- a/spec/suite_spec.rb +++ b/spec/suite_spec.rb @@ -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) From 4b478811191cfbb1ac844a1ca5efb8f1e26b7729 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 20 Dec 2020 14:24:45 -0800 Subject: [PATCH 3/9] Run CI using GitHub Actions. --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + Gemfile | 5 +++++ rdf-microdata.gemspec | 4 ++-- spec/spec_helper.rb | 15 ++++++++++++++- 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bc31c98 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +# 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 + - 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 + diff --git a/.gitignore b/.gitignore index 57f6a7d..1a674f4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /.rbx/ Gemfile.lock /.byebug_history +coverage diff --git a/Gemfile b/Gemfile index 2b51158..4405225 100644 --- a/Gemfile +++ b/Gemfile @@ -22,3 +22,8 @@ end group :debug do gem "byebug", platform: :mri end + +group :test do + gem 'simplecov', platforms: :mri + gem 'coveralls', '~> 0.8', platforms: :mri +end diff --git a/rdf-microdata.gemspec b/rdf-microdata.gemspec index aa0f116..1d79476 100755 --- a/rdf-microdata.gemspec +++ b/rdf-microdata.gemspec @@ -26,8 +26,8 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'nokogiri' , '~> 1.10' 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' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index adf8bd4..62e89fa 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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) From 5661ff673e7060bacceb97c144a5e829495ff9ec Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 20 Dec 2020 14:27:06 -0800 Subject: [PATCH 4/9] Update badges in README. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 87ba325..2182994 100755 --- a/README.md +++ b/README.md @@ -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)](https://coveralls.io/github/ruby-rdf/rdf-microdata) +[![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. From ce9170bf71a85c82e115950df92a8c717d0c3752 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 20 Dec 2020 14:36:05 -0800 Subject: [PATCH 5/9] Add .coveralls.yml --- .coveralls.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..95ac3a5 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: Me6Vqlj2P292rGH0feiRAVt6hc6jwjndv From 53b4c00d2cbbb55cce8de71a4069c9c03333d6a8 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 6 Mar 2021 12:26:44 -0800 Subject: [PATCH 6/9] Update project descriptions. --- README.md | 2 +- etc/doap.ttl | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2182994..595f08c 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](https://badge.fury.io/rb/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)](https://coveralls.io/github/ruby-rdf/rdf-microdata) +[![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 diff --git a/etc/doap.ttl b/etc/doap.ttl index f633e7c..1490fb6 100644 --- a/etc/doap.ttl +++ b/etc/doap.ttl @@ -6,14 +6,14 @@ @prefix xsd: . <> 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 ; doap:blog ; doap:bug-database ; doap:category ; 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 ; doap:documenter ; doap:download-page <>; @@ -22,7 +22,5 @@ doap:license ; doap:mailing-list ; doap:maintainer ; - doap:name "RDF::Microdata"; doap:programming-language "Ruby"; - doap:shortdesc "Microdata reader for Ruby."@en; foaf:creator . From 0d615c128fa74e85ddbdd66bcc5ab06ee44e3ba3 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 6 Mar 2021 12:30:56 -0800 Subject: [PATCH 7/9] Update dependencies. --- .github/workflows/ci.yml | 1 + README.md | 9 +++++---- rdf-microdata.gemspec | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc31c98..5d49a23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: - 2.5 - 2.6 - 2.7 + - 3.0 - ruby-head #- jruby # No Nokogumbo on JRuby steps: diff --git a/README.md b/README.md index 595f08c..d966a63 100755 --- a/README.md +++ b/README.md @@ -47,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.11) * Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0) ## Documentation diff --git a/rdf-microdata.gemspec b/rdf-microdata.gemspec index 1d79476..e583232 100755 --- a/rdf-microdata.gemspec +++ b/rdf-microdata.gemspec @@ -20,10 +20,11 @@ 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.12' + gem.add_runtime_dependency 'rdf-rdfa', '~> 3.1', '>= 3.1.2' 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.11' gem.add_development_dependency 'equivalent-xml' , '~> 0.6' gem.add_development_dependency 'yard' , '~> 0.9' @@ -34,7 +35,6 @@ Gem::Specification.new do |gem| 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 From 2fd6b6c4feaefd6ce48f3c36aaebfab5f1e63e72 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 6 Mar 2021 12:42:36 -0800 Subject: [PATCH 8/9] Downgrade nokogiri requirement to 1.10 due to 1.11 requiring Ruby >= 2.5. --- README.md | 2 +- rdf-microdata.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d966a63..ea16205 100755 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ If the `RDFa` parser is available, {RDF::Microdata::Format} will not assert cont * [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.11) +* [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.10) * Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0) ## Documentation diff --git a/rdf-microdata.gemspec b/rdf-microdata.gemspec index e583232..87c7a9e 100755 --- a/rdf-microdata.gemspec +++ b/rdf-microdata.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'rdf-rdfa', '~> 3.1', '>= 3.1.2' gem.add_runtime_dependency 'rdf-xsd', '~> 3.1' gem.add_runtime_dependency 'htmlentities', '~> 4.3' - gem.add_runtime_dependency 'nokogiri' , '~> 1.11' + 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' From 1df279dcfe6af640bce2db9ed6b43d015513d125 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 6 Mar 2021 13:05:28 -0800 Subject: [PATCH 9/9] Version 3.1.2. --- Gemfile | 3 +-- VERSION | 2 +- rdf-microdata.gemspec | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 4405225..e33063c 100644 --- a/Gemfile +++ b/Gemfile @@ -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" @@ -24,6 +23,6 @@ group :debug do end group :test do - gem 'simplecov', platforms: :mri + gem 'simplecov', '~> 0.16', platforms: :mri gem 'coveralls', '~> 0.8', platforms: :mri end diff --git a/VERSION b/VERSION index 94ff29c..ef538c2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.1 +3.1.2 diff --git a/rdf-microdata.gemspec b/rdf-microdata.gemspec index 87c7a9e..a0d124a 100755 --- a/rdf-microdata.gemspec +++ b/rdf-microdata.gemspec @@ -20,8 +20,8 @@ Gem::Specification.new do |gem| gem.required_ruby_version = '>= 2.4' gem.requirements = [] - gem.add_runtime_dependency 'rdf', '~> 3.1', '>= 3.1.12' - gem.add_runtime_dependency 'rdf-rdfa', '~> 3.1', '>= 3.1.2' + 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' # 1.11 Ruby 2.5 @@ -32,7 +32,7 @@ Gem::Specification.new do |gem| 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'