diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaa1eb6..67236c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,16 +18,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: - - 2.6 - - 2.7 - - 3.0 - - 3.1 - - ruby-head - - jruby + ruby: ['3.0', 3.1, 3.2, ruby-head, jruby] steps: - name: Clone repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -37,7 +31,7 @@ jobs: - name: Run tests 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'" + uses: coverallsapp/github-action@v2 + if: "matrix.ruby == '3.2'" with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml new file mode 100644 index 0000000..65aea93 --- /dev/null +++ b/.github/workflows/generate-docs.yml @@ -0,0 +1,27 @@ +name: Build & deploy documentation +on: + push: + branches: + - master + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + name: Update gh-pages with docs + steps: + - name: Clone repository + uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.1" + - name: Install required gem dependencies + run: gem install yard --no-document + - name: Build YARD Ruby Documentation + run: yardoc + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/yard + publish_branch: gh-pages diff --git a/Gemfile b/Gemfile index e1584f0..180b240 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gemspec gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop" -gem "nokogiri" group :development do gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop" @@ -20,6 +19,6 @@ group :development do end group :test do - gem 'simplecov', '~> 0.21', platforms: :mri + gem 'simplecov', '~> 0.22', platforms: :mri gem 'simplecov-lcov', '~> 0.8', platforms: :mri end diff --git a/README.md b/README.md index 4f8ddc0..f3be638 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [TriX][] reader/writer for [RDF.rb][RDF.rb] . -[![Gem Version](https://badge.fury.io/rb/rdf-trix.png)](https://badge.fury.io/rb/rdf-trix) +[![Gem Version](https://badge.fury.io/rb/rdf-trix.svg)](https://badge.fury.io/rb/rdf-trix) [![Build Status](https://github.com/ruby-rdf/rdf-trix/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-trix/actions?query=workflow%3ACI) [![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-trix/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-trix?branch=develop) [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf) @@ -17,7 +17,7 @@ Install with `gem install rdf-trix` * 100% free and unencumbered [public domain](https://unlicense.org/) software. * Implements a complete parser and serializer for [TriX][]. -* Compatible with Ruby >= 2.6, and JRuby 9+. +* Compatible with Ruby >= 3.0, and JRuby 9+. ### Support for xml:base @@ -91,9 +91,9 @@ Write a repository to a file: end ## Dependencies -* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1) -* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10) -* Soft dependency on [Libxml-Ruby](https://rubygems.org/gems/libxml-ruby) (>= 3.0) +* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.3) +* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.15) +* Soft dependency on [Libxml-Ruby](https://rubygems.org/gems/libxml-ruby) (>= 4.1) ## Documentation @@ -104,9 +104,9 @@ Write a repository to a file: ## Dependencies -* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2) - [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.12) - [LibXML](https://rubygems.org/gems/libxml) (>= 3.2) +* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.3) + [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.15) + [LibXML](https://rubygems.org/gems/libxml) (>= 4.1) ## Installation diff --git a/VERSION b/VERSION index 944880f..15a2799 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.0 +3.3.0 diff --git a/rdf-trix.gemspec b/rdf-trix.gemspec index 3b19bbf..9630e02 100755 --- a/rdf-trix.gemspec +++ b/rdf-trix.gemspec @@ -12,6 +12,13 @@ Gem::Specification.new do |gem| gem.license = 'Unlicense' gem.summary = 'TriX support for RDF.rb.' gem.description = 'RDF.rb extension for parsing/serializing TriX data.' + gem.metadata = { + "documentation_uri" => "https://ruby-rdf.github.io/rdf-trix", + "bug_tracker_uri" => "https://github.com/ruby-rdf/rdf-trix/issues", + "homepage_uri" => "https://github.com/ruby-rdf/rdf-trix", + "mailing_list_uri" => "https://lists.w3.org/Archives/Public/public-rdf-ruby/", + "source_code_uri" => "https://github.com/ruby-rdf/rdf-trix", + } gem.author = 'Arto Bendiken' gem.email = 'public-rdf-ruby@w3.org' @@ -20,17 +27,17 @@ Gem::Specification.new do |gem| gem.files = %w(AUTHORS CREDITS README.md UNLICENSE VERSION etc/doap.xml) + Dir.glob('lib/**/*.rb') gem.require_paths = %w(lib) - gem.required_ruby_version = '>= 2.6' - gem.add_runtime_dependency 'rdf', '~> 3.2' - gem.add_runtime_dependency 'rdf-xsd', '~> 3.2' - gem.add_development_dependency 'rdf-spec', '~> 3.2' - gem.add_development_dependency 'rdf-trig', '~> 3.2' - gem.add_development_dependency 'rdf-ordered-repo', '~> 3.2' - gem.add_development_dependency 'rspec', '~> 3.10' + gem.required_ruby_version = '>= 3.0' + gem.add_runtime_dependency 'rdf', '~> 3.3' + gem.add_runtime_dependency 'rdf-xsd', '~> 3.3' + gem.add_development_dependency 'rdf-spec', '~> 3.3' + gem.add_development_dependency 'rdf-trig', '~> 3.3' + gem.add_development_dependency 'rdf-ordered-repo', '~> 3.3' + gem.add_development_dependency 'rspec', '~> 3.12' gem.add_development_dependency 'rspec-its', '~> 1.3' gem.add_development_dependency 'yard' , '~> 0.9' - gem.add_development_dependency 'nokogiri', '~> 1.10' # 1.12 Ruby >= 2.5 - gem.add_development_dependency 'libxml-ruby', '~> 3.2' unless is_java + gem.add_development_dependency 'nokogiri', '~> 1.15', '>= 1.15.4' + gem.add_development_dependency 'libxml-ruby', '~> 4.1' unless is_java gem.post_install_message = nil end diff --git a/spec/reader_spec.rb b/spec/reader_spec.rb index 06dbb3b..8c4fb78 100644 --- a/spec/reader_spec.rb +++ b/spec/reader_spec.rb @@ -250,7 +250,7 @@ }, }.each do |name, params| it name do - res = RDF::OrderedRepo.new << RDF::NQuads::Reader.new(params[:expect]) + res = RDF::Repository.new << RDF::NQuads::Reader.new(params[:expect]) expect(parse(params[:input], library: impl.to_sym, **params)).to be_equivalent_graph(res, logger: @logger) end unless Array(params[:except]).include?(impl.to_sym) end @@ -466,7 +466,7 @@ }, }.each do |name, params| it name do - res = RDF::OrderedRepo.new << RDF::NQuads::Reader.new(params[:expect], rdfstar: true) + res = RDF::Repository.new << RDF::NQuads::Reader.new(params[:expect], rdfstar: true) expect(parse(params[:input], library: impl.to_sym, rdfstar: true, **params)).to be_equivalent_graph(res, logger: @logger) end unless Array(params[:except]).include?(impl.to_sym) end @@ -482,7 +482,7 @@ def parse(input, **options) validate: false, canonicalize: false, }.merge(options) - graph = options[:graph] || RDF::OrderedRepo.new + graph = options[:graph] || RDF::Repository.new RDF::TriX::Reader.new(input, **options).each do |statement| graph << statement end diff --git a/spec/writer_spec.rb b/spec/writer_spec.rb index bbd10ad..6f9d3b5 100644 --- a/spec/writer_spec.rb +++ b/spec/writer_spec.rb @@ -68,9 +68,9 @@ }, }.each do |name, params| it name do - graph = RDF::OrderedRepo.new << RDF::NQuads::Reader.new(params[:input]) + graph = RDF::Repository.new << RDF::NQuads::Reader.new(params[:input]) trix = graph.dump(:trix) - graph2 = RDF::OrderedRepo.new << RDF::TriX::Reader.new(trix) + graph2 = RDF::Repository.new << RDF::TriX::Reader.new(trix) expect(graph2).to be_equivalent_graph(graph) end end @@ -81,7 +81,7 @@ nt = %( . ) - graph = RDF::OrderedRepo.new << RDF::NQuads::Reader.new(nt) + graph = RDF::Repository.new << RDF::NQuads::Reader.new(nt) graph.dump(:trix, base_uri: "http://release/") end @@ -193,9 +193,9 @@ }, }.each do |name, params| it name do - graph = RDF::OrderedRepo.new {|g| g << params[:input]} + graph = RDF::Repository.new {|g| g << params[:input]} trix = graph.dump(:trix) - graph2 = RDF::OrderedRepo.new << RDF::TriX::Reader.new(trix, rdfstar: true) + graph2 = RDF::Repository.new << RDF::TriX::Reader.new(trix, rdfstar: true) expect(graph2).to be_equivalent_graph(graph) end end