Skip to content

Commit 9c527f0

Browse files
committed
Finish 3.1.2
2 parents ceb41d3 + e77ec5f commit 9c527f0

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
- 2.5
2525
- 2.6
2626
- 2.7
27-
#- ruby-head # Until net-http-persistent updated
27+
- 3.0
28+
- ruby-head
2829
- jruby
2930
gemfile:
3031
- Gemfile

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gemspec
55
gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop"
66
gem 'rdf-aggregate-repo', git: "https://github.com/ruby-rdf/rdf-aggregate-repo", branch: "develop"
77
gem 'sparql', git: "https://github.com/ruby-rdf/sparql", branch: "develop"
8-
gem "nokogiri", '~> 1.8'
8+
gem "nokogiri", '~> 1.11'
99

1010
group :development, :test do
1111
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ sparql.delete_data(data)
126126

127127
* [Ruby](https://ruby-lang.org/) (>= 2.4)
128128
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1)
129-
* [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) (~> 3.1)
129+
* [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) (~> 4.0, >= 4.0.1)
130130
* Soft dependency on [SPARQL](https://rubygems.org/gems/sparql) (~> 3.1)
131-
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10)
131+
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.11)
132132

133133
## Installation
134134

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

lib/sparql/client.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def initialize(url, **options, &block)
102102
@http = http_klass(@url.scheme)
103103

104104
# Close the http connection when object is deallocated
105-
ObjectSpace.define_finalizer(self, proc {@http.shutdown if @http.respond_to?(:shutdown)})
105+
ObjectSpace.define_finalizer(self, self.class.finalize(@http))
106106
end
107107

108108
if block_given?
@@ -113,6 +113,13 @@ def initialize(url, **options, &block)
113113
end
114114
end
115115

116+
# Close the http connection when object is deallocated
117+
def self.finalize(klass)
118+
proc do
119+
klass.shutdown if klass.respond_to?(:shutdown)
120+
end
121+
end
122+
116123
##
117124
# Closes a client instance by finishing the connection.
118125
# The client is unavailable for any further data operations; an IOError is raised if such an attempt is made. I/O streams are automatically closed when they are claimed by the garbage collector.

sparql-client.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Gem::Specification.new do |gem|
2525
gem.required_ruby_version = '>= 2.4'
2626
gem.requirements = []
2727
gem.add_runtime_dependency 'rdf', '~> 3.1'
28-
gem.add_runtime_dependency 'net-http-persistent', '~> 4.0'
28+
gem.add_runtime_dependency 'net-http-persistent', '~> 4.0', '>= 4.0.1'
2929
gem.add_development_dependency 'rdf-spec', '~> 3.1'
3030
gem.add_development_dependency 'sparql', '~> 3.1'
3131
gem.add_development_dependency 'rspec', '~> 3.10'

0 commit comments

Comments
 (0)