Class: Dependabot::Hex::FileFetcher

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

Constant Summary collapse

APPS_PATH_REGEX =
/apps_path:\s*"(?<path>.*?)"/m.freeze
STRING_ARG =
%{(?:["'](.*?)["'])}
SUPPORTED_METHODS =
%w(eval_file require_file).join("|").freeze
SUPPORT_FILE =
/Code\.(?:#{SUPPORTED_METHODS})\(#{STRING_ARG}(?:\s*,\s*#{STRING_ARG})?\)/.
freeze

Class Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


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

def self.required_files_in?(filenames)
  filenames.include?("mix.exs")
end

.required_files_messageObject



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

def self.required_files_message
  "Repo must contain a mix.exs."
end