Skip to content

Commit fbac9be

Browse files
committed
Finish 3.1.2
2 parents 3a85d1c + 3701b36 commit fbac9be

File tree

9 files changed

+89
-27
lines changed

9 files changed

+89
-27
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow runs continuous CI across different versions of ruby on all branches and pull requests to develop.
2+
3+
name: CI
4+
on:
5+
push:
6+
branches: [ '**' ]
7+
pull_request:
8+
branches: [ develop ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
tests:
13+
name: Ruby ${{ matrix.ruby }}
14+
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
15+
runs-on: ubuntu-latest
16+
env:
17+
CI: true
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
ruby:
22+
- 2.4
23+
- 2.5
24+
- 2.6
25+
- 2.7
26+
#- 3.0 # Commented out until net-http-persistent is updaated
27+
#- ruby-head # Commented out until net-http-persistent is updaated
28+
- jruby
29+
steps:
30+
- name: Clone repository
31+
uses: actions/checkout@v2
32+
- name: Set up Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: ${{ matrix.ruby }}
36+
- name: Install dependencies
37+
run: bundle install --jobs 4 --retry 3
38+
- name: Run tests
39+
run: bundle exec rspec spec
40+

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ rvm:
77
- 2.5
88
- 2.6
99
- 2.7
10+
- ruby-head
1011
- jruby
1112
cache: bundler
1213
sudo: false
1314
matrix:
1415
allow_failures:
1516
- rvm: jruby
17+
- rvm: ruby-head
1618
dist: trusty

CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage devel
2828
enough, be assured we will eventually add you in there.
2929
* Do note that in order for us to merge any non-trivial changes (as a rule
3030
of thumb, additions larger than about 15 lines of code), we need an
31-
explicit [public domain dedication][PDD] on record from you.
31+
explicit [public domain dedication][PDD] on record from you,
32+
which you will be asked to agree to on the first commit to a repo within the organization.
33+
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
3234

33-
[YARD]: http://yardoc.org/
34-
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
35-
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
36-
[pr]: https://github.com/ruby-rdf/ld-patch/compare/
35+
[YARD]: https://yardoc.org/
36+
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
37+
[PDD]: https://unlicense.org/#unlicensing-contributions
38+
[pr]: https://github.com/ruby-rdf/rdf/compare/

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ group :development, :test do
2121
gem 'sparql-client', github: "ruby-rdf/sparql-client", branch: "develop"
2222
gem 'sxp', github: "dryruby/sxp.rb", branch: "develop"
2323
gem 'rest-client-components'
24+
gem 'erubis'
2425
gem 'simplecov', platforms: :mri
2526
gem 'coveralls', '~> 0.8', platforms: :mri
26-
gem 'psych', platforms: [:mri, :rbx]
27+
gem 'awesome_print', github: 'akshaymohite/awesome_print'
2728
end

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
This is a [Ruby][] implementation of [LD Patch][] for [RDF.rb][].
44

5-
[![Gem Version](https://badge.fury.io/rb/ld-patch.png)](http://badge.fury.io/rb/ld-patch)
6-
[![Build Status](https://travis-ci.org/ruby-rdf/ld-patch.png?branch=master)](http://travis-ci.org/ruby-rdf/ld-patch)
7-
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/ld-patch/badge.svg)](https://coveralls.io/r/ruby-rdf/ld-patch)
5+
[![Gem Version](https://badge.fury.io/rb/ld-patch.png)](https://badge.fury.io/rb/ld-patch)
6+
[![Build Status](https://github.com/ruby-rdf/ld-patch/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/ld-patch/actions?query=workflow%3ACI)
7+
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/ld-patch/badge.svg)](https://coveralls.io/github/ruby-rdf/ld-patch)
8+
[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
89

910
## Description
1011

@@ -94,7 +95,11 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
9495
* Do document every method you add using [YARD][] annotations. Read the [tutorial][YARD-GS] or just look at the existing code for examples.
9596
* Don't touch the `.gemspec`, `VERSION` or `AUTHORS` files. If you need to change them, do so on your private branch only.
9697
* Do feel free to add yourself to the `CREDITS` file and the corresponding list in the the `README`. Alphabetical order applies.
97-
* 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.
98+
* Do note that in order for us to merge any non-trivial changes (as a rule
99+
of thumb, additions larger than about 15 lines of code), we need an
100+
explicit [public domain dedication][PDD] on record from you,
101+
which you will be asked to agree to on the first commit to a repo within the organization.
102+
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
98103

99104
## License
100105
This is free and unencumbered public domain software. For more information,
@@ -106,7 +111,7 @@ A copy of the [LD Patch EBNF](file:etc/ld-patch.ebnf) and derived parser files a
106111
[RDF]: http://www.w3.org/RDF/
107112
[YARD]: http://yardoc.org/
108113
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
109-
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
114+
[PDD]: https://unlicense.org/#unlicensing-contributions
110115
[RDF.rb]: https://rubygems.org/gems/rdf
111116
[RDF::XSD]: https://rubygems.org/gems/rdf-xsd
112117
[EBNF]: https://rubygems.org/gems/ebnf

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.1
1+
3.1.2

ld-patch.gemspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ Gem::Specification.new do |gem|
2323
gem.required_ruby_version = '>= 2.4'
2424
gem.requirements = []
2525
gem.add_runtime_dependency 'rdf', '~> 3.1'
26-
gem.add_runtime_dependency 'ebnf', '~> 2.0'
26+
gem.add_runtime_dependency 'ebnf', '~> 2.1'
2727
gem.add_runtime_dependency 'sparql', '~> 3.1'
2828
gem.add_runtime_dependency 'sxp', '~> 1.1'
2929
gem.add_runtime_dependency 'rdf-xsd', '~> 3.1'
3030

3131
gem.add_development_dependency 'json-ld', '~> 3.1'
32-
gem.add_development_dependency 'rack', '~> 2.0'
32+
gem.add_development_dependency 'rack', '~> 2.2'
3333
gem.add_development_dependency 'rdf-spec', '~> 3.1'
3434
gem.add_development_dependency 'open-uri-cached', '~> 0.0', '>= 0.0.5'
35-
gem.add_development_dependency 'rspec', '~> 3.9'
35+
gem.add_development_dependency 'rspec', '~> 3.10'
3636
gem.add_development_dependency 'rspec-its', '~> 1.3'
37-
gem.add_development_dependency 'yard' , '~> 0.9.20'
38-
gem.add_development_dependency 'webmock', '~> 3.7'
37+
gem.add_development_dependency 'yard' , '~> 0.9'
38+
gem.add_development_dependency 'webmock', '~> 3.11'
3939

4040
gem.post_install_message = nil
4141
end

lib/ld/patch/algebra/patch.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ class Patch < SPARQL::Algebra::Operator
2323
def execute(graph, options = {})
2424
debug(options) {"Delete"}
2525

26-
graph.transaction(mutable: true) do |tx|
26+
if graph.respond_to?(:transaction)
27+
graph.transaction(mutable: true) do |tx|
28+
operands.inject(RDF::Query::Solutions.new([RDF::Query::Solution.new])) do |bindings, op|
29+
# Invoke operand using bindings from prvious operation
30+
op.execute(tx, options.merge(bindings: bindings))
31+
end
32+
end
33+
else
2734
operands.inject(RDF::Query::Solutions.new([RDF::Query::Solution.new])) do |bindings, op|
2835
# Invoke operand using bindings from prvious operation
29-
op.execute(tx, options.merge(bindings: bindings))
36+
op.execute(graph, options.merge(bindings: bindings))
3037
end
3138
end
3239
end

spec/spec_helper.rb

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55
require 'matchers'
66
require 'webmock/rspec'
77
require 'rdf/turtle'
8-
require 'simplecov'
9-
require 'coveralls'
10-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
11-
SimpleCov::Formatter::HTMLFormatter,
12-
Coveralls::SimpleCov::Formatter
13-
])
14-
SimpleCov.start do
15-
add_filter "/spec/"
8+
9+
begin
10+
require 'simplecov'
11+
require 'coveralls'
12+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
13+
SimpleCov::Formatter::HTMLFormatter,
14+
Coveralls::SimpleCov::Formatter
15+
])
16+
SimpleCov.start do
17+
add_filter "/spec/"
18+
end
19+
rescue LoadError
20+
# Not coverage
1621
end
1722

1823
require 'ld/patch'

0 commit comments

Comments
 (0)