Class: Artifactory::Resource::Layout

Inherits:
Base
  • Object
show all
Defined in:
lib/artifactory/resources/layout.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attribute, attributes, #attributes, #client, #client=, #client?, #extract_client!, extract_client!, find_from_config, #format_repos!, format_repos!, from_hash, from_url, has_attribute?, #initialize, #inspect, list_from_config, #set, #to_hash, #to_json, #to_matrix_properties, #to_query_string_parameters, #to_s, #url_safe, url_safe

Constructor Details

This class inherits a constructor from Artifactory::Resource::Base

Class Method Details

.all(options = {}) ⇒ Array<Resource::Layout>

Get a list of all repository layouts in the system.

Parameters:

  • options (Hash) (defaults to: {})

    the list of options

Options Hash (options):

Returns:



34
35
36
37
# File 'lib/artifactory/resources/layout.rb', line 34

def all(options = {})
  config = Resource::System.configuration(options)
  list_from_config("config/repoLayouts/repoLayout", config, options)
end

.find(name, options = {}) ⇒ Resource::Layout?

Find (fetch) a layout by its name.

Examples:

Find a layout by its name

Layout.find('maven-2-default') #=> #<Layout name: 'maven-2-default' ...>

Parameters:

  • name (String)

    the name of the layout to find

  • options (Hash) (defaults to: {})

    the list of options

Options Hash (options):

Returns:

  • (Resource::Layout, nil)

    an instance of the layout that matches the given name, or nil if one does not exist



57
58
59
60
61
62
63
64
# File 'lib/artifactory/resources/layout.rb', line 57

def find(name, options = {})
  config = Resource::System.configuration(options)
  find_from_config("config/repoLayouts/repoLayout/name[text()='#{name}']", config, options)
rescue Error::HTTPError => e
  raise unless e.code == 404

  nil
end

Instance Method Details

#artifact_path_patternObject

Return this object’s artifact_path_pattern

Returns:

  • (Object)


68
# File 'lib/artifactory/resources/layout.rb', line 68

attribute :artifact_path_pattern

#artifact_path_pattern=(value) ⇒ Object

Set this object’s artifact_path_pattern

Parameters:

  • value (Object)

    the value to set for artifact_path_pattern

  • default (Object)

    the default value for this attribute



68
# File 'lib/artifactory/resources/layout.rb', line 68

attribute :artifact_path_pattern

#artifact_path_pattern?Boolean

Determines if the artifact_path_pattern value exists and is truthy

Returns:

  • (Boolean)


68
# File 'lib/artifactory/resources/layout.rb', line 68

attribute :artifact_path_pattern

#descriptor_path_patternObject

Return this object’s descriptor_path_pattern

Returns:

  • (Object)


70
# File 'lib/artifactory/resources/layout.rb', line 70

attribute :descriptor_path_pattern

#descriptor_path_pattern=(value) ⇒ Object

Set this object’s descriptor_path_pattern

Parameters:

  • value (Object)

    the value to set for descriptor_path_pattern

  • default (Object)

    the default value for this attribute



70
# File 'lib/artifactory/resources/layout.rb', line 70

attribute :descriptor_path_pattern

#descriptor_path_pattern?Boolean

Determines if the descriptor_path_pattern value exists and is truthy

Returns:

  • (Boolean)


70
# File 'lib/artifactory/resources/layout.rb', line 70

attribute :descriptor_path_pattern

#distinctive_descriptor_path_patternObject

Return this object’s distinctive_descriptor_path_pattern

Returns:

  • (Object)


69
# File 'lib/artifactory/resources/layout.rb', line 69

attribute :distinctive_descriptor_path_pattern, true

#distinctive_descriptor_path_pattern=(value) ⇒ Object

Set this object’s distinctive_descriptor_path_pattern

Parameters:

  • value (Object)

    the value to set for distinctive_descriptor_path_pattern

  • default (Object)

    the default value for this attribute



69
# File 'lib/artifactory/resources/layout.rb', line 69

attribute :distinctive_descriptor_path_pattern, true

#distinctive_descriptor_path_pattern?Boolean

Determines if the distinctive_descriptor_path_pattern value exists and is truthy

Returns:

  • (Boolean)


69
# File 'lib/artifactory/resources/layout.rb', line 69

attribute :distinctive_descriptor_path_pattern, true

#file_integration_revision_reg_expObject

Return this object’s file_integration_revision_reg_exp

Returns:

  • (Object)


72
# File 'lib/artifactory/resources/layout.rb', line 72

attribute :file_integration_revision_reg_exp

#file_integration_revision_reg_exp=(value) ⇒ Object

Set this object’s file_integration_revision_reg_exp

Parameters:

  • value (Object)

    the value to set for file_integration_revision_reg_exp

  • default (Object)

    the default value for this attribute



72
# File 'lib/artifactory/resources/layout.rb', line 72

attribute :file_integration_revision_reg_exp

#file_integration_revision_reg_exp?Boolean

Determines if the file_integration_revision_reg_exp value exists and is truthy

Returns:

  • (Boolean)


72
# File 'lib/artifactory/resources/layout.rb', line 72

attribute :file_integration_revision_reg_exp

#folder_integration_revision_reg_expObject

Return this object’s folder_integration_revision_reg_exp

Returns:

  • (Object)


71
# File 'lib/artifactory/resources/layout.rb', line 71

attribute :folder_integration_revision_reg_exp

#folder_integration_revision_reg_exp=(value) ⇒ Object

Set this object’s folder_integration_revision_reg_exp

Parameters:

  • value (Object)

    the value to set for folder_integration_revision_reg_exp

  • default (Object)

    the default value for this attribute



71
# File 'lib/artifactory/resources/layout.rb', line 71

attribute :folder_integration_revision_reg_exp

#folder_integration_revision_reg_exp?Boolean

Determines if the folder_integration_revision_reg_exp value exists and is truthy

Returns:

  • (Boolean)


71
# File 'lib/artifactory/resources/layout.rb', line 71

attribute :folder_integration_revision_reg_exp

#nameObject

Return this object’s name

Returns:

  • (Object)


67
# File 'lib/artifactory/resources/layout.rb', line 67

attribute :name, -> { raise "Name missing!" }

#name=(value) ⇒ Object

Set this object’s name

Parameters:

  • value (Object)

    the value to set for name

  • default (Object)

    the default value for this attribute



67
# File 'lib/artifactory/resources/layout.rb', line 67

attribute :name, -> { raise "Name missing!" }

#name?Boolean

Determines if the name value exists and is truthy

Returns:

  • (Boolean)


67
# File 'lib/artifactory/resources/layout.rb', line 67

attribute :name, -> { raise "Name missing!" }