Module: Kubes::Booter

Extended by:
Booter
Included in:
Booter
Defined in:
lib/kubes/booter.rb

Instance Method Summary collapse

Instance Method Details

#bootObject



3
4
5
# File 'lib/kubes/booter.rb', line 3

def boot
  run_hooks
end

#run_hook(env = nil) ⇒ Object



18
19
20
21
22
# File 'lib/kubes/booter.rb', line 18

def run_hook(env=nil)
  name = env ? "boot/#{env}" : "boot"
  path = "#{Kubes.root}/.kubes/#{name}.rb"
  require path if File.exist?(path)
end

#run_hooksObject

Special boot hooks run super early, even before plugins are loaded. Useful for setting env vars and other early things.

config/boot.rb
config/boot/dev.rb


13
14
15
16
# File 'lib/kubes/booter.rb', line 13

def run_hooks
  run_hook
  run_hook(Kubes.env)
end