Module: Terraspace::Booter
Instance Method Summary collapse
Instance Method Details
#boot ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/terraspace/booter.rb', line 3 def boot Terraspace::Bundle.require # load plugins load_plugin_default_configs Terraspace.config # load project config Terraspace::App::Hooks.run_hook(:on_boot) set_plugin_cache! end |
#load_plugin_default_configs ⇒ Object
11 12 13 14 15 16 |
# File 'lib/terraspace/booter.rb', line 11 def load_plugin_default_configs Terraspace::Plugin.config_classes.each do |klass| # IE: TerraspacePluginAws::Interfaces::Config.instance.load_project_config klass.instance.load_project_config end end |
#set_plugin_cache! ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/terraspace/booter.rb', line 18 def set_plugin_cache! plugin_cache = Terraspace.config.terraform.plugin_cache return unless plugin_cache.enabled dir = ENV['TF_PLUGIN_CACHE_DIR'] ||= plugin_cache.dir FileUtils.mkdir_p(dir) dir end |