Class: Dependabot::Swift::FileFetcher

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/dependabot/swift/file_fetcher.rb', line 14

def self.required_files_in?(filenames)
  filenames.include?("Package.swift")
end

.required_files_messageObject



18
19
20
# File 'lib/dependabot/swift/file_fetcher.rb', line 18

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

Instance Method Details

#fetch_filesObject



23
24
25
26
27
28
# File 'lib/dependabot/swift/file_fetcher.rb', line 23

def fetch_files
  fetched_files = []
  fetched_files << package_manifest
  fetched_files << package_resolved if package_resolved
  fetched_files
end