mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-13 00:02:57 -04:00
removed code branching based on ruby version from coverage
This commit is contained in:
parent
a0900fae2a
commit
b39272381d
@ -63,6 +63,7 @@ module Faraday
|
||||
plugin(:compression)
|
||||
plugin(:persistent)
|
||||
|
||||
# :nocov:
|
||||
module ReasonPlugin
|
||||
if RUBY_VERSION < "2.5"
|
||||
def self.load_dependencies(*)
|
||||
@ -85,6 +86,7 @@ module Faraday
|
||||
end
|
||||
end
|
||||
end
|
||||
# :nocov:
|
||||
plugin(ReasonPlugin)
|
||||
end
|
||||
|
||||
|
@ -67,6 +67,7 @@ module HTTPX
|
||||
end
|
||||
end
|
||||
|
||||
# :nocov:
|
||||
if RUBY_VERSION < "2.2"
|
||||
def parse_altsvc_origin(alt_origin)
|
||||
alt_proto, alt_origin = alt_origin.split("=")
|
||||
@ -87,5 +88,6 @@ module HTTPX
|
||||
URI.parse("#{alt_proto}://#{alt_origin}")
|
||||
end
|
||||
end
|
||||
# :nocov:
|
||||
end
|
||||
end
|
||||
|
@ -68,6 +68,7 @@ module HTTPX
|
||||
::IO::WaitWritable
|
||||
end
|
||||
|
||||
# :nocov:
|
||||
if RUBY_VERSION < "2.3"
|
||||
def read(*)
|
||||
super
|
||||
@ -93,6 +94,7 @@ module HTTPX
|
||||
end
|
||||
end
|
||||
end
|
||||
# :nocov:
|
||||
|
||||
def inspect
|
||||
id = @io.closed? ? "closed" : @io.to_io.fileno
|
||||
|
@ -75,6 +75,7 @@ module HTTPX
|
||||
::IO::WaitReadable
|
||||
end
|
||||
|
||||
# :nocov:
|
||||
if RUBY_VERSION < "2.3"
|
||||
def read(size, buffer)
|
||||
@io.read_nonblock(size, buffer)
|
||||
@ -112,6 +113,7 @@ module HTTPX
|
||||
siz
|
||||
end
|
||||
end
|
||||
# :nocov:
|
||||
|
||||
def close
|
||||
return if @keep_open || closed?
|
||||
|
@ -34,6 +34,7 @@ module HTTPX
|
||||
siz
|
||||
end
|
||||
|
||||
# :nocov:
|
||||
if RUBY_VERSION < "2.3"
|
||||
def read(size, buffer)
|
||||
data, _ = @io.recvfrom_nonblock(size)
|
||||
@ -53,5 +54,6 @@ module HTTPX
|
||||
rescue IOError
|
||||
end
|
||||
end
|
||||
# :nocov:
|
||||
end
|
||||
end
|
||||
|
@ -60,6 +60,7 @@ module HTTPX
|
||||
@state = :idle
|
||||
end
|
||||
|
||||
# :nocov:
|
||||
if RUBY_VERSION < "2.2"
|
||||
# rubocop: disable Lint/UriEscapeUnescape:
|
||||
def initialize_with_escape(verb, uri, options = {})
|
||||
@ -69,6 +70,7 @@ module HTTPX
|
||||
alias_method :initialize, :initialize_with_escape
|
||||
# rubocop: enable Lint/UriEscapeUnescape:
|
||||
end
|
||||
# :nocov:
|
||||
|
||||
def merge_headers(h)
|
||||
@headers = @headers.merge(h)
|
||||
|
@ -14,6 +14,7 @@ module HTTPX
|
||||
"AAAA" => Resolv::DNS::Resource::IN::AAAA,
|
||||
}.freeze
|
||||
|
||||
# :nocov:
|
||||
DEFAULTS = if RUBY_VERSION < "2.2"
|
||||
{
|
||||
**Resolv::DNS::Config.default_config_hash,
|
||||
@ -30,6 +31,7 @@ module HTTPX
|
||||
record_types: RECORD_TYPES.keys,
|
||||
}.freeze
|
||||
end
|
||||
# :nocov:
|
||||
|
||||
# nameservers for ipv6 are misconfigured in certain systems;
|
||||
# this can use an unexpected endless loop
|
||||
|
Loading…
x
Reference in New Issue
Block a user