Skip to content

Commit

Permalink
Finish 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Sep 1, 2023
2 parents 79670ad + 58bc635 commit ee36569
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7, '3.0', 3.1, 3.2, ruby-head, jruby]
ruby: ['3.0', 3.1, 3.2, ruby-head, jruby]
gemfile:
- Gemfile
- Gemfile-pure
Expand All @@ -37,6 +37,6 @@ jobs:
run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
if: ${{ matrix.ruby == '3.0' && matrix.gemfile == 'Gemfile' }}
if: ${{ matrix.ruby == '3.2' && matrix.gemfile == 'Gemfile' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gemspec
gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop"
gem 'rdf-aggregate-repo', git: "https://github.com/ruby-rdf/rdf-aggregate-repo", branch: "develop"
gem 'sparql', git: "https://github.com/ruby-rdf/sparql", branch: "develop"
gem "nokogiri", '~> 1.13', '>= 1.13.4'
gem "nokogiri", '~> 1.15', '>= 1.15.4'

group :development, :test do
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"
Expand All @@ -15,7 +15,7 @@ group :development, :test do
gem "rdf-xsd", git: "https://github.com/ruby-rdf/rdf-xsd", branch: "develop"
gem 'sxp', git: "https://github.com/dryruby/sxp.rb", branch: "develop"
gem "redcarpet", platform: :ruby
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov', '~> 0.22', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
end

Expand Down
1 change: 0 additions & 1 deletion Gemfile-pure
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ gemspec
gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop"
gem 'rdf-aggregate-repo', git: "https://github.com/ruby-rdf/rdf-aggregate-repo", branch: "develop"
gem 'sparql', git: "https://github.com/ruby-rdf/sparql", branch: "develop"
#gem "nokogiri", '~> 1.8'

group :development, :test do
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ sparql.delete_data(data)

## Dependencies

* [Ruby](https://ruby-lang.org/) (>= 2.6)
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2)
* [Ruby](https://ruby-lang.org/) (>= 3.0)
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.3)
* [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) (~> 4.0, >= 4.0.1)
* Soft dependency on [SPARQL](https://rubygems.org/gems/sparql) (~> 3.2)
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.12)
* Soft dependency on [SPARQL](https://rubygems.org/gems/sparql) (~> 3.3)
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.15)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.0
10 changes: 5 additions & 5 deletions sparql-client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ Gem::Specification.new do |gem|
gem.bindir = %q(bin)
gem.require_paths = %w(lib)

gem.required_ruby_version = '>= 2.6'
gem.required_ruby_version = '>= 3.0'
gem.requirements = []
gem.add_runtime_dependency 'rdf', '~> 3.2', '>= 3.2.11'
gem.add_runtime_dependency 'rdf', '~> 3.3'
gem.add_runtime_dependency 'net-http-persistent', '~> 4.0', '>= 4.0.2'
gem.add_development_dependency 'rdf-spec', '~> 3.2'
gem.add_development_dependency 'sparql', '~> 3.2'
gem.add_development_dependency 'rdf-spec', '~> 3.3'
gem.add_development_dependency 'sparql', '~> 3.3'
gem.add_development_dependency 'rspec', '~> 3.12'
gem.add_development_dependency 'rspec-its', '~> 1.3'
gem.add_development_dependency 'webmock', '~> 3.14'
gem.add_development_dependency 'webmock', '~> 3.19'
gem.add_development_dependency 'yard' , '~> 0.9'

gem.post_install_message = nil
Expand Down
18 changes: 9 additions & 9 deletions spec/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def response(header)

it "handles successful response with plain header" do
expect(subject).to receive(:request).and_yield response('text/plain')
expect(RDF::Reader).to receive(:for).with(content_type: 'text/plain').and_call_original
subject.query(query)
expect(RDF::Reader).to receive(:for).with(content_type: 'application/n-triples').and_call_original
subject.query(query, content_type: 'application/n-triples')
end

it "handles successful response with boolean header" do
Expand Down Expand Up @@ -109,17 +109,17 @@ def response(header)
end

it "handles successful response with custom headers" do
expect(subject).to receive(:request).with(anything, {"Authorization" => "Basic XXX=="}).
and_yield response('text/plain')
subject.query(query, headers: {"Authorization" => "Basic XXX=="})
expect(subject).to receive(:request).with(anything, {"Authorization" => "Basic XXX==", "Content-Type" => "application/n-triples"}).
and_yield response('application/n-triples')
subject.query(query, headers: {"Authorization" => "Basic XXX==", "Content-Type" => "application/n-triples"})
end

it "handles successful response with initial custom headers" do
options = {headers: {"Authorization" => "Basic XXX=="}, method: :get}
client = SPARQL::Client.new('http://data.linkedmdb.org/sparql', **options)
client.instance_variable_set :@http, double(request: response('text/plain'))
client.instance_variable_set :@http, double(request: response('application/n-triples'))
expect(Net::HTTP::Get).to receive(:new).with(anything, hash_including(options[:headers]))
client.query(query)
client.query(query, content_type: 'application/n-triples')
end

it "enables overriding the http method" do
Expand Down Expand Up @@ -194,15 +194,15 @@ def response(header)
to_return(body: '', status: 200, headers: { 'Content-Type' => 'application/n-triples'})
subject.query(construct_query)
expect(WebMock).to have_requested(:post, "http://data.linkedmdb.org/sparql").
with(headers: {'Accept'=>'application/n-triples, text/plain, */*;q=0.1'})
with(headers: {'Accept'=>'application/n-triples, */*;q=0.1'})
end

it "uses application/n-triples for DESCRIBE" do
WebMock.stub_request(:any, 'http://data.linkedmdb.org/sparql').
to_return(body: '', status: 200, headers: { 'Content-Type' => 'application/n-triples'})
subject.query(describe_query)
expect(WebMock).to have_requested(:post, "http://data.linkedmdb.org/sparql").
with(headers: {'Accept'=>'application/n-triples, text/plain, */*;q=0.1'})
with(headers: {'Accept'=>'application/n-triples, */*;q=0.1'})
end

it "uses application/sparql-results+json for SELECT" do
Expand Down

0 comments on commit ee36569

Please sign in to comment.