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.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 54 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.
37 38 39 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 37 def credentials @credentials end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
31 32 33 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 31 def dependencies @dependencies end |
#dependency_files ⇒ Object (readonly)
Returns the value of attribute dependency_files.
34 35 36 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 34 def dependency_files @dependency_files end |
#index_urls ⇒ Object (readonly)
Returns the value of attribute index_urls.
40 41 42 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 40 def index_urls @index_urls end |
#repo_contents_path ⇒ Object (readonly)
Returns the value of attribute repo_contents_path.
43 44 45 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 43 def repo_contents_path @repo_contents_path end |
Instance Method Details
#updated_dependency_files ⇒ Object
66 67 68 69 70 71 |
# File 'lib/dependabot/uv/file_updater/lock_file_updater.rb', line 66 def updated_dependency_files @updated_dependency_files ||= T.let( fetch_updated_dependency_files, T.nilable(T::Array[Dependabot::DependencyFile]) ) end |