Class: Dependabot::Hex::UpdateChecker
- Inherits:
-
UpdateCheckers::Base
- Object
- UpdateCheckers::Base
- Dependabot::Hex::UpdateChecker
show all
- 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
Defined Under Namespace
Classes: FilePreparer, RequirementsUpdater, VersionResolver
Instance Method Summary
collapse
Instance Method Details
#latest_resolvable_version ⇒ Object
28
29
30
31
32
33
34
35
|
# File 'lib/dependabot/hex/update_checker.rb', line 28
def latest_resolvable_version
@latest_resolvable_version ||=
if git_dependency?
latest_resolvable_version_for_git_dependency
else
fetch_latest_resolvable_version(unlock_requirement: true)
end
end
|
#latest_resolvable_version_with_no_unlock ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'lib/dependabot/hex/update_checker.rb', line 37
def latest_resolvable_version_with_no_unlock
@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
19
20
21
22
23
24
25
26
|
# File 'lib/dependabot/hex/update_checker.rb', line 19
def latest_version
@latest_version ||=
if git_dependency?
latest_version_for_git_dependency
else
latest_release_from_hex_registry || latest_resolvable_version
end
end
|
#updated_requirements ⇒ Object
46
47
48
49
50
51
52
|
# File 'lib/dependabot/hex/update_checker.rb', line 46
def updated_requirements
RequirementsUpdater.new(
requirements: dependency.requirements,
updated_source: updated_source,
latest_resolvable_version: latest_resolvable_version&.to_s
).updated_requirements
end
|