Sha256: bc78639c8eabbad67c73f6d9fd40b6b08fe66c3b81d6a0c7643c6f74d7444386
Contents?: true
Size: 456 Bytes
Versions: 2
Compression:
Stored size: 456 Bytes
Contents
require 'rest-client' module Cuukie module Client def ping_at(port) RestClient.get "http://localhost:#{port}/ping" end def wait_for_server_at(port) loop do begin ping_at port return rescue; end end end def stop_server_at(port) # the server dies without replying, so we expect an error here RestClient.delete "http://localhost:#{port}/" rescue end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cuukie-0.3.1 | lib/cuukie/client.rb |
cuukie-0.3.0 | lib/cuukie/client.rb |