Class: Dependabot::FileFetchers::Dotnet::Nuget

Inherits:
Base
  • Object
show all
Defined in:
lib/dependabot/file_fetchers/dotnet/nuget.rb,
lib/dependabot/file_fetchers/dotnet/nuget/import_paths_finder.rb,
lib/dependabot/file_fetchers/dotnet/nuget/sln_project_paths_finder.rb

Defined Under Namespace

Classes: ImportPathsFinder, SlnProjectPathsFinder

Instance Attribute Summary

Attributes inherited from Base

#credentials, #source

Class Method Summary collapse

Methods inherited from Base

#commit, #directory, #files, #initialize, #repo, #target_branch

Constructor Details

This class inherits a constructor from Dependabot::FileFetchers::Base

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
# File 'lib/dependabot/file_fetchers/dotnet/nuget.rb', line 12

def self.required_files_in?(filenames)
  return true if filenames.any? { |f| f.match?(/^packages\.config$/i) }
  return true if filenames.any? { |f| f.end_with?(".sln") }

  filenames.any? { |name| name.match?(%r{^[^/]*\.[a-z]{2}proj$}) }
end

.required_files_messageObject



19
20
21
# File 'lib/dependabot/file_fetchers/dotnet/nuget.rb', line 19

def self.required_files_message
  "Repo must contain a .(cs|vb|fs)proj file or a packages.config."
end