Class: Dependabot::GitSubmodules::FileFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/linguist/file_fetchers/git_submodules.rb

Instance Method Summary collapse

Instance Method Details

#fetch_filesObject

Raises:

  • (Dependabot::DependencyFileNotFound)


52
53
54
55
# File 'lib/dependabot/linguist/file_fetchers/git_submodules.rb', line 52

def fetch_files
  raise(Dependabot::DependencyFileNotFound, Pathname.new(File.join(directory, ".gitmodules")).cleanpath.to_path) if gitmodules_file.nil?
  [gitmodules_file]
end

#gitmodules_fileObject



58
59
60
# File 'lib/dependabot/linguist/file_fetchers/git_submodules.rb', line 58

def gitmodules_file
  @gitmodules_file ||= fetch_file_if_present(".gitmodules")
end