Class: Dependabot::Python::UpdateChecker::LatestVersionFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/python/update_checker/latest_version_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(dependency:, dependency_files:, credentials:, ignored_versions:, raise_on_ignored: false, security_advisories:) ⇒ LatestVersionFinder

Returns a new instance of LatestVersionFinder.



19
20
21
22
23
24
25
26
27
28
# File 'lib/dependabot/python/update_checker/latest_version_finder.rb', line 19

def initialize(dependency:, dependency_files:, credentials:,
               ignored_versions:, raise_on_ignored: false,
               security_advisories:)
  @dependency          = dependency
  @dependency_files    = dependency_files
  @credentials         = credentials
  @ignored_versions    = ignored_versions
  @raise_on_ignored    = raise_on_ignored
  @security_advisories = security_advisories
end

Instance Method Details

#latest_version(python_version: nil) ⇒ Object



30
31
32
33
# File 'lib/dependabot/python/update_checker/latest_version_finder.rb', line 30

def latest_version(python_version: nil)
  @latest_version ||=
    fetch_latest_version(python_version: python_version)
end

#latest_version_with_no_unlock(python_version: nil) ⇒ Object



35
36
37
38
# File 'lib/dependabot/python/update_checker/latest_version_finder.rb', line 35

def latest_version_with_no_unlock(python_version: nil)
  @latest_version_with_no_unlock ||=
    fetch_latest_version_with_no_unlock(python_version: python_version)
end

#lowest_security_fix_version(python_version: nil) ⇒ Object



40
41
42
43
# File 'lib/dependabot/python/update_checker/latest_version_finder.rb', line 40

def lowest_security_fix_version(python_version: nil)
  @lowest_security_fix_version ||=
    fetch_lowest_security_fix_version(python_version: python_version)
end