Module: Artifactory::Defaults
- Defined in:
- lib/artifactory/defaults.rb
Constant Summary collapse
- ENDPOINT =
Default API endpoint
'http://localhost:8080/artifactory'.freeze
- USER_AGENT =
Default User Agent header string
"Artifactory Ruby Gem #{Artifactory::VERSION}".freeze
Class Method Summary collapse
-
.endpoint ⇒ String
The endpoint where artifactory lives.
-
.options ⇒ Hash
The list of calculated default options for the configuration.
-
.password ⇒ String?
The HTTP Basic Authentication password.
-
.proxy_address ⇒ String?
The HTTP Proxy server address as a string.
-
.proxy_password ⇒ String?
The HTTP Proxy user password as a string.
-
.proxy_port ⇒ String?
The HTTP Proxy server port as a string.
-
.proxy_username ⇒ String?
The HTTP Proxy server username as a string.
-
.read_timeout ⇒ Integer?
Number of seconds to wait for a response from Artifactory.
-
.ssl_pem_file ⇒ String?
The path to a pem file on disk for use with a custom SSL verification.
-
.ssl_verify ⇒ true, false
Verify SSL requests (default: true).
-
.user_agent ⇒ String
The User Agent header to send along.
-
.username ⇒ String?
The HTTP Basic Authentication username.
Class Method Details
.endpoint ⇒ String
The endpoint where artifactory lives
42 43 44 |
# File 'lib/artifactory/defaults.rb', line 42 def endpoint ENV['ARTIFACTORY_ENDPOINT'] || ENDPOINT end |
.options ⇒ Hash
The list of calculated default options for the configuration.
33 34 35 |
# File 'lib/artifactory/defaults.rb', line 33 def Hash[Configurable.keys.map { |key| [key, send(key)] }] end |
.password ⇒ String?
The HTTP Basic Authentication password
69 70 71 |
# File 'lib/artifactory/defaults.rb', line 69 def password ENV['ARTIFACTORY_PASSWORD'] end |
.proxy_address ⇒ String?
The HTTP Proxy server address as a string
78 79 80 |
# File 'lib/artifactory/defaults.rb', line 78 def proxy_address ENV['ARTIFACTORY_PROXY_ADDRESS'] end |
.proxy_password ⇒ String?
The HTTP Proxy user password as a string
87 88 89 |
# File 'lib/artifactory/defaults.rb', line 87 def proxy_password ENV['ARTIFACTORY_PROXY_PASSWORD'] end |
.proxy_port ⇒ String?
The HTTP Proxy server port as a string
96 97 98 |
# File 'lib/artifactory/defaults.rb', line 96 def proxy_port ENV['ARTIFACTORY_PROXY_PORT'] end |
.proxy_username ⇒ String?
The HTTP Proxy server username as a string
105 106 107 |
# File 'lib/artifactory/defaults.rb', line 105 def proxy_username ENV['ARTIFACTORY_PROXY_USERNAME'] end |
.read_timeout ⇒ Integer?
Number of seconds to wait for a response from Artifactory
136 137 138 |
# File 'lib/artifactory/defaults.rb', line 136 def read_timeout ENV['ARTIFACTORY_READ_TIMEOUT'] || 120 end |
.ssl_pem_file ⇒ String?
The path to a pem file on disk for use with a custom SSL verification
114 115 116 |
# File 'lib/artifactory/defaults.rb', line 114 def ssl_pem_file ENV['ARTIFACTORY_SSL_PEM_FILE'] end |
.ssl_verify ⇒ true, false
Verify SSL requests (default: true)
123 124 125 126 127 128 129 |
# File 'lib/artifactory/defaults.rb', line 123 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 ⇒ String
The User Agent header to send along
51 52 53 |
# File 'lib/artifactory/defaults.rb', line 51 def user_agent ENV['ARTIFACTORY_USER_AGENT'] || USER_AGENT end |
.username ⇒ String?
The HTTP Basic Authentication username
60 61 62 |
# File 'lib/artifactory/defaults.rb', line 60 def username ENV['ARTIFACTORY_USERNAME'] end |