lib/acfs/adapter/typhoeus.rb in acfs-0.10.0 vs lib/acfs/adapter/typhoeus.rb in acfs-0.11.0
- old
+ new
@@ -19,10 +19,16 @@
#
def queue(req)
hydra.queue convert_request(req)
end
+ # Remove all requests from queue.
+ #
+ def clear
+ hydra.abort
+ end
+
protected
def hydra
@hydra ||= ::Typhoeus::Hydra.new
end
@@ -39,10 +45,13 @@
request
end
def convert_response(request, response)
- Acfs::Response.new(request, response.code, response.headers, response.body)
+ Acfs::Response.new request,
+ status: response.code,
+ headers: response.headers,
+ body: response.body
end
end
end
end