Class: Dependabot::Nuget::NugetClient

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/nuget/nuget_client.rb

Class Method Summary collapse

Class Method Details

.get_package_versions(dependency_name, repository_details) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/dependabot/nuget/nuget_client.rb', line 18

def self.get_package_versions(dependency_name, repository_details)
  repository_type = repository_details.fetch(:repository_type)
  if repository_type == "v3"
    get_package_versions_v3(dependency_name, repository_details)
  elsif repository_type == "v2"
    get_package_versions_v2(dependency_name, repository_details)
  elsif repository_type == "local"
    get_package_versions_local(dependency_name, repository_details)
  else
    raise "Unknown repository type: #{repository_type}"
  end
end