lib/fake_sqs/server.rb in fake_sqs-0.4.0 vs lib/fake_sqs/server.rb in fake_sqs-0.4.1
- old
+ new
@@ -6,10 +6,13 @@
def initialize(options)
@host = options.fetch(:host)
@port = options.fetch(:port)
end
- def url_for(queue_id)
+ def url_for(queue_id, options = {})
+ host = options[:host] || @host
+ port = options[:port] || @port
+
"http://#{host}:#{port}/#{queue_id}"
end
end
end