Sha256: fb0f344ad8c39feeca79e46ecae3b1ed19869b5ec0d95b3b54ef19a76efab4b3
Contents?: true
Size: 521 Bytes
Versions: 2
Compression:
Stored size: 521 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'em-http' require 'em-http/middleware/oauth2' require 'multi_json' 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-http-request-1.1.2 | spec/helper.rb |
em-http-request-1.1.1 | spec/helper.rb |