class Artifactory::Resource::URLBase

def all(options = {})

Returns:
  • (Array) -

Options Hash: (**options)
  • :client (Artifactory::Client) --

Parameters:
  • options (Hash) --
def all(options = {})
  config = Resource::System.configuration(options)
  simple_text_from_config("config/urlBase", config, options)
end

def find(url, options = {})

Returns:
  • (Resource::MailServer, nil) -

Options Hash: (**options)
  • :client (Artifactory::Client) --

Parameters:
  • options (Hash) --
  • url (String) --

Other tags:
    Example: Find a URLBase by its url_base. -
def find(url, options = {})
  config = Resource::System.configuration(options)
  find_from_config("config/urlBase[text()='#{url}']", config, options)
rescue Error::HTTPError => e
  raise unless e.code == 404
  nil
end

def simple_text_from_config(xpath, config, options = {})

Parameters:
  • options (Hash) --
  • config (REXML) --
  • xpath (String) --
def simple_text_from_config(xpath, config, options = {})
  REXML::XPath.match(config, xpath).map do |r|
    hash = {}
    hash[r.name] = r.text
    from_hash(hash, options)
  end
end