Class: Dependabot::Bundler::FileFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Defined in:
lib/dependabot/bundler/file_fetcher.rb,
lib/dependabot/bundler/file_fetcher/gemspec_finder.rb,
lib/dependabot/bundler/file_fetcher/path_gemspec_finder.rb,
lib/dependabot/bundler/file_fetcher/child_gemfile_finder.rb,
lib/dependabot/bundler/file_fetcher/require_relative_finder.rb

Defined Under Namespace

Classes: ChildGemfileFinder, GemspecFinder, PathGemspecFinder, RequireRelativeFinder

Class Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)

16
17
18
19
20
# File 'lib/dependabot/bundler/file_fetcher.rb', line 16

def self.required_files_in?(filenames)
  return true if filenames.any? { |name| name.match?(%r{^[^/]*\.gemspec$}) }

  filenames.include?("Gemfile") || filenames.include?("gems.rb")
end

.required_files_messageObject


22
23
24
# File 'lib/dependabot/bundler/file_fetcher.rb', line 22

def self.required_files_message
  "Repo must contain either a Gemfile, a gemspec, or a gems.rb."
end