Class: Zypper::Upgraderepo::Requests::HttpRequest
Overview
This is where the repository pages are scraped and analyzed to find newer versions.
Constant Summary
Constants inherited
from PageRequest
PageRequest::USER_AGENT
Instance Attribute Summary
Attributes inherited from PageRequest
#page
Class Method Summary
collapse
Instance Method Summary
collapse
#traverse_url
Methods inherited from PageRequest
#available?, #cache!, #forbidden?, #initialize, #not_found?, #redirected?, #redirected_to, #status, #timeout?
Class Method Details
.domain ⇒ Object
105
106
107
|
# File 'lib/zypper/upgraderepo/requests/http.rb', line 105
def self.domain
"default"
end
|
.register_protocol ⇒ Object
101
102
103
|
# File 'lib/zypper/upgraderepo/requests/http.rb', line 101
def self.register_protocol
%w[https http]
end
|
Instance Method Details
#evaluate_alternative(version) ⇒ Object
109
110
111
112
113
114
115
|
# File 'lib/zypper/upgraderepo/requests/http.rb', line 109
def evaluate_alternative(version)
if not_found?
traverse_url(URI(url), version)
elsif redirected?
{ url: redirected_to, message: "Redirected to:" }
end
end
|
#max_drop_back ⇒ Object
97
98
99
|
# File 'lib/zypper/upgraderepo/requests/http.rb', line 97
def max_drop_back
0
end
|