Class: Dependabot::Terraform::FileFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Includes:
FileSelector
Defined in:
lib/dependabot/terraform/file_fetcher.rb

Constant Summary collapse

LOCAL_PATH_SOURCE =
%r{source\s*=\s*['"](?<path>..?\/[^'"]+)}.freeze

Class Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dependabot/terraform/file_fetcher.rb', line 15

def self.required_files_in?(filenames)
  filenames.any? { |f| f.end_with?(".tf", ".hcl") }
end

.required_files_messageObject



19
20
21
# File 'lib/dependabot/terraform/file_fetcher.rb', line 19

def self.required_files_message
  "Repo must contain a Terraform configuration file."
end