Class: Dependabot::GoModules::UpdateChecker

Inherits:
UpdateCheckers::Base
  • Object
show all
Defined in:
lib/dependabot/go_modules/update_checker.rb

Instance Method Summary collapse

Instance Method Details

#latest_resolvable_versionObject


13
14
15
16
# File 'lib/dependabot/go_modules/update_checker.rb', line 13

def latest_resolvable_version
  @latest_resolvable_version ||=
    version_class.new(find_latest_resolvable_version.gsub(/^v/, ""))
end

#latest_resolvable_version_with_no_unlockObject


25
26
27
28
# File 'lib/dependabot/go_modules/update_checker.rb', line 25

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

#latest_versionObject

This is currently used to short-circuit latest_resolvable_version, with the assumption that it'll be quicker than checking resolvability. As this is quite quick in Go anyway, we just alias.


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

def latest_version
  latest_resolvable_version
end

#updated_requirementsObject


30
31
32
33
34
# File 'lib/dependabot/go_modules/update_checker.rb', line 30

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