Class: Dependabot::FileUpdaters::Docker::Docker
- Defined in:
- lib/dependabot/file_updaters/docker/docker.rb
Constant Summary collapse
- FROM_REGEX =
/[Ff][Rr][Oo][Mm]/.freeze
Instance Attribute Summary
Attributes inherited from Base
#credentials, #dependencies, #dependency_files
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dependabot::FileUpdaters::Base
Class Method Details
.updated_files_regex ⇒ Object
12 13 14 |
# File 'lib/dependabot/file_updaters/docker/docker.rb', line 12 def self.updated_files_regex [/dockerfile/] end |
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/file_updaters/docker/docker.rb', line 16 def updated_dependency_files updated_files = [] dependency_files.each do |file| next unless requirement_changed?(file, dependency) updated_files << updated_file( file: file, content: updated_dockerfile_content(file) ) end updated_files.reject! { |f| dependency_files.include?(f) } raise "No files changed!" if updated_files.none? updated_files end |