Class: Dependabot::DotnetSdk::FileFetcher
- Inherits:
-
FileFetchers::Base
- Object
- FileFetchers::Base
- Dependabot::DotnetSdk::FileFetcher
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/dotnet_sdk/file_fetcher.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.required_files_in?(filenames) ⇒ Boolean
14 15 16 |
# File 'lib/dependabot/dotnet_sdk/file_fetcher.rb', line 14 def self.required_files_in?(filenames) filenames.any? { |f| File.basename(f) == "global.json" } end |
.required_files_message ⇒ Object
19 20 21 |
# File 'lib/dependabot/dotnet_sdk/file_fetcher.rb', line 19 def self. "Repo must contain a global.json file." end |
Instance Method Details
#fetch_files ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/dependabot/dotnet_sdk/file_fetcher.rb', line 24 def fetch_files fetched_files = [] fetched_files << root_file return fetched_files if fetched_files.any? raise Dependabot::DependencyFileNotFound.new( nil, "global.json not found in #{directory}" ) end |