Class: Dependabot::Nuget::UpdateChecker
- Inherits:
-
UpdateCheckers::Base
- Object
- UpdateCheckers::Base
- Dependabot::Nuget::UpdateChecker
show all
- Defined in:
- lib/dependabot/nuget/update_checker.rb,
lib/dependabot/nuget/update_checker/version_finder.rb,
lib/dependabot/nuget/update_checker/property_updater.rb,
lib/dependabot/nuget/update_checker/repository_finder.rb,
lib/dependabot/nuget/update_checker/requirements_updater.rb
Defined Under Namespace
Classes: PropertyUpdater, RepositoryFinder, RequirementsUpdater, VersionFinder
Instance Method Summary
collapse
Instance Method Details
#latest_resolvable_version ⇒ Object
18
19
20
21
22
23
|
# File 'lib/dependabot/nuget/update_checker.rb', line 18
def latest_resolvable_version
return nil if version_comes_from_multi_dependency_property?
latest_version
end
|
#latest_resolvable_version_with_no_unlock ⇒ Object
35
36
37
38
|
# File 'lib/dependabot/nuget/update_checker.rb', line 35
def latest_resolvable_version_with_no_unlock
nil
end
|
#latest_version ⇒ Object
14
15
16
|
# File 'lib/dependabot/nuget/update_checker.rb', line 14
def latest_version
@latest_version = latest_version_details&.fetch(:version)
end
|
#lowest_resolvable_security_fix_version ⇒ Object
29
30
31
32
33
|
# File 'lib/dependabot/nuget/update_checker.rb', line 29
def lowest_resolvable_security_fix_version
return nil if version_comes_from_multi_dependency_property?
lowest_security_fix_version
end
|
#lowest_security_fix_version ⇒ Object
25
26
27
|
# File 'lib/dependabot/nuget/update_checker.rb', line 25
def lowest_security_fix_version
lowest_security_fix_version_details&.fetch(:version)
end
|
#requirements_unlocked_or_can_be? ⇒ Boolean
58
59
60
61
62
63
64
65
66
|
# File 'lib/dependabot/nuget/update_checker.rb', line 58
def requirements_unlocked_or_can_be?
namespace = Nuget::FileParser::PropertyValueFinder
dependency.requirements.none? do |req|
req.fetch(:requirement)&.match?(namespace::PROPERTY_REGEX)
end
end
|
#up_to_date? ⇒ Boolean
49
50
51
52
53
54
55
56
|
# File 'lib/dependabot/nuget/update_checker.rb', line 49
def up_to_date?
return true unless requirements_unlocked_or_can_be?
super
end
|
#updated_requirements ⇒ Object
40
41
42
43
44
45
46
47
|
# File 'lib/dependabot/nuget/update_checker.rb', line 40
def updated_requirements
RequirementsUpdater.new(
requirements: dependency.requirements,
latest_version: preferred_resolvable_version&.to_s,
source_details: preferred_version_details&.
slice(:nuspec_url, :repo_url, :source_url)
).updated_requirements
end
|