Class: Dependabot::Hex::UpdateChecker::LatestVersionFinder
- Inherits:
-
Package::PackageLatestVersionFinder
- Object
- Package::PackageLatestVersionFinder
- Dependabot::Hex::UpdateChecker::LatestVersionFinder
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/hex/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_version ⇒ Object
Constructor Details
#initialize(dependency:, dependency_files:, credentials:, ignored_versions:, security_advisories:, raise_on_ignored:, options: {}, cooldown_options: nil) ⇒ LatestVersionFinder
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 36 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 = = super end |
Instance Attribute Details
#cooldown_options ⇒ Object (readonly)
Returns the value of attribute cooldown_options.
64 65 66 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 64 def end |
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
61 62 63 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 61 def credentials @credentials end |
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
58 59 60 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 58 def dependency @dependency end |
#ignored_versions ⇒ Object (readonly)
Returns the value of attribute ignored_versions.
67 68 69 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 67 def ignored_versions @ignored_versions end |
#security_advisories ⇒ Object (readonly)
Returns the value of attribute security_advisories.
70 71 72 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 70 def security_advisories @security_advisories end |
Instance Method Details
#package_details ⇒ Object
73 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 73 def package_details; end |
#release_version ⇒ Object
76 77 78 79 80 81 82 83 84 |
# File 'lib/dependabot/hex/update_checker/latest_version_finder.rb', line 76 def release_version releases = package_releases releases = filter_prerelease_versions(T.must(releases)) releases = filter_ignored_versions(releases) releases = filter_by_cooldown(releases) releases.max_by(&:version)&.version end |