Class: Dependabot::Hex::UpdateChecker
- Inherits:
-
UpdateCheckers::Base
- Object
- UpdateCheckers::Base
- Dependabot::Hex::UpdateChecker
show all
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/hex/update_checker.rb,
lib/dependabot/hex/update_checker/file_preparer.rb,
lib/dependabot/hex/update_checker/version_resolver.rb,
lib/dependabot/hex/update_checker/requirements_updater.rb,
lib/dependabot/hex/update_checker/latest_version_finder.rb
Defined Under Namespace
Classes: FilePreparer, LatestVersionFinder, RequirementsUpdater, VersionResolver
Instance Method Summary
collapse
Instance Method Details
#latest_resolvable_version ⇒ Object
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/dependabot/hex/update_checker.rb', line 35
def latest_resolvable_version
@latest_resolvable_version ||= T.let(
if git_dependency?
latest_resolvable_version_for_git_dependency
else
fetch_latest_resolvable_version(unlock_requirement: true)
end,
T.nilable(T.any(String, Dependabot::Version, Gem::Version))
)
end
|
#latest_resolvable_version_with_no_unlock ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/dependabot/hex/update_checker.rb', line 47
def latest_resolvable_version_with_no_unlock
@latest_resolvable_version_with_no_unlock = T.let(
nil, T.any(String, T.nilable(Dependabot::Version))
)
@latest_resolvable_version_with_no_unlock ||=
if git_dependency?
latest_resolvable_commit_with_unchanged_git_source
else
fetch_latest_resolvable_version(unlock_requirement: false)
end
end
|
#latest_version ⇒ Object
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/dependabot/hex/update_checker.rb', line 23
def latest_version
@latest_version ||= T.let(
if git_dependency?
latest_version_for_git_dependency
else
latest_release_from_hex_registry || latest_resolvable_version
end,
T.nilable(T.any(String, Dependabot::Version, Gem::Version))
)
end
|
#updated_requirements ⇒ Object
61
62
63
64
65
66
67
|
# File 'lib/dependabot/hex/update_checker.rb', line 61
def updated_requirements
RequirementsUpdater.new(
requirements: dependency.requirements,
updated_source: updated_source,
latest_resolvable_version: latest_resolvable_version&.to_s
).updated_requirements
end
|