Class: Dependabot::Vcpkg::FileFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/vcpkg/file_fetcher.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/dependabot/vcpkg/file_fetcher.rb', line 17

def self.required_files_in?(filenames)
  filenames.any? do |filename|
    [VCPKG_JSON_FILENAME, VCPKG_CONFIGURATION_JSON_FILENAME].include?(filename)
  end
end

.required_files_messageObject



24
25
26
# File 'lib/dependabot/vcpkg/file_fetcher.rb', line 24

def self.required_files_message
  "Repo must contain a vcpkg.json or vcpkg-configuration.json file."
end

Instance Method Details

#fetch_filesObject



29
30
31
# File 'lib/dependabot/vcpkg/file_fetcher.rb', line 29

def fetch_files
  [vcpkg_manifest, vcpkg_configuration].compact
end