class ArtifactoryApi::Client::Artifacts

Public Class Methods

new(client) click to toggle source
# File lib/artifactory_api/artifacts.rb, line 4
def initialize(client)
  @client = client
  @logger = @client.logger
end

Public Instance Methods

artifact_info(repo, path) click to toggle source
# File lib/artifactory_api/artifacts.rb, line 24
def artifact_info repo, path
  url = "/api/storage/#{repo}#{path}"
  @client.api_get_request url
end
copy_artifact(from_repo, from_path, to_repo, to_path) click to toggle source
# File lib/artifactory_api/artifacts.rb, line 29
def copy_artifact from_repo, from_path, to_repo, to_path
  url = "/api/copy/#{from_repo}#{from_path}?to=/#{to_repo}#{to_path}"
  @client.api_post_request url
end
deploy_artifact(repo, path, file) click to toggle source
# File lib/artifactory_api/artifacts.rb, line 13
def deploy_artifact repo, path, file
  url = "/#{repo}#{path}"
  @client.api_put_request url, file
end
retrieve_artifact(repo, path) click to toggle source
# File lib/artifactory_api/artifacts.rb, line 18
def retrieve_artifact repo, path
  url = "/#{repo}#{path}"
  response = @client.api_get_request url, raw_response=true
  response.body
end
to_s() click to toggle source
# File lib/artifactory_api/artifacts.rb, line 9
def to_s
  "#<ArtifactoryApi::Clients::Builds>"
end