Class: Dependabot::GoModules::UpdateChecker::LatestVersionFinder
- Inherits:
-
Object
- Object
- Dependabot::GoModules::UpdateChecker::LatestVersionFinder
- Defined in:
- lib/dependabot/go_modules/update_checker/latest_version_finder.rb
Constant Summary collapse
- RESOLVABILITY_ERROR_REGEXES =
[ # Package url/proxy doesn't include any redirect meta tags /no go-import meta tags/, # Package url 404s /404 Not Found/, /Repository not found/, /unrecognized import path/, /malformed module path/, # (Private) module could not be fetched /module .*: git ls-remote .*: exit status 128/m.freeze ].freeze
- INVALID_VERSION_REGEX =
/version "[^"]+" invalid/m.freeze
- PSEUDO_VERSION_REGEX =
/\b\d{14}-[0-9a-f]{12}$/.freeze
Instance Method Summary collapse
-
#initialize(dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored: false, goprivate:) ⇒ LatestVersionFinder
constructor
A new instance of LatestVersionFinder.
- #latest_version ⇒ Object
- #lowest_security_fix_version ⇒ Object
Constructor Details
#initialize(dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored: false, goprivate:) ⇒ LatestVersionFinder
Returns a new instance of LatestVersionFinder.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/dependabot/go_modules/update_checker/latest_version_finder.rb', line 30 def initialize(dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored: false, goprivate:) @dependency = dependency @dependency_files = dependency_files @credentials = credentials @ignored_versions = ignored_versions @security_advisories = security_advisories @raise_on_ignored = raise_on_ignored @goprivate = goprivate end |
Instance Method Details
#latest_version ⇒ Object
42 43 44 |
# File 'lib/dependabot/go_modules/update_checker/latest_version_finder.rb', line 42 def latest_version @latest_version ||= fetch_latest_version end |
#lowest_security_fix_version ⇒ Object
46 47 48 |
# File 'lib/dependabot/go_modules/update_checker/latest_version_finder.rb', line 46 def lowest_security_fix_version @lowest_security_fix_version ||= fetch_lowest_security_fix_version end |