Module: HabitatSupervisor::Default
- Defined in:
- lib/habitat_supervisor/default.rb
Constant Summary collapse
- API_ENDPOINT =
Default API endpoint
"http://localhost:9631".freeze
- USER_AGENT =
Default User Agent header string
"Habitat Supervisor Ruby Gem #{HabitatSupervisor::VERSION}".freeze
Class Method Summary collapse
-
.api_endpoint ⇒ String
Default API endpoint from ENV or API_ENDPOINT.
-
.options ⇒ Hash
Configuration options.
-
.user_agent ⇒ String
Default User-Agent header string from ENV or USER_AGENT.
Class Method Details
.api_endpoint ⇒ String
Default API endpoint from ENV or API_ENDPOINT
22 23 24 |
# File 'lib/habitat_supervisor/default.rb', line 22 def api_endpoint ENV['HAB_SUP_API_ENDPOINT'] || API_ENDPOINT end |
.options ⇒ Hash
Configuration options
16 17 18 |
# File 'lib/habitat_supervisor/default.rb', line 16 def Hash[HabitatSupervisor::Configurable.keys.map{|key| [key, send(key)]}] end |
.user_agent ⇒ String
Default User-Agent header string from ENV or USER_AGENT
28 29 30 |
# File 'lib/habitat_supervisor/default.rb', line 28 def user_agent ENV['HAB_SUP_USER_AGENT'] || USER_AGENT end |