Class: Dependabot::Cargo::RegistryFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/cargo/registry_fetcher.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 15

def self.required_files_in?(filenames)
  filenames.include?("config.json")
end

.required_files_messageObject



20
21
22
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 20

def self.required_files_message
  "Repo must contain a config.json"
end

Instance Method Details

#apiObject



30
31
32
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 30

def api
  T.must(parsed_config_json["api"]).chomp("/")
end

#dlObject



25
26
27
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 25

def dl
  T.must(parsed_config_json["dl"]).chomp("/")
end

#fetch_filesObject



35
36
37
38
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 35

def fetch_files
  fetched_files = []
  fetched_files << config_json
end