Skip to content

Commit ceb41d3

Browse files
committed
Finish 3.1.1
2 parents 2f98a5d + 3c802f0 commit ceb41d3

22 files changed

+267
-198
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 }} ${{ matrix.gemfile }}
14+
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
15+
runs-on: ubuntu-latest
16+
env:
17+
CI: true
18+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
ruby:
23+
- 2.4
24+
- 2.5
25+
- 2.6
26+
- 2.7
27+
#- ruby-head # Until net-http-persistent updated
28+
- jruby
29+
gemfile:
30+
- Gemfile
31+
- Gemfile-pure
32+
steps:
33+
- name: Clone repository
34+
uses: actions/checkout@v2
35+
- name: Set up Ruby
36+
uses: ruby/setup-ruby@v1
37+
with:
38+
ruby-version: ${{ matrix.ruby }}
39+
- name: Install dependencies
40+
run: bundle install --jobs 4 --retry 3
41+
- name: Run tests
42+
run: bundle exec rspec spec
43+

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ rvm:
1111
- 2.5
1212
- 2.6
1313
- 2.7
14+
- ruby-head
1415
- jruby
1516
cache: bundler
1617
sudo: false
1718
matrix:
1819
allow_failures:
20+
- rvm: ruby-head
1921
- rvm: jruby
2022
dist: trusty

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Community contributions are essential for keeping Ruby RDF great. We want to kee
66

77
This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
88

9-
* create or respond to an issue on the [Github Repository](http://github.com/ruby-rdf/sparql-client/issues)
9+
* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/sparql-client/issues)
1010
* Fork and clone the repo:
1111
`git clone [email protected]:your-username/sparql-client.git`
1212
* Install bundle:
@@ -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/sparql-client/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/

README.md

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
This is a [Ruby][] implementation of a [SPARQL][] client for [RDF.rb][].
44

5-
* <http://ruby-rdf.github.com/sparql-client/>
5+
* <https://ruby-rdf.github.com/sparql-client/>
66

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

1112
## Features
1213

@@ -18,7 +19,7 @@ This is a [Ruby][] implementation of a [SPARQL][] client for [RDF.rb][].
1819
* Supports tuple result sets in both XML, JSON, CSV and TSV formats, with JSON being
1920
the preferred default for content-negotiation purposes.
2021
* Supports graph results in any RDF serialization format understood by RDF.rb.
21-
* Returns results using the [RDF.rb object model][RDF.rb model].
22+
* Returns results using the RDF.rb object model.
2223
* Supports accessing endpoints as read/write [`RDF::Repository`][RDF::Repository]
2324
instances {SPARQL::Client::Repository}.
2425

@@ -123,15 +124,15 @@ sparql.delete_data(data)
123124

124125
## Dependencies
125126

126-
* [Ruby](http://ruby-lang.org/) (>= 2.4)
127-
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1)
128-
* [Net::HTTP::Persistent](http://rubygems.org/gems/net-http-persistent) (~> 3.1)
129-
* Soft dependency on [SPARQL](http://rubygems.org/gems/sparql) (~> 3.1)
130-
* Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.10)
127+
* [Ruby](https://ruby-lang.org/) (>= 2.4)
128+
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1)
129+
* [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) (~> 3.1)
130+
* Soft dependency on [SPARQL](https://rubygems.org/gems/sparql) (~> 3.1)
131+
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10)
131132

132133
## Installation
133134

134-
The recommended installation method is via [RubyGems](http://rubygems.org/).
135+
The recommended installation method is via [RubyGems](https://rubygems.org/).
135136
To install the latest official release of the `SPARQL::Client` gem, do:
136137

137138
% [sudo] gem install sparql-client
@@ -145,31 +146,31 @@ To get a local working copy of the development repository, do:
145146
Alternatively, download the latest development version as a tarball as
146147
follows:
147148

148-
% wget http://github.com/ruby-rdf/sparql-client/tarball/master
149+
% wget https://github.com/ruby-rdf/sparql-client/tarball/master
149150

150151
## Mailing List
151152

152-
* <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
153+
* <https://lists.w3.org/Archives/Public/public-rdf-ruby/>
153154

154155
## Authors
155156

156-
* [Arto Bendiken](http://github.com/bendiken) - <http://ar.to/>
157-
* [Ben Lavender](http://github.com/bhuga) - <http://bhuga.net/>
158-
* [Gregg Kellogg](http://github.com/gkellogg) - <http://greggkellogg.net/>
157+
* [Arto Bendiken](https://github.com/artob) - <https://ar.to/>
158+
* [Ben Lavender](https://github.com/bhuga) - <https://bhuga.net/>
159+
* [Gregg Kellogg](https://github.com/gkellogg) - <https://greggkellogg.net/>
159160

160161
## Contributors
161162

162-
* [Christoph Badura](http://github.com/bad) - <http://github.com/bad>
163-
* [James Hetherington](http://github.com/jamespjh) - <http://twitter.com/jamespjh>
164-
* [Gabriel Horner](http://github.com/cldwalker) - <http://tagaholic.me/>
165-
* [Nicholas Humfrey](http://github.com/njh) - <http://www.aelius.com/njh/>
166-
* [Fumihiro Kato](http://github.com/fumi) - <http://fumi.me/>
167-
* [David Nielsen](http://github.com/drankard) - <http://github.com/drankard>
168-
* [Thamaraiselvan Poomalai](http://github.com/selvan) - <http://softonaut.blogspot.com/>
169-
* [Michael Sokol](http://github.com/mikaa123) - <http://sokolmichael.com/>
170-
* [Yves Raimond](http://github.com/moustaki) - <http://moustaki.org/>
171-
* [Thomas Feron](http://github.com/thoferon) - <http://github.com/thoferon>
172-
* [Nick Gottlieb](http://github.com/ngottlieb) - <http://www.nicholasgottlieb.com>
163+
* [Christoph Badura](https://github.com/bad) - <https://github.com/bad>
164+
* [James Hetherington](https://github.com/jamespjh) - <https://twitter.com/jamespjh>
165+
* [Gabriel Horner](https://github.com/cldwalker) - <https://tagaholic.me/>
166+
* [Nicholas Humfrey](https://github.com/njh) - <https://www.aelius.com/njh/>
167+
* [Fumihiro Kato](https://github.com/fumi) - <https://fumi.me/>
168+
* [David Nielsen](https://github.com/drankard) - <https://github.com/drankard>
169+
* [Thamaraiselvan Poomalai](https://github.com/selvan) - <https://softonaut.blogspot.com/>
170+
* [Michael Sokol](https://github.com/mikaa123) - <https://sokolmichael.com/>
171+
* [Yves Raimond](https://github.com/moustaki) - <https://moustaki.org/>
172+
* [Thomas Feron](https://github.com/thoferon) - <https://github.com/thoferon>
173+
* [Nick Gottlieb](https://github.com/ngottlieb) - <https://www.nicholasgottlieb.com>
173174

174175
## Contributing
175176
This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
@@ -184,31 +185,32 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
184185
list in the the `README`. Alphabetical order applies.
185186
* Do note that in order for us to merge any non-trivial changes (as a rule
186187
of thumb, additions larger than about 15 lines of code), we need an
187-
explicit [public domain dedication][PDD] on record from you.
188+
explicit [public domain dedication][PDD] on record from you,
189+
which you will be asked to agree to on the first commit to a repo within the organization.
190+
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
188191

189192
## Resources
190193

191-
* <http://ruby-rdf.github.com/sparql-client/>
192-
* <http://github.com/ruby-rdf/sparql-client>
193-
* <http://rubygems.org/gems/sparql-client>
194-
* <http://raa.ruby-lang.org/project/sparql-client/>
195-
* <http://www.ohloh.net/p/rdf>
194+
* <https://ruby-rdf.github.com/sparql-client/>
195+
* <https://github.com/ruby-rdf/sparql-client>
196+
* <https://rubygems.org/gems/sparql-client>
197+
* <https://raa.ruby-lang.org/project/sparql-client/>
198+
* <https://www.ohloh.net/p/rdf>
196199

197200
## License
198201

199202
This is free and unencumbered public domain software. For more information,
200-
see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
201-
202-
[Ruby]: http://ruby-lang.org/
203-
[RDF]: http://www.w3.org/RDF/
204-
[SPARQL]: http://en.wikipedia.org/wiki/SPARQL
205-
[SPARQL JSON]: http://www.w3.org/TR/rdf-sparql-json-res/
206-
[RDF.rb]: http://rubygems.org/gems/rdf
207-
[RDF.rb model]: http://blog.datagraph.org/2010/03/rdf-for-ruby
208-
[RDF::Repository]: http://rubydoc.info/github/ruby-rdf/rdf/RDF/Repository
209-
[DSL]: http://en.wikipedia.org/wiki/Domain-specific_language
203+
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
204+
205+
[Ruby]: https://ruby-lang.org/
206+
[RDF]: https://www.w3.org/RDF/
207+
[SPARQL]: https://en.wikipedia.org/wiki/SPARQL
208+
[SPARQL JSON]: https://www.w3.org/TR/rdf-sparql-json-res/
209+
[RDF.rb]: https://rubygems.org/gems/rdf
210+
[RDF::Repository]: https://rubydoc.info/github/ruby-rdf/rdf/RDF/Repository
211+
[DSL]: https://en.wikipedia.org/wiki/Domain-specific_language
210212
"domain-specific language"
211-
[YARD]: http://yardoc.org/
212-
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
213-
[PDD]: http://unlicense.org/#unlicensing-contributions
214-
[Backports]: http://rubygems.org/gems/backports
213+
[YARD]: https://yardoc.org/
214+
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
215+
[PDD]: https://unlicense.org/#unlicensing-contributions
216+
[Backports]: https://rubygems.org/gems/backports

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib')))
33
require 'rubygems'
44
begin
5-
require 'rakefile' # @see http://github.com/bendiken/rakefile
5+
require 'rakefile' # @see https://github.com/artob/rakefile
66
rescue LoadError => e
77
end
88

UNLICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2121
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2222
OTHER DEALINGS IN THE SOFTWARE.
2323

24-
For more information, please refer to <http://unlicense.org/>
24+
For more information, please refer to <https://unlicense.org/>

VERSION

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

etc/doap.ttl

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@base <http://rubygems.org/gems/sparql-client> .
1+
@base <https://rubygems.org/gems/sparql-client> .
22
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
33
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
44
@prefix dc: <http://purl.org/dc/terms/> .
@@ -7,27 +7,26 @@
77

88
<> a doap:Project ;
99
doap:name "SPARQL::Client" ;
10-
doap:homepage <http://rubygems.org/gems/sparql-client> ;
11-
doap:license <http://creativecommons.org/licenses/publicdomain/> ;
10+
doap:homepage <https://github.com/ruby-rdf/sparql-client> ;
11+
doap:license <https://unlicense.org/1.0/> ;
1212
doap:shortdesc "SPARQL client for RDF.rb."@en ;
1313
doap:description """Executes SPARQL queries and updates against a remote SPARQL 1.0 or 1.1 endpoint,
1414
or against a local repository. Generates SPARQL queries using a simple DSL."""@en ;
1515
doap:created "2007-11-03" ;
16-
doap:platform "Ruby" ;
17-
doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
18-
<http://dbpedia.org/resource/Ruby_(programming_language)> ;
19-
doap:implements <http://www.w3.org/TR/sparql11-query/>,
20-
<http://www.w3.org/TR/sparql11-update/>,
21-
<http://www.w3.org/TR/sparql11-results-json/>,
22-
<http://www.w3.org/TR/sparql11-results-csv-tsv/>,
23-
<http://www.w3.org/TR/rdf-sparql-XMLres/> ;
24-
doap:download-page <http://rubygems.org/gems/sparql-client>;
25-
doap:bug-database <http://rubygems.org/gems/sparql-client/issues> ;
26-
doap:blog <http://ar.to/>, <http://blog.datagraph.org/>, <http://greggkellogg.net/> ;
27-
doap:vendor <http://datagraph.org/> ;
28-
doap:developer <http://ar.to/#self>, <http://bhuga.net/#ben>, <http://greggkellogg.net/foaf#me> ;
29-
doap:maintainer <http://ar.to/#self>, <http://bhuga.net/#ben>, <http://greggkellogg.net/foaf#me> ;
30-
doap:documenter <http://ar.to/#self>, <http://bhuga.net/#ben>, <http://greggkellogg.net/foaf#me> ;
16+
doap:programming-language "Ruby" ;
17+
doap:category <https://dbpedia.org/resource/Resource_Description_Framework>,
18+
<https://dbpedia.org/resource/Ruby_(programming_language)> ;
19+
doap:implements <https://www.w3.org/TR/sparql11-query/>,
20+
<https://www.w3.org/TR/sparql11-update/>,
21+
<https://www.w3.org/TR/sparql11-results-json/>,
22+
<https://www.w3.org/TR/sparql11-results-csv-tsv/>,
23+
<https://www.w3.org/TR/rdf-sparql-XMLres/> ;
24+
doap:download-page <https://github.com/ruby-rdf/sparql-client>;
25+
doap:bug-database <https://github.com/ruby-rdf/sparql-client/sparql-client/issues> ;
26+
doap:blog <https://ar.to/>, <https://greggkellogg.net/> ;
27+
doap:developer <https://ar.to/#self>, <https://bhuga.net/#ben>, <https://greggkellogg.net/foaf#me> ;
28+
doap:maintainer <https://greggkellogg.net/foaf#me> ;
29+
doap:documenter <https://ar.to/#self>, <https://bhuga.net/#ben>, <https://greggkellogg.net/foaf#me> ;
3130
doap:helper [a foaf:Person ;
3231
foaf:name "Christoph Badura" ;
3332
foaf:mbox_sha1sum "3a9c4bbe13feec63b1c8292ebf90e8da6caa0afd"] ;
@@ -61,28 +60,26 @@
6160
doap:helper [a foaf:Person ;
6261
foaf:name "Thomas Feron" ;
6362
foaf:mbox_sha1sum "8c6ba34fcf8705a63af3858140ba0107b9ee756a"] ;
64-
foaf:maker <http://ar.to/#self> ;
65-
dc:creator <http://ar.to/#self> .
63+
foaf:maker <https://ar.to/#self> ;
64+
dc:creator <https://ar.to/#self> .
6665

67-
<http://ar.to/#self> a foaf:Person ;
66+
<http:s//ar.to/#self> a foaf:Person ;
6867
foaf:name "Arto Bendiken" ;
6968
foaf:mbox <mailto:[email protected]> ;
7069
foaf:mbox_sha1sum "a033f652c84a4d73b8c26d318c2395699dd2bdfb",
7170
"d0737cceb55eb7d740578d2db1bc0727e3ed49ce" ;
72-
foaf:homepage <http://ar.to/> ;
73-
foaf:made <> ;
74-
rdfs:isDefinedBy <http://datagraph.org/bendiken/foaf> .
71+
foaf:homepage <https://ar.to/> ;
72+
foaf:made <> .
7573

76-
<http://bhuga.net/#ben> a foaf:Person ;
74+
<https://bhuga.net/#ben> a foaf:Person ;
7775
foaf:name "Ben Lavender" ;
7876
foaf:mbox <mailto:[email protected]> ;
7977
foaf:mbox_sha1sum "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" ;
80-
foaf:homepage <http://bhuga.net/> ;
81-
rdfs:isDefinedBy <http://datagraph.org/bhuga/foaf> .
78+
foaf:homepage <https://bhuga.net/> .
8279

83-
<http://greggkellogg.net/foaf#me> a foaf:Person ;
80+
<https://greggkellogg.net/foaf#me> a foaf:Person ;
8481
foaf:name "Gregg Kellogg" ;
8582
foaf:mbox <mailto:[email protected]> ;
8683
foaf:mbox_sha1sum "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" ;
87-
foaf:homepage <http://greggkellogg.net/>;
88-
rdfs:isDefinedBy <http://greggkellogg.net/foaf> .
84+
foaf:homepage <https://greggkellogg.net/>;
85+
rdfs:isDefinedBy <https://greggkellogg.net/foaf> .

examples/issue92.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require 'rdf'
2+
require 'sparql/client'
3+
dnbt = RDF::Vocabulary.new("https://d-nb.info/standards/elementset/dnb#")
4+
rdf_gndid = RDF::Literal.new("https://d-nb.info/gnd/1059461498")
5+
sparql_client = SPARQL::Client.new("http://127.0.0.1:9292/")
6+
gndo = RDF::Vocabulary.new("http://d-nb.info/gnd/standards/elementset/gnd#")
7+
query = sparql_client.select.where([:subject, dnbt.deprecatedUri, rdf_gndid]).where([:subject, gndo.gndIdentifier, :gndid])
8+
query.each_solution { |solution| new_gndid = solution[:gndid].to_s }

examples/issue96.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require 'sparql/client'
2+
SPARQL::Client::Query
3+
.select
4+
.where(%i[s p o])
5+
.values(:s, RDF::URI('http://example.com/1'), RDF::URI('http://example.com/2'))

examples/workergnome-literal-issue.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#require 'rdf/turtle'
22
require 'sparql/client'
3-
require 'byebug'
43

54
sparql = SPARQL::Client.new("http://data.americanartcollaborative.org/sparql")
65
uri = RDF.URI("http://data.crystalbridges.org/object/2258")
76
label = RDF::RDFS.label
87

98
query = sparql.construct([uri, label, :o]).where([uri, label, :o])
10-
require 'byebug'; byebug
119
query.each_statement do |s|
1210
puts s.object.inspect
1311
end

0 commit comments

Comments
 (0)