Sha256: bb51c1b5bbc1376c7918f6892f6c6996faab27b34995abdd745f6a0a1826f0bf
Contents?: true
Size: 495 Bytes
Versions: 2
Compression:
Stored size: 495 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'puma' require 'z-http' require 'multi_json' require 'stallion' require 'stub_server' def failed(http = nil) ZMachine.stop http ? fail(http.error) : fail end def requires_connection(&blk) blk.call if system('ping -t1 -c1 google.com 2>&1 > /dev/null') end def requires_port(port, &blk) port_open = true begin s = TCPSocket.new('localhost', port) s.close() rescue port_open = false end blk.call if port_open end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
z-http-request-0.2.0 | spec/helper.rb |
z-http-request-0.1.0 | spec/helper.rb |