Module: Artifactory

Extended by:
Configurable
Defined in:
lib/artifactory.rb,
lib/artifactory/util.rb,
lib/artifactory/client.rb,
lib/artifactory/errors.rb,
lib/artifactory/version.rb,
lib/artifactory/defaults.rb,
lib/artifactory/configurable.rb,
lib/artifactory/resources/base.rb,
lib/artifactory/resources/user.rb,
lib/artifactory/resources/build.rb,
lib/artifactory/resources/group.rb,
lib/artifactory/collections/base.rb,
lib/artifactory/resources/backup.rb,
lib/artifactory/resources/layout.rb,
lib/artifactory/resources/plugin.rb,
lib/artifactory/resources/system.rb,
lib/artifactory/resources/artifact.rb,
lib/artifactory/resources/url_base.rb,
lib/artifactory/collections/artifact.rb,
lib/artifactory/resources/repository.rb,
lib/artifactory/resources/mail_server.rb,
lib/artifactory/resources/ldap_setting.rb

Defined Under Namespace

Modules: Collection, Configurable, Defaults, Error, Resource, Util Classes: Client

Constant Summary collapse

VERSION =
'2.1.2'

Class Method Summary collapse

Methods included from Configurable

configure, keys, reset!

Class Method Details

.clientArtifactory::Client

API client object based off the configured options in Configurable.

Returns:



50
51
52
53
54
55
56
# File 'lib/artifactory.rb', line 50

def client
  unless defined?(@client) && @client.same_options?(options)
    @client = Artifactory::Client.new(options)
  end

  @client
end

.method_missing(m, *args, &block) ⇒ Object

Delegate all methods to the client object, essentially making the module object behave like a Client.



62
63
64
65
66
67
68
# File 'lib/artifactory.rb', line 62

def method_missing(m, *args, &block)
  if client.respond_to?(m)
    client.send(m, *args, &block)
  else
    super
  end
end

.respond_to_missing?(m, include_private = false) ⇒ Boolean

Delegating respond_to to the Client.

Returns:

  • (Boolean)


73
74
75
# File 'lib/artifactory.rb', line 73

def respond_to_missing?(m, include_private = false)
  client.respond_to?(m) || super
end

.rootPathname

The root of the Artifactory gem. This method is useful for finding files relative to the root of the repository.

Returns:

  • (Pathname)


41
42
43
# File 'lib/artifactory.rb', line 41

def root
  @root ||= Pathname.new(File.expand_path('../../', __FILE__))
end