Class: Dependabot::Cargo::RegistryFetcher

Inherits:
FileFetchers::Base
  • Object
show all
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)


10
11
12
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 10

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

.required_files_messageObject



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

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

Instance Method Details

#apiObject



22
23
24
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 22

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

#dlObject



18
19
20
# File 'lib/dependabot/cargo/registry_fetcher.rb', line 18

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