Class: Dependabot::Vcpkg::ManifestBaseline
- Inherits:
-
Object
- Object
- Dependabot::Vcpkg::ManifestBaseline
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/vcpkg/manifest_baseline.rb
Overview
Finds the commit a manifest pins the built-in registry to.
This ignores any other registry, because the versions database shipped with the updater image only describes the built-in one.
Instance Attribute Summary collapse
-
#dependency_files ⇒ Object
readonly
Returns the value of attribute dependency_files.
Instance Method Summary collapse
-
#initialize(dependency_files:) ⇒ ManifestBaseline
constructor
A new instance of ManifestBaseline.
- #location ⇒ Object
- #ref ⇒ Object
Constructor Details
#initialize(dependency_files:) ⇒ ManifestBaseline
Returns a new instance of ManifestBaseline.
21 22 23 24 25 |
# File 'lib/dependabot/vcpkg/manifest_baseline.rb', line 21 def initialize(dependency_files:) @dependency_files = dependency_files @ref = T.let(nil, T.nilable(String)) @resolved = T.let(false, T::Boolean) end |
Instance Attribute Details
#dependency_files ⇒ Object (readonly)
Returns the value of attribute dependency_files.
28 29 30 |
# File 'lib/dependabot/vcpkg/manifest_baseline.rb', line 28 def dependency_files @dependency_files end |
Instance Method Details
#location ⇒ Object
41 42 43 44 45 46 |
# File 'lib/dependabot/vcpkg/manifest_baseline.rb', line 41 def location return [T.must(vcpkg_manifest_file).name, [VCPKG_BUILTIN_BASELINE_KEY]] if manifest_builtin_baseline return nil unless default_registry_builtin_baseline [T.must(vcpkg_configuration_file).name, %w(default-registry baseline)] end |
#ref ⇒ Object
31 32 33 34 35 36 |
# File 'lib/dependabot/vcpkg/manifest_baseline.rb', line 31 def ref return @ref if @resolved @resolved = true @ref = manifest_builtin_baseline || default_registry_builtin_baseline end |