module Artifactory::Defaults

Constants

ENDPOINT

Default API endpoint

USER_AGENT

Default User Agent header string

Public Class Methods

api_key() click to toggle source

The API Key for authentication

@return [String, nil]

# File lib/artifactory/defaults.rb, line 78
def api_key
  ENV["ARTIFACTORY_API_KEY"]
end
endpoint() click to toggle source

The endpoint where artifactory lives

@return [String]

# File lib/artifactory/defaults.rb, line 42
def endpoint
  ENV["ARTIFACTORY_ENDPOINT"] || ENDPOINT
end
options() click to toggle source

The list of calculated default options for the configuration.

@return [Hash]

# File lib/artifactory/defaults.rb, line 33
def options
  Hash[Configurable.keys.map { |key| [key, send(key)] }]
end
password() click to toggle source

The HTTP Basic Authentication password

@return [String, nil]

# File lib/artifactory/defaults.rb, line 69
def password
  ENV["ARTIFACTORY_PASSWORD"]
end
proxy_address() click to toggle source

The HTTP Proxy server address as a string

@return [String, nil]

# File lib/artifactory/defaults.rb, line 87
def proxy_address
  ENV["ARTIFACTORY_PROXY_ADDRESS"]
end
proxy_password() click to toggle source

The HTTP Proxy user password as a string

@return [String, nil]

# File lib/artifactory/defaults.rb, line 96
def proxy_password
  ENV["ARTIFACTORY_PROXY_PASSWORD"]
end
proxy_port() click to toggle source

The HTTP Proxy server port as a string

@return [String, nil]

# File lib/artifactory/defaults.rb, line 105
def proxy_port
  ENV["ARTIFACTORY_PROXY_PORT"]
end
proxy_username() click to toggle source

The HTTP Proxy server username as a string

@return [String, nil]

# File lib/artifactory/defaults.rb, line 114
def proxy_username
  ENV["ARTIFACTORY_PROXY_USERNAME"]
end
read_timeout() click to toggle source

Number of seconds to wait for a response from Artifactory

@return [Integer]

# File lib/artifactory/defaults.rb, line 145
def read_timeout
  if ENV["ARTIFACTORY_READ_TIMEOUT"]
    ENV["ARTIFACTORY_READ_TIMEOUT"].to_i
  else
    120
  end
end
ssl_pem_file() click to toggle source

The path to a pem file on disk for use with a custom SSL verification

@return [String, nil]

# File lib/artifactory/defaults.rb, line 123
def ssl_pem_file
  ENV["ARTIFACTORY_SSL_PEM_FILE"]
end
ssl_verify() click to toggle source

Verify SSL requests (default: true)

@return [true, false]

# File lib/artifactory/defaults.rb, line 132
def ssl_verify
  if ENV["ARTIFACTORY_SSL_VERIFY"].nil?
    true
  else
    %w{t y}.include?(ENV["ARTIFACTORY_SSL_VERIFY"].downcase[0])
  end
end
user_agent() click to toggle source

The User Agent header to send along

@return [String]

# File lib/artifactory/defaults.rb, line 51
def user_agent
  ENV["ARTIFACTORY_USER_AGENT"] || USER_AGENT
end
username() click to toggle source

The HTTP Basic Authentication username

@return [String, nil]

# File lib/artifactory/defaults.rb, line 60
def username
  ENV["ARTIFACTORY_USERNAME"]
end