From 7c80a86f54cebda47010d5c4bea44737ffdb08d1 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 29 Dec 2020 13:40:22 -0800 Subject: [PATCH 01/12] Replace dependency on awesome_print with amazing_print. --- rdf-spec.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdf-spec.gemspec b/rdf-spec.gemspec index 2ea44e2..c79a78e 100755 --- a/rdf-spec.gemspec +++ b/rdf-spec.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = '>= 2.4' gem.requirements = [] gem.add_runtime_dependency 'rdf', '~> 3.1', '>= 3.1.8' - gem.add_runtime_dependency 'awesome_print', '~> 1.8' + gem.add_runtime_dependency 'amazing_print', '~> 1.2' gem.add_runtime_dependency 'rdf-isomorphic', '~> 3.1' gem.add_runtime_dependency 'rspec', '~> 3.9' gem.add_runtime_dependency 'rspec-its', '~> 1.3' From d99a038721b1736ec4baaea28fb837ee103beed3 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 29 Dec 2020 13:43:19 -0800 Subject: [PATCH 02/12] Replace dependency on awesome_print with amazing_print. --- lib/rdf/spec/matchers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdf/spec/matchers.rb b/lib/rdf/spec/matchers.rb index e3bd4f7..5c021bb 100644 --- a/lib/rdf/spec/matchers.rb +++ b/lib/rdf/spec/matchers.rb @@ -1,5 +1,5 @@ require 'rspec/matchers' # @see https://rubygems.org/gems/rspec -require 'awesome_print' +require 'amazing_print' module RDF; module Spec ## From 4fe4eb8a3288febe1a986251d14da1719bf4f20f Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 19 Jan 2021 12:33:41 -0800 Subject: [PATCH 03/12] Add coveralls config. --- .coveralls.yml | 1 + README.md | 2 +- etc/doap.ttl | 53 ++++++++++++-------------------------------------- 3 files changed, 14 insertions(+), 42 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..810a1a1 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: 9oh3FPpJIPhz4dxqpNINA5HWXXdFwuW32 diff --git a/README.md b/README.md index 64252f2..8fc8b46 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ and shared examples for Ruby projects that use RDF.rb and RSpec. [![Gem Version](https://badge.fury.io/rb/rdf-spec.png)](https://badge.fury.io/rb/rdf-spec) [![Build Status](https://github.com/ruby-rdf/rdf-spec/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-spec/actions?query=workflow%3ACI) -[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-spec/badge.svg)](https://coveralls.io/github/ruby-rdf/rdf-spec) +[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-spec/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-spec?branch=develop) [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf) ## Documentation diff --git a/etc/doap.ttl b/etc/doap.ttl index 897ab6c..030954e 100644 --- a/etc/doap.ttl +++ b/etc/doap.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix rdf: . @prefix rdfs: . @prefix dc: . @@ -6,53 +6,23 @@ @prefix doap: . <> a doap:Project ; - doap:name "RDF.rb" ; - doap:homepage ; + doap:name "RDF::Spec" ; + doap:homepage ; doap:license ; - doap:shortdesc "A Ruby library for working with Resource Description Framework (RDF) data."@en ; - doap:description "RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data."@en ; - doap:created "2007-10-23" ; + doap:shortdesc "RSpec extensions for RDF.rb."@en ; + doap:description "RDF.rb extension that provides RSpec matchers and shared examples for RDF objects."@en ; + doap:created "2007-02-03" ; doap:programming-language "Ruby" ; doap:category , ; - doap:implements , - , - ; - doap:download-page ; - doap:bug-database ; + doap:download-page <> ; + doap:bug-database ; doap:blog , ; doap:developer , , ; doap:maintainer ; - doap:documenter , , ; - doap:helper [a foaf:Person ; - foaf:name "Călin Ardelean" ; - foaf:mbox_sha1sum "274bd18402fc773ffc0606996aa1fb90b603aa29"] ; - doap:helper [a foaf:Person ; - foaf:name "Danny Gagne" ; - foaf:mbox_sha1sum "6de43e9cf7de53427fea9765706703e4d957c17b"] ; - doap:helper [a foaf:Person ; - foaf:name "Joey Geiger" ; - foaf:mbox_sha1sum "f412d743150d7b27b8468d56e69ca147917ea6fc"] ; - doap:helper [a foaf:Person ; - foaf:name "Fumihiro Kato" ; - foaf:mbox_sha1sum "d31fdd6af7a279a89bf09fdc9f7c44d9d08bb930"] ; - doap:helper [a foaf:Person ; - foaf:name "Naoki Kawamukai" ; - foaf:mbox_sha1sum "5bdcd8e2af4f5952aaeeffbdd371c41525ec761d"] ; - doap:helper [a foaf:Person ; - foaf:name "Hellekin O. Wolf" ; - foaf:mbox_sha1sum "c69f3255ff0639543cc5edfd8116eac8df16fab8"] ; - doap:helper [a foaf:Person ; - foaf:name "John Fieber" ; - foaf:mbox_sha1sum "f7653fc1ac0e82ebb32f092389bd5fc728eaae12"] ; - doap:helper [a foaf:Person ; - foaf:name "Keita Urashima" ; - foaf:mbox_sha1sum "2b4247b6fd5bb4a1383378f325784318680d5ff9"] ; - doap:helper [a foaf:Person ; - foaf:name "Pius Uzamere" ; - foaf:mbox_sha1sum "bedbbf2451e5beb38d59687c0460032aff92cd3c"] ; - foaf:maker ; - dc:creator . + doap:documenter ; + foaf:maker ; + dc:creator . a foaf:Person ; foaf:name "Arto Bendiken" ; @@ -67,6 +37,7 @@ foaf:mbox_sha1sum "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" ; foaf:homepage . + a foaf:Person ; foaf:name "Gregg Kellogg" ; foaf:mbox ; From 4fee46e01ab5d990846ff86ca5d00e507daee782 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 23 May 2021 14:15:54 -0700 Subject: [PATCH 04/12] Improve Literal#inspect to show language. --- lib/rdf/spec/inspects.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdf/spec/inspects.rb b/lib/rdf/spec/inspects.rb index 2e36617..ec65f41 100644 --- a/lib/rdf/spec/inspects.rb +++ b/lib/rdf/spec/inspects.rb @@ -3,7 +3,7 @@ class RDF::Literal def inspect - "\"#{escape(value)}\" R:L:(#{self.class.to_s.match(/([^:]*)$/)})" + "\"#{escape(value)}\"#{('@' + self.language.to_s) if self.language?} R:L:(#{self.class.to_s.match(/([^:]*)$/)})" end end From 8ec503ea107d100d7bb17f460ccd22152e1b526c Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Wed, 26 May 2021 15:10:49 -0700 Subject: [PATCH 05/12] Improve Literal#inspect for built-in datatype. --- lib/rdf/spec/inspects.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rdf/spec/inspects.rb b/lib/rdf/spec/inspects.rb index ec65f41..a45832d 100644 --- a/lib/rdf/spec/inspects.rb +++ b/lib/rdf/spec/inspects.rb @@ -3,7 +3,9 @@ class RDF::Literal def inspect - "\"#{escape(value)}\"#{('@' + self.language.to_s) if self.language?} R:L:(#{self.class.to_s.match(/([^:]*)$/)})" + klass = self.class.to_s.match(/([^:]*)$/).to_s + dt = self.datatype + "\"#{escape(value)}\"#{('@' + self.language.to_s) if self.language?} R:L:(#{klass == 'Literal' && dt ? dt : klass})" end end From 8fc8a1f1fdd54ffbcf459a36bbebbe870635d328 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Wed, 11 Aug 2021 11:43:47 -0700 Subject: [PATCH 06/12] Update CI for coveralls. --- .github/workflows/ci.yml | 10 +++++++--- .travis.yml | 18 ------------------ Gemfile | 4 ++-- spec/spec_helper.rb | 11 +++++++++-- 4 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b20426..59169de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,11 +22,11 @@ jobs: runs-on: ubuntu-latest env: CI: true + ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') }} strategy: fail-fast: false matrix: ruby: - - 2.4 - 2.5 - 2.6 - 2.7 @@ -43,5 +43,9 @@ jobs: - name: Install dependencies run: bundle install --jobs 4 --retry 3 - name: Run tests - run: bundle exec rspec spec - + run: bundle exec rspec spec || $ALLOW_FAILURES + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v1.1.2 + if: "matrix.ruby == '3.0'" + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b5997e8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: ruby -script: "bundle exec rspec spec" -env: - - CI=true -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 a2d8307..6c2ee4d 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,6 @@ group :debug do end group :development, :test do - gem 'simplecov', require: false, platforms: :mri - gem 'coveralls', require: false, platforms: :mri + gem 'simplecov', '~> 0.21', platforms: :mri + gem 'simplecov-lcov', '~> 0.8', platforms: :mri end \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2dc0a0e..42d7729 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,10 +2,17 @@ require 'rdf' begin require 'simplecov' - require 'coveralls' + require 'simplecov-lcov' + + SimpleCov::Formatter::LcovFormatter.config do |config| + #Coveralls is coverage by default/lcov. Send info results + config.report_with_single_file = true + config.single_report_path = 'coverage/lcov.info' + end + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter + SimpleCov::Formatter::LcovFormatter ]) SimpleCov.start do add_filter "matchers.rb" From 2ba642d904b13df44d71298c9071f7c209f840d4 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 26 Oct 2021 11:40:08 -0700 Subject: [PATCH 07/12] Update CI. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59169de..05a735c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - name: Install dependencies run: bundle install --jobs 4 --retry 3 - name: Run tests - run: bundle exec rspec spec || $ALLOW_FAILURES + 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'" From 64e160330629ff84d327a627923406bc416f6f06 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 29 Nov 2021 14:53:01 -0800 Subject: [PATCH 08/12] Update dependencies and version for 3.2.0 release. Minimum ruby version now 2.6. --- .github/workflows/ci.yml | 1 - VERSION | 2 +- rdf-spec.gemspec | 10 +++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05a735c..d0a8564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,6 @@ jobs: fail-fast: false matrix: ruby: - - 2.5 - 2.6 - 2.7 - 3.0 diff --git a/VERSION b/VERSION index ef538c2..944880f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.2 +3.2.0 diff --git a/rdf-spec.gemspec b/rdf-spec.gemspec index c79a78e..21f8306 100755 --- a/rdf-spec.gemspec +++ b/rdf-spec.gemspec @@ -18,15 +18,15 @@ Gem::Specification.new do |gem| gem.files = %w(AUTHORS CREDITS README.md UNLICENSE VERSION) + Dir.glob('etc/*') + Dir.glob('lib/**/*.rb') + Dir.glob('spec/*.rb') gem.require_paths = %w(lib) - gem.required_ruby_version = '>= 2.4' + gem.required_ruby_version = '>= 2.6' gem.requirements = [] - gem.add_runtime_dependency 'rdf', '~> 3.1', '>= 3.1.8' - gem.add_runtime_dependency 'amazing_print', '~> 1.2' + gem.add_runtime_dependency 'rdf', '~> 3.2' + gem.add_runtime_dependency 'amazing_print', '~> 1.4' gem.add_runtime_dependency 'rdf-isomorphic', '~> 3.1' - gem.add_runtime_dependency 'rspec', '~> 3.9' + gem.add_runtime_dependency 'rspec', '~> 3.10' gem.add_runtime_dependency 'rspec-its', '~> 1.3' gem.add_runtime_dependency 'rexml', '~> 3.2' # For Webmock - gem.add_runtime_dependency 'webmock', '~> 3.7' + gem.add_runtime_dependency 'webmock', '~> 3.14' gem.add_development_dependency 'yard' , '~> 0.9' gem.post_install_message = nil end From 0dba5714402ee898c78c485c8612cf00033a1aee Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 29 Nov 2021 15:00:53 -0800 Subject: [PATCH 09/12] Update documentation and version sync for 3.2. --- README.md | 4 ++-- rdf-spec.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8fc8b46..1c21f6c 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Note that in most cases, if the instance is empty and mutable, the appropriate s ## Dependencies -* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.0) -* [RSpec](https://rubygems.org/gems/rspec) (~> 3.7) +* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2) +* [RSpec](https://rubygems.org/gems/rspec) (~> 3.10) ## Installation diff --git a/rdf-spec.gemspec b/rdf-spec.gemspec index 21f8306..456b4fd 100755 --- a/rdf-spec.gemspec +++ b/rdf-spec.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |gem| gem.requirements = [] gem.add_runtime_dependency 'rdf', '~> 3.2' gem.add_runtime_dependency 'amazing_print', '~> 1.4' - gem.add_runtime_dependency 'rdf-isomorphic', '~> 3.1' + gem.add_runtime_dependency 'rdf-isomorphic', '~> 3.2' gem.add_runtime_dependency 'rspec', '~> 3.10' gem.add_runtime_dependency 'rspec-its', '~> 1.3' gem.add_runtime_dependency 'rexml', '~> 3.2' # For Webmock From 3c6977448ecbb6bd85efc5e402ee5dd17c25c3b1 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 26 Dec 2021 22:36:23 -0800 Subject: [PATCH 10/12] CI on Ruby 3.1. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0a8564..d3aefe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,7 @@ jobs: - 2.6 - 2.7 - 3.0 + - 3.1 - ruby-head - jruby steps: From 4f76d968cc10375d0cf4f97d99e7fe7b2e17c2cf Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Wed, 29 Dec 2021 12:01:38 -0800 Subject: [PATCH 11/12] Minor yard update. --- lib/rdf/spec/literal.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rdf/spec/literal.rb b/lib/rdf/spec/literal.rb index 76321eb..a9d4401 100644 --- a/lib/rdf/spec/literal.rb +++ b/lib/rdf/spec/literal.rb @@ -5,6 +5,7 @@ # include the examples for `RDF::Literal`, `RDF::Literal validation`, # `RDF::Literal canonicalization`, and `RDF::Literal lookup`. +# @private shared_examples 'RDF::Literal' do |value, datatype_uri| include_examples 'RDF::Literal with datatype and grammar', value, datatype_uri include_examples 'RDF::Literal equality', value, value From 20528c307b54fc6d45c935bd06d4e5b2cb103975 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Wed, 29 Dec 2021 13:06:42 -0800 Subject: [PATCH 12/12] Fix Struct initialization for upcoming change to Ruby after 3.1. --- lib/rdf/spec/matchers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdf/spec/matchers.rb b/lib/rdf/spec/matchers.rb index 5c021bb..1f60d4d 100644 --- a/lib/rdf/spec/matchers.rb +++ b/lib/rdf/spec/matchers.rb @@ -273,7 +273,7 @@ def io_name @info = if (info.id rescue false) info elsif info.is_a?(Logger) - Info.new(logger: info) + Info.new({logger: info}) elsif info.is_a?(Hash) Info.new(info[:id], info[:logger], info[:action], info[:result], info[:format], info[:base], info[:prefixes]) else