Sha256: 2ce35e58c37c2697a359e7135ab15ce0930c33d486d65248b93fe2d0353a1943
Contents?: true
Size: 506 Bytes
Versions: 1
Compression:
Stored size: 506 Bytes
Contents
module ::ProxyAPI class AvailableProxy HTTP_ERRORS = [ EOFError, Errno::ECONNRESET, Errno::EINVAL, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError, Timeout::Error ] def initialize(args) @features = ::ProxyAPI::Features.new(args).features end def available? begin return true if @features.include?('openscap') rescue *HTTP_ERRORS return false end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foreman_openscap-0.5.0 | app/lib/proxy_api/available_proxy.rb |