Module: Artifactory

Extended by:
Configurable
Defined in:
lib/artifactory/util.rb,
lib/artifactory.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/collections/build.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/certificate.rb,
lib/artifactory/resources/mail_server.rb,
lib/artifactory/resources/ldap_setting.rb,
lib/artifactory/resources/build_component.rb,
lib/artifactory/resources/permission_target.rb

Overview

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

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

Constant Summary collapse

VERSION =
"3.0.15".freeze

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:



70
71
72
73
74
75
76
# File 'lib/artifactory.rb', line 70

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.



82
83
84
85
86
87
88
# File 'lib/artifactory.rb', line 82

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)


93
94
95
# File 'lib/artifactory.rb', line 93

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)


61
62
63
# File 'lib/artifactory.rb', line 61

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