diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cb531d..9eaddce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,18 +15,18 @@ jobs: runs-on: ubuntu-latest env: CI: true + ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }} BUNDLE_GEMFILE: "${{ matrix.gemfile }}" strategy: fail-fast: false matrix: ruby: - - 2.4 - - 2.5 - 2.6 - 2.7 - 3.0 - - ruby-head # Until net-http-persistent updated - #- jruby # No Nokogumbo on JRuby + - 3.1 + - ruby-head + - jruby gemfile: - Gemfile - Gemfile-pure @@ -40,5 +40,9 @@ jobs: - name: Install dependencies run: bundle install --jobs 4 --retry 3 - name: Run tests - run: bundle exec rspec spec - + run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v1.1.2 + if: ${{ matrix.ruby == '3.0' && matrix.gemfile == 'Gemfile' }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a9004fb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -script: "bundle exec rspec spec" -env: - - CI=true -gemfile: - - Gemfile - - Gemfile-pure -rvm: - - 2.4 - - 2.5 - - 2.6 - - 2.7 - - ruby-head - - jruby -cache: bundler -sudo: false -matrix: - allow_failures: - - rvm: jruby - - rvm: ruby-head -dist: trusty diff --git a/Gemfile b/Gemfile index 8de2085..d90521f 100644 --- a/Gemfile +++ b/Gemfile @@ -5,9 +5,8 @@ gemspec gem "rdf", github: "ruby-rdf/rdf", branch: "develop" gem "rdf-spec", github: "ruby-rdf/rdf-spec", branch: "develop" gem "rdf-xsd", github: "ruby-rdf/rdf-xsd", branch: "develop" -gem "nokogiri", '~> 1.10', platforms: [:mri, :jruby] -gem "nokogumbo", '~> 2.0', platforms: :mri -gem 'equivalent-xml', '~> 0.5' +gem "nokogiri", '~> 1.12', platforms: [:mri, :jruby] +gem 'equivalent-xml', '~> 0.6' group :development, :test do gem 'ebnf', github: "dryruby/ebnf", branch: "develop" @@ -25,8 +24,8 @@ group :development, :test do end group :test do - gem 'simplecov', '~> 0.16', platforms: :mri - gem 'coveralls', '~> 0.8', platforms: :mri + gem 'simplecov', '~> 0.21', platforms: :mri + gem 'simplecov-lcov', '~> 0.8', platforms: :mri end group :debug do diff --git a/README.md b/README.md index 0b8c813..6d918ef 100755 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ RDF::RDFa parses [RDFa][RDFa 1.1 Core] into statements or triples. * Fully compliant RDFa 1.1 parser. * Template-based Writer to generate XHTML+RDFa. * Writer uses user-replaceable [Haml][Haml] -based templates to generate RDFa. -* If available, uses [Nokogiri][] for parsing HTML/SVG, falls back to REXML otherwise. For HTML5, include the [Nokogumbo][] gem for a pure-HTML5 parser with better error detection. +* If available, uses [Nokogiri][] for parsing HTML/SVG, falls back to REXML otherwise. Install with `gem install rdf-rdfa` ### Pure Ruby -In order to run as pure ruby (not requiring any C modules), this gem does not directly depend on [Nokogiri][] or [Nokogumbo][] -and falls back to using REXML. [Nokogumbo][] uses the [Gumbo pure-C HTML5 parser](https://github.com/google/gumbo-parser#readme). +In order to run as pure ruby (not requiring any C modules), this gem does not directly depend on [Nokogiri][] +and falls back to using REXML. As REXML is not really an HTML parsing library, the results will only be useful if the HTML is well-formed. -For best performance, install the [Nokogiri][] and [Nokogumbo][] gems as well. +For best performance, install the [Nokogiri][] gem as well. ### Important changes from previous versions RDFa is an evolving standard, undergoing some substantial recent changes partly due to perceived competition @@ -191,7 +191,7 @@ generates the following turtle: dc:description "A yellow rectangle with sharp corners." . ### Support for embedded N-Triples or Turtle -If the document includes a `<script>` element having an `@type` attribute whose value matches that of a loaded RDF reader (text/ntriples and text/turtle are loaded if they are availble), the data will be extracted and added to the default graph. For example: +If the document includes a `<script>` element having an `@type` attribute whose value matches that of a loaded RDF reader (text/ntriples and text/turtle are loaded if they are available), the data will be extracted and added to the default graph. For example:
@@ -397,12 +397,11 @@ The template hash defines four Haml templates: } ## Dependencies -* [Ruby](https://ruby-lang.org/) (>= 2.4) -* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1) -* [Haml](https://rubygems.org/gems/haml) (~> 5.1) -* [HTMLEntities](https://rubygems.org/gems/htmlentities) (>= 4.3) -* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10) -* Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (>= 2.0) +* [Ruby](https://ruby-lang.org/) (>= 2.6) +* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2) +* [Haml](https://rubygems.org/gems/haml) (~> 5.2) +* [HTMLEntities](https://rubygems.org/gems/htmlentities) (~> 4.3) +* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.12) ## Documentation Full documentation available on [Rubydoc.info][RDFa doc] @@ -478,4 +477,3 @@ see