Class: BubBot::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/bub_bot/configuration.rb

Overview

TODO: merge with some defaults

Constant Summary collapse

RACK_OPTIONS =

Any of these options will be passed on to rack, rather than handled by us.

%i(
  Port
  Host
)
BUB_BOT_OPTIONS =

These options will be handled by us.

%i(
  servers
  bot_oauth_token
  bot_name
  deploy_targets
  slack_channel
  redis_host
)
OPTIONS =
RACK_OPTIONS + BUB_BOT_OPTIONS

Instance Method Summary collapse

Instance Method Details

#rack_options_hashObject



23
24
25
26
27
# File 'lib/bub_bot/configuration.rb', line 23

def rack_options_hash
  RACK_OPTIONS.each_with_object({}) do |option_name, options_hash|
    options_hash[option_name] = public_send(option_name)
  end
end

#verify_optionsObject



29
30
31
32
33
# File 'lib/bub_bot/configuration.rb', line 29

def verify_options
  # TODO: verify that deploy_targets, etc, are formatted correctly and print
  # useful error messages otherwise.
  true
end