Skip to content

Commit

Permalink
Finish 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Dec 29, 2021
2 parents 21594f0 + cd20185 commit d3c3823
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 47 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ 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
- 3.0
- 3.1
- ruby-head
- jruby
steps:
Expand All @@ -42,5 +42,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/[email protected]
if: "matrix.ruby == '3.0'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ gem 'rdf',
group :development, :test do
gem 'json-ld', git: 'https://github.com/ruby-rdf/json-ld.git', branch: 'develop'
gem 'rdf-isomorphic', git: 'https://github.com/ruby-rdf/rdf-isomorphic.git', branch: 'develop'
gem 'rdf-aggregate-repo', git: 'https://github.com/ruby-rdf/rdf-aggregate-repo.git', branch: 'develop'
gem 'rdf-ordered-repo', git: 'https://github.com/ruby-rdf/rdf-ordered-repo.git', branch: 'develop'
gem 'rdf-reasoner', git: 'https://github.com/ruby-rdf/rdf-reasoner.git', branch: 'develop'
gem 'rdf-spec', git: 'https://github.com/ruby-rdf/rdf-spec.git', branch: 'develop'
gem 'rdf-turtle', git: 'https://github.com/ruby-rdf/rdf-turtle.git', branch: 'develop'
gem 'rdf-xsd', git: 'https://github.com/ruby-rdf/rdf-xsd.git', branch: 'develop'
gem 'sparql', git: 'https://github.com/ruby-rdf/sparql.git', branch: 'develop'
gem 'sparql-client', git: 'https://github.com/ruby-rdf/sparql-client.git', branch: 'develop'
gem 'sxp', git: 'https://github.com/dryruby/sxp.rb.git', branch: 'develop'

gem 'rake'
gem 'simplecov', '~> 0.16', platform: :mri
gem 'coveralls', '~> 0.8', '>= 0.8.23', platform: :mri

gem 'earl-report', platform: :mri
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
end

group :debug do
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ This implementation is certainly not performant. Some things that can be be cons

## Dependencies

* [Ruby](https://ruby-lang.org/) (>= 2.4)
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1, => 3.1.8)
* [SPARQL](https://rubygems.org/gems/sparql) (~> 3.1, => 3.1.4)
* [json-ld](https://rubygems.org/gems/sparql) (~> 3.1, => 3.1.7)
* [sxp](https://rubygems.org/gems/sxp) (~> 1.1)
* [Ruby](https://ruby-lang.org/) (>= 2.6)
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2)
* [SPARQL](https://rubygems.org/gems/sparql) (~> 3.2)
* [json-ld](https://rubygems.org/gems/json-ld) (~> 3.2)
* [sxp](https://rubygems.org/gems/sxp) (~> 1.2)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.2.0
8 changes: 6 additions & 2 deletions lib/shacl/shapes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ def to_sxp_bin
[:shapes, super]
end

def to_sxp
to_sxp_bin.to_sxp
##
# Transform Shapes into an SXP.
#
# @return [String]
def to_sxp(**options)
to_sxp_bin.to_sxp(**options)
end

SHAPES_FRAME = JSON.parse(%({
Expand Down
8 changes: 6 additions & 2 deletions lib/shacl/validation_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ def to_sxp_bin
[:ValidationReport, conform?, results].to_sxp_bin
end

def to_sxp
self.to_sxp_bin.to_sxp
##
# Transform Report to SXP
#
# @return [String]
def to_sxp(**options)
self.to_sxp_bin.to_sxp(**options)
end

def to_s
Expand Down
8 changes: 6 additions & 2 deletions lib/shacl/validation_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ def to_sxp_bin
end.to_sxp_bin
end

def to_sxp
self.to_sxp_bin.to_sxp
##
# Transform ValidationResult to SXP
#
# @return [String]
def to_sxp(**options)
self.to_sxp_bin.to_sxp(**options)
end

##
Expand Down
16 changes: 8 additions & 8 deletions shacl.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Gem::Specification.new do |gem|
gem.files = %w(README.md LICENSE VERSION etc/doap.ttl) + Dir.glob('lib/**/*.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 'json-ld', '~> 3.1', '>= 3.1.7'
gem.add_runtime_dependency 'sxp', '~> 1.1'
gem.add_runtime_dependency 'sparql', '~> 3.1'
gem.add_runtime_dependency 'rdf', '~> 3.2'
gem.add_runtime_dependency 'json-ld', '~> 3.2'
gem.add_runtime_dependency 'sxp', '~> 1.2'
gem.add_runtime_dependency 'sparql', '~> 3.2'

gem.add_development_dependency 'rdf-spec', '~> 3.1'
gem.add_development_dependency 'rdf-turtle', '~> 3.1'
gem.add_development_dependency 'rdf-xsd', '~> 3.1'
gem.add_development_dependency 'rdf-spec', '~> 3.2'
gem.add_development_dependency 'rdf-turtle', '~> 3.2'
gem.add_development_dependency 'rdf-xsd', '~> 3.2'
gem.add_development_dependency 'rspec', '~> 3.10'
gem.add_development_dependency 'rspec-its', '~> 1.3'
gem.add_development_dependency 'yard', '~> 0.9'
Expand Down
11 changes: 9 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
require 'rdf/ordered_repo'
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 "/spec/"
Expand Down

0 comments on commit d3c3823

Please sign in to comment.