Sha256: e6bc2071c7e31590de7604c828378056cc369a98d1a04abeb9ab455b43c9f852

Contents?: true

Size: 560 Bytes

Versions: 6

Compression:

Stored size: 560 Bytes

Contents

module Lono
  module Booter
    def boot
      run_hooks
      Lono::Bundler.require # load plugins
    end

    # Special boot hooks run super early.
    # Useful for setting env vars and other early things.
    #
    #    config/boot.rb
    #    config/boot/dev.rb
    #
    def run_hooks
      run_hook
      run_hook(Lono.env)
      Lono::App::Inits.run_all
    end

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

    extend self
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lono-8.0.0.pre.rc6 lib/lono/booter.rb
lono-8.0.0.pre.rc5 lib/lono/booter.rb
lono-8.0.0.pre.rc4 lib/lono/booter.rb
lono-8.0.0.pre.rc3 lib/lono/booter.rb
lono-8.0.0.pre.rc2 lib/lono/booter.rb
lono-8.0.0.pre.rc1 lib/lono/booter.rb