Class: SilentPackageManager::FileUpdater

Inherits:
Dependabot::FileUpdaters::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/silent/file_updater.rb

Instance Method Summary collapse

Instance Method Details

#updated_dependency_filesObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dependabot/silent/file_updater.rb', line 13

def updated_dependency_files
  return [] if dependency&.name == "dont-update-any-files"

  updated_files = []
  dependency_files.each do |file|
    next unless requirement_changed?(file, T.must(dependency))

    updated_files << updated_file(file: file, content: updated_file_content(file))
  end

  updated_files.reject! { |f| dependency_files.include?(f) }
  raise "No files changed!" if updated_files.none?

  updated_files
end