Class: ArtRest::System::GeneralConfiguration

Inherits:
Resource
  • Object
show all
Defined in:
lib/artrest/system_general_configuration.rb

Overview

Represents Artifactory’s General Configuration resource. Essentially, this is Artifactory’s artifactory.config.xml file.

This class serves to

  • retrieve Artifactory’s general configuration as an in-memory XML data structure,

  • download Artifactory’s general configuration to a folder/file, and

  • update (post) Artifactory’s general configuration.

Class Method Summary collapse

Methods inherited from Resource

#[], #base_url, check_options, #content, #content!, #content=, create, inherited, #initialize, mime_type=, resource_attributes, #unparsed_content

Constructor Details

This class inherits a constructor from ArtRest::Resource

Class Method Details

.get(base_url, options) ⇒ Object

Shortcut method to retrieve the ArtRest::System::GeneralConfiguration resource.

  • Args :

    • base_url -> Our Artifactory server’s base URL

    • options -> A Hash containing username and password

  • Returns :

    • The ArtRest::System::GeneralConfiguration resource



30
31
32
# File 'lib/artrest/system_general_configuration.rb', line 30

def get(base_url, options)
    System::GeneralConfiguration.new("#{base_url}/api/system/configuration", options)
end

.matches_path(path, options) ⇒ Object

:nodoc:



34
35
36
# File 'lib/artrest/system_general_configuration.rb', line 34

def matches_path(path, options) # :nodoc:
    path =~ %r|^/api/system/configuration/?$|
end