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.
-
.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
26 27 28 |
# File 'lib/artifactory/defaults.rb', line 26 def endpoint ENV['ARTIFACTORY_ENDPOINT'] || ENDPOINT end |
.options ⇒ Hash
The list of calculated default options for the configuration.
17 18 19 |
# File 'lib/artifactory/defaults.rb', line 17 def Hash[Configurable.keys.map { |key| [key, send(key)] }] end |
.password ⇒ String?
The HTTP Basic Authentication password
53 54 55 |
# File 'lib/artifactory/defaults.rb', line 53 def password ENV['ARTIFACTORY_PASSWORD'] end |
.proxy_address ⇒ String?
The HTTP Proxy server address as a string
62 63 64 |
# File 'lib/artifactory/defaults.rb', line 62 def proxy_address ENV['ARTIFACTORY_PROXY_ADDRESS'] end |
.proxy_password ⇒ String?
The HTTP Proxy user password as a string
71 72 73 |
# File 'lib/artifactory/defaults.rb', line 71 def proxy_password ENV['ARTIFACTORY_PROXY_PASSWORD'] end |
.proxy_port ⇒ String?
The HTTP Proxy server port as a string
80 81 82 |
# File 'lib/artifactory/defaults.rb', line 80 def proxy_port ENV['ARTIFACTORY_PROXY_PORT'] end |
.proxy_username ⇒ String?
The HTTP Proxy server username as a string
89 90 91 |
# File 'lib/artifactory/defaults.rb', line 89 def proxy_username ENV['ARTIFACTORY_PROXY_USERNAME'] end |
.ssl_pem_file ⇒ String?
The path to a pem file on disk for use with a custom SSL verification
98 99 100 |
# File 'lib/artifactory/defaults.rb', line 98 def ssl_pem_file ENV['ARTIFACTORY_SSL_PEM_FILE'] end |
.ssl_verify ⇒ true, false
Verify SSL requests (default: true)
107 108 109 110 111 112 113 |
# File 'lib/artifactory/defaults.rb', line 107 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
35 36 37 |
# File 'lib/artifactory/defaults.rb', line 35 def user_agent ENV['ARTIFACTORY_USER_AGENT'] || USER_AGENT end |
.username ⇒ String?
The HTTP Basic Authentication username
44 45 46 |
# File 'lib/artifactory/defaults.rb', line 44 def username ENV['ARTIFACTORY_USERNAME'] end |