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
PATH_DEPS_REGEX =
/{.*path: ?#{STRING_ARG}.*}/.freeze

Class Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)

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

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

.required_files_messageObject


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

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