Sha256: c5b2c315d8b64282e4d7a216fdb96a233b5f35e7c9953a48ad52f6df90261a25
Contents?: true
Size: 492 Bytes
Versions: 3
Compression:
Stored size: 492 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
foreman_openscap-0.5.3 | app/lib/proxy_api/available_proxy.rb |
foreman_openscap-0.5.2 | app/lib/proxy_api/available_proxy.rb |
foreman_openscap-0.5.1 | app/lib/proxy_api/available_proxy.rb |