Class: Dependabot::Elm::FileFetcher

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


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

def self.required_files_in?(filenames)
  filenames.include?("elm.json")
end

.required_files_messageObject



20
21
22
# File 'lib/dependabot/elm/file_fetcher.rb', line 20

def self.required_files_message
  "Repo must contain an elm-package.json or an elm.json"
end

Instance Method Details

#fetch_filesObject



25
26
27
28
29
30
31
32
33
# File 'lib/dependabot/elm/file_fetcher.rb', line 25

def fetch_files
  fetched_files = []

  fetched_files << elm_json if elm_json

  # NOTE: We *do not* fetch the exact-dependencies.json file, as it is
  # recommended that this is not committed
  fetched_files
end