Class: Dependabot::GoModules::UpdateChecker

Inherits:
UpdateCheckers::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/go_modules/update_checker.rb,
lib/dependabot/go_modules/update_checker/latest_version_finder.rb

Defined Under Namespace

Classes: LatestVersionFinder

Instance Method Summary collapse

Instance Method Details

#latest_resolvable_versionObject



20
21
22
# File 'lib/dependabot/go_modules/update_checker.rb', line 20

def latest_resolvable_version
  latest_version_finder.latest_version
end

#latest_resolvable_version_with_no_unlockObject



45
46
47
48
# File 'lib/dependabot/go_modules/update_checker.rb', line 45

def latest_resolvable_version_with_no_unlock
  # Irrelevant, since Go modules uses a single dependency file
  nil
end

#latest_versionObject



28
29
30
# File 'lib/dependabot/go_modules/update_checker.rb', line 28

def latest_version
  latest_resolvable_version
end

#lowest_resolvable_security_fix_versionObject



33
34
35
36
37
# File 'lib/dependabot/go_modules/update_checker.rb', line 33

def lowest_resolvable_security_fix_version
  raise "Dependency not vulnerable!" unless vulnerable?

  lowest_security_fix_version
end

#lowest_security_fix_versionObject



40
41
42
# File 'lib/dependabot/go_modules/update_checker.rb', line 40

def lowest_security_fix_version
  latest_version_finder.lowest_security_fix_version
end

#updated_requirementsObject



51
52
53
54
55
# File 'lib/dependabot/go_modules/update_checker.rb', line 51

def updated_requirements
  dependency.requirements.map do |req|
    req.merge(requirement: latest_version)
  end
end