Class: LyberCore::Boot
- Inherits:
-
Object
- Object
- LyberCore::Boot
- Defined in:
- lib/lyber_core/boot.rb
Overview
Boots up the robot environment, including configuration, logging, clients, and Sidekiq.
Class Method Summary collapse
Instance Method Summary collapse
- #boot_config ⇒ Object
- #environment ⇒ Object
-
#initialize(config_dir) ⇒ Boot
constructor
A new instance of Boot.
- #perform ⇒ Object
Constructor Details
#initialize(config_dir) ⇒ Boot
Returns a new instance of Boot.
17 18 19 |
# File 'lib/lyber_core/boot.rb', line 17 def initialize(config_dir) @config_dir = config_dir end |
Class Method Details
.up(config_dir) ⇒ Object
13 14 15 |
# File 'lib/lyber_core/boot.rb', line 13 def self.up(config_dir) new(config_dir).perform end |
Instance Method Details
#boot_config ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/lyber_core/boot.rb', line 32 def boot_config Config.setup do |config| config.const_name = 'Settings' config.use_env = true config.env_prefix = 'SETTINGS' config.env_separator = '__' end Config.load_and_set_settings( Config.setting_files(File.(config_dir), environment) ) end |
#environment ⇒ Object
28 29 30 |
# File 'lib/lyber_core/boot.rb', line 28 def environment @environment ||= ENV['ROBOT_ENVIRONMENT'] ||= 'development' end |
#perform ⇒ Object
21 22 23 24 25 26 |
# File 'lib/lyber_core/boot.rb', line 21 def perform boot_config boot_dsa boot_cocina_models boot_sidekiq end |