Class: Dependabot::Terraform::FileUpdater
- Inherits:
-
FileUpdaters::Base
- Object
- FileUpdaters::Base
- Dependabot::Terraform::FileUpdater
- Defined in:
- lib/dependabot/terraform/file_updater.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.updated_files_regex ⇒ Object
10 11 12 |
# File 'lib/dependabot/terraform/file_updater.rb', line 10 def self.updated_files_regex [/\.tf$/, /\.tfvars$/] end |
Instance Method Details
#updated_dependency_files ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dependabot/terraform/file_updater.rb', line 14 def updated_dependency_files updated_files = [] [*terraform_files, *terragrunt_files].each do |file| next unless file_changed?(file) updated_content = updated_terraform_file_content(file) raise "Content didn't change!" if updated_content == file.content updated_files << updated_file(file: file, content: updated_content) end raise "No files changed!" if updated_files.none? updated_files end |