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 ⇒ String?
The HTTP Proxy information as a string.
-
.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 ⇒ String?
The HTTP Proxy information as a string
62 63 64 |
# File 'lib/artifactory/defaults.rb', line 62 def proxy ENV['ARTIFACTORY_PROXY'] 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 |