Sha256: 46e9068139876bc814249ec23f89fc09e02e2f6ed038bb7c8c6eed95d6eaaff3
Contents?: true
Size: 515 Bytes
Versions: 1
Compression:
Stored size: 515 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'em-http' require 'em-http/middleware/oauth2' require 'yajl' require 'stallion' require 'stub_server' def failed(http = nil) EventMachine.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
em-http-request-1.1.0 | spec/helper.rb |