Class: Dependabot::Devcontainers::UpdateChecker::LatestVersionFinder
- Inherits:
-
Package::PackageLatestVersionFinder
- Object
- Package::PackageLatestVersionFinder
- Dependabot::Devcontainers::UpdateChecker::LatestVersionFinder
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/devcontainers/update_checker/latest_version_finder.rb
Instance Attribute Summary collapse
-
#cooldown_options ⇒ Object
readonly
Returns the value of attribute cooldown_options.
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#ignored_versions ⇒ Object
readonly
Returns the value of attribute ignored_versions.
-
#security_advisories ⇒ Object
readonly
Returns the value of attribute security_advisories.
Instance Method Summary collapse
-
#initialize(dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored:, options: {}, cooldown_options: nil) ⇒ LatestVersionFinder
constructor
A new instance of LatestVersionFinder.
- #package_details ⇒ Object
- #release_versions ⇒ Object
Constructor Details
#initialize(dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored:, options: {}, cooldown_options: nil) ⇒ LatestVersionFinder
Returns a new instance of LatestVersionFinder.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 38 def initialize( dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored:, options: {}, cooldown_options: nil ) @dependency = dependency @dependency_files = dependency_files @credentials = credentials @ignored_versions = ignored_versions @security_advisories = security_advisories @raise_on_ignored = raise_on_ignored @options = @cooldown_options = super end |
Instance Attribute Details
#cooldown_options ⇒ Object (readonly)
Returns the value of attribute cooldown_options.
66 67 68 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 66 def @cooldown_options end |
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
63 64 65 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 63 def credentials @credentials end |
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
60 61 62 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 60 def dependency @dependency end |
#ignored_versions ⇒ Object (readonly)
Returns the value of attribute ignored_versions.
69 70 71 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 69 def ignored_versions @ignored_versions end |
#security_advisories ⇒ Object (readonly)
Returns the value of attribute security_advisories.
72 73 74 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 72 def security_advisories @security_advisories end |
Instance Method Details
#package_details ⇒ Object
75 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 75 def package_details; end |
#release_versions ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/dependabot/devcontainers/update_checker/latest_version_finder.rb', line 78 def release_versions releases = package_releases releases = filter_ignored_versions(T.must(releases)) releases = filter_lower_versions(releases) releases = lazy_filter_cooldown_versions(releases) releases = releases.sort_by(&:version) if releases.empty? Dependabot.logger.info("No release candidates found for #{dependency.name}, returning current version") return Array(current_version) end releases.map(&:version) end |