Class: Dependabot::Swift::FileUpdater
- Inherits:
-
FileUpdaters::Base
- Object
- FileUpdaters::Base
- Dependabot::Swift::FileUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/swift/file_updater.rb,
lib/dependabot/swift/file_updater/lockfile_updater.rb,
lib/dependabot/swift/file_updater/manifest_updater.rb,
lib/dependabot/swift/file_updater/requirement_replacer.rb
Defined Under Namespace
Classes: LockfileUpdater, ManifestUpdater, RequirementReplacer
Instance Method Summary collapse
Instance Method Details
#updated_dependency_files ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/dependabot/swift/file_updater.rb', line 15 def updated_dependency_files updated_files = T.let([], T::Array[Dependabot::DependencyFile]) SharedHelpers.in_a_temporary_repo_directory(T.must(manifest).directory, repo_contents_path) do updated_manifest = T.let(nil, T.nilable(Dependabot::DependencyFile)) if file_changed?(T.must(manifest)) updated_manifest = updated_file(file: T.must(manifest), content: updated_manifest_content) updated_files << updated_manifest end if lockfile updated_files << updated_file(file: T.must(lockfile), content: updated_lockfile_content(updated_manifest)) end end updated_files end |