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
25
26
27
28
|
# File 'lib/dependabot/nuget/update_checker.rb', line 25
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
|
#requirements_unlocked_or_can_be? ⇒ Boolean
48
49
50
51
52
53
54
55
56
|
# File 'lib/dependabot/nuget/update_checker.rb', line 48
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
39
40
41
42
43
44
45
46
|
# File 'lib/dependabot/nuget/update_checker.rb', line 39
def up_to_date?
return true unless requirements_unlocked_or_can_be?
super
end
|
#updated_requirements ⇒ Object
30
31
32
33
34
35
36
37
|
# File 'lib/dependabot/nuget/update_checker.rb', line 30
def updated_requirements
RequirementsUpdater.new(
requirements: dependency.requirements,
latest_version: latest_version&.to_s,
source_details: latest_version_details&.
slice(:nuspec_url, :repo_url, :source_url)
).updated_requirements
end
|