module Artifactory::Resource::Base::ClassMethods

Defined in:

artifactory/resources/base.cr

Instance Method Summary

Instance Method Detail

def extract_client!(options : Resource::Options = Resource::Options.new) : Artifactory::Client #

Get the client (connection) object from the given options. If the +:client+ key is preset in the hash, it is assumed to contain the connection object to use for the request. If the +:client+ key is not present, the default {Artifactory.client} is used.

Warning, the value of {Artifactory.client} is not threadsafe! If multiple threads or processes are modifying the connection information, the same request could use a different client object. If you use the {Artifactory::Client} proxy methods, this is handled for you.

Warning, this method will remove the +:client+ key from the hash if it exists.

@param [Hash] options the list of options passed to the method

@option options [Artifactory::Client] :client the client object to use for requests


[View source]
def form_safe(value) : String #

[View source]
def format_repos!(**options) #

Format the repos list from the given options. This method will modify the given Hash parameter!

Warning, this method will modify the given hash if it exists.

@param [Hash] options the list of options to extract the repos from


[View source]
def from_uri(uri : String, client : Artifactory::Client) #

[View source]
def to_matrix_properties(hash) : String #

Create CGI-escaped string from matrix properties

@see http://bit.ly/1qeVYQl


[View source]
def url_safe(value) : String #

Generate a URL-safe string from the given value.

@param [#to_s] value the value to sanitize

@return [String] the URL-safe version of the string


[View source]