Class: Zypper::Upgraderepo::Requests::LocalRequest

Inherits:
DirRequest
  • Object
show all
Includes:
Traversable
Defined in:
lib/zypper/upgraderepo/requests/local.rb

Overview

This is where the local repositories are analyzed to find newer versions.

Instance Attribute Summary

Attributes inherited from DirRequest

#dir_path

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Traversable

#traverse_url

Methods inherited from DirRequest

#available?, #cache!, #forbidden?, #initialize, #not_found?, #redirected?, #redirected_to, #status, #timeout?

Constructor Details

This class inherits a constructor from Zypper::Upgraderepo::DirRequest

Class Method Details

.domainObject



76
77
78
# File 'lib/zypper/upgraderepo/requests/local.rb', line 76

def self.domain
  "default"
end

.register_protocolObject



72
73
74
# File 'lib/zypper/upgraderepo/requests/local.rb', line 72

def self.register_protocol
  ["dir"]
end

Instance Method Details

#evaluate_alternative(version) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/zypper/upgraderepo/requests/local.rb', line 80

def evaluate_alternative(version)
  if not_found?
    traverse_url(URI(url), version)
  elsif redirected?
    { url: redirected_to, message: "Linked to" }
  end
end

#max_drop_backObject



68
69
70
# File 'lib/zypper/upgraderepo/requests/local.rb', line 68

def max_drop_back
  1
end