lib/acfs/adapter/typhoeus.rb in acfs-0.14.0 vs lib/acfs/adapter/typhoeus.rb in acfs-0.15.0

- old
+ new

@@ -3,29 +3,25 @@ module Acfs module Adapter # Adapter for Typhoeus. # - class Typhoeus + class Typhoeus < Base - # Run all queued requests. - # - def run(request = nil) - return hydra.run unless request + def start + hydra.run + end - convert_request(request).run + def abort + hydra.abort end - # Add a new request or URL to the queue. - # - def queue(req) - hydra.queue convert_request(req) + def run(request) + convert_request(request).run end - # Remove all requests from queue. - # - def clear - hydra.abort + def queue(request) + hydra.queue convert_request request end protected def hydra @hydra ||= ::Typhoeus::Hydra.new