Class: Dependabot::Devcontainers::FileUpdater
- Inherits:
-
FileUpdaters::Base
- Object
- FileUpdaters::Base
- Dependabot::Devcontainers::FileUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/devcontainers/file_updater.rb,
lib/dependabot/devcontainers/file_updater/config_updater.rb
Defined Under Namespace
Classes: ConfigUpdater
Instance Method Summary collapse
Instance Method Details
#updated_dependency_files ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/dependabot/devcontainers/file_updater.rb', line 16 def updated_dependency_files updated_files = [] manifests.each do |manifest| requirement = dependency.requirements.find { |req| req[:file] == manifest.name } next unless requirement config_contents, lockfile_contents = update(manifest, requirement) updated_files << updated_file(file: manifest, content: T.must(config_contents)) if file_changed?(manifest) lockfile = lockfile_for(manifest) updated_files << updated_file(file: lockfile, content: lockfile_contents) if lockfile && lockfile_contents end updated_files end |