Class: Dependabot::Shared::SharedFileUpdater
- Inherits:
-
FileUpdaters::Base
- Object
- FileUpdaters::Base
- Dependabot::Shared::SharedFileUpdater
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/dependabot/shared/shared_file_updater.rb
Direct Known Subclasses
Constant Summary collapse
- FROM_REGEX =
/FROM(\s+--platform\=\S+)?/i
Instance Method Summary collapse
Instance Method Details
#container_image_regex ⇒ Object
49 |
# File 'lib/dependabot/shared/shared_file_updater.rb', line 49 def container_image_regex; end |
#updated_dependency_files ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/dependabot/shared/shared_file_updater.rb', line 21 def updated_dependency_files updated_files = [] dependency_files.each do |file| next unless requirement_changed?(file, T.must(dependency)) updated_files << if file.name.match?(T.must(yaml_file_pattern)) updated_file( file: file, content: T.must(updated_yaml_content(file)) ) else updated_file( file: file, content: T.must(updated_dockerfile_content(file)) ) end end updated_files.reject! { |f| dependency_files.include?(f) } raise "No files changed!" if updated_files.none? updated_files end |
#yaml_file_pattern ⇒ Object
46 |
# File 'lib/dependabot/shared/shared_file_updater.rb', line 46 def yaml_file_pattern; end |