Class: Dependabot::Uv::FileUpdater::LockFileUpdater
- Inherits:
-
Object
- Object
- Dependabot::Uv::FileUpdater::LockFileUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/uv/file_updater/lock_file_updater.rb
Overview
rubocop:disable Metrics/ClassLength
Constant Summary collapse
- REQUIRED_FILES =
At least one of these files should be present
%w(pyproject.toml uv.lock).freeze
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#dependency_files ⇒ Object
readonly
Returns the value of attribute dependency_files.
-
#index_urls ⇒ Object
readonly
Returns the value of attribute index_urls.
-
#repo_contents_path ⇒ Object
readonly
Returns the value of attribute repo_contents_path.
Instance Method Summary collapse
-
#initialize(dependencies:, dependency_files:, credentials:, index_urls: nil, repo_contents_path: nil) ⇒ LockFileUpdater
constructor
A new instance of LockFileUpdater.
- #updated_dependency_files ⇒ Object
Constructor Details
#initialize(dependencies:, dependency_files:, credentials:, index_urls: nil, repo_contents_path: nil) ⇒ LockFileUpdater
Returns a new instance of LockFileUpdater.
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 55 def initialize(dependencies:, dependency_files:, credentials:, index_urls: nil, repo_contents_path: nil) @dependencies = dependencies @dependency_files = dependency_files @credentials = credentials @index_urls = index_urls @repo_contents_path = repo_contents_path @prepared_pyproject = T.let(nil, T.nilable(String)) @updated_lockfile_content = T.let(nil, T.nilable(String)) @pyproject = T.let(nil, T.nilable(Dependabot::DependencyFile)) end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
38 39 40 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 38 def credentials @credentials end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
32 33 34 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 32 def dependencies @dependencies end |
#dependency_files ⇒ Object (readonly)
Returns the value of attribute dependency_files.
35 36 37 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 35 def dependency_files @dependency_files end |
#index_urls ⇒ Object (readonly)
Returns the value of attribute index_urls.
41 42 43 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 41 def index_urls @index_urls end |
#repo_contents_path ⇒ Object (readonly)
Returns the value of attribute repo_contents_path.
44 45 46 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 44 def repo_contents_path @repo_contents_path end |
Instance Method Details
#updated_dependency_files ⇒ Object
67 68 69 70 71 72 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 67 def updated_dependency_files @updated_dependency_files ||= T.let( fetch_updated_dependency_files, T.nilable(T::Array[Dependabot::DependencyFile]) ) end |