From 3a7776387c789c7bcd8019b9e77f3d3d624c7aac Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Sun, 28 Jul 2024 12:14:52 +1200 Subject: [PATCH] Add optional `after(error)` argument. --- lib/sus/fixtures/async/http/server_context.rb | 2 +- sus-fixtures-async-http.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sus/fixtures/async/http/server_context.rb b/lib/sus/fixtures/async/http/server_context.rb index 3620dfb..9a5938b 100644 --- a/lib/sus/fixtures/async/http/server_context.rb +++ b/lib/sus/fixtures/async/http/server_context.rb @@ -126,7 +126,7 @@ def before @client = make_client(@client_endpoint) end - def after + def after(error = nil) # We add a timeout here, to avoid hanging in `@client.close`: ::Async::Task.current.with_timeout(1) do @client&.close diff --git a/sus-fixtures-async-http.gemspec b/sus-fixtures-async-http.gemspec index d273500..3b7592e 100644 --- a/sus-fixtures-async-http.gemspec +++ b/sus-fixtures-async-http.gemspec @@ -26,6 +26,6 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 3.1" spec.add_dependency "async-http", "~> 0.54" - spec.add_dependency "sus", "~> 0.10" + spec.add_dependency "sus", "~> 0.31" spec.add_dependency "sus-fixtures-async", "~> 0.1" end