Method: NexusCli::RepositoryActions#get_repository_info

Defined in:
lib/nexus_cli/mixins/repository_actions.rb

#get_repository_info(name) ⇒ String

Find information about the repository with the given [name].

into an id.

repository.

Parameters:

  • name (String)

    the name of the repository, transformed

Returns:

  • (String)

    A String of XML with information about the desired



60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/nexus_cli/mixins/repository_actions.rb', line 60

def get_repository_info(name)
  response = nexus.get(nexus_url("service/local/repositories/#{sanitize_for_id(name)}"))
  case response.status
  when 200
    return response.content
  when 404
    raise RepositoryNotFoundException
  when 503
    raise CouldNotConnectToNexusException
  else
    raise UnexpectedStatusCodeException.new(response.status)
  end
end