Sha256: ec9c394c0af25cc0759e01b186edc59df3a3a7cb811288ebc54d2d8ed71bcac2

Contents?: true

Size: 521 Bytes

Versions: 15

Compression:

Stored size: 521 Bytes

Contents

module Kubes
  module Booter
    def boot
      run_hooks
    end

    # 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
    #
    def run_hooks
      run_hook
      run_hook(Kubes.env)
    end

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

    extend self
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/booter.rb
kubes-0.9.2 lib/kubes/booter.rb
kubes-0.9.1 lib/kubes/booter.rb
kubes-0.9.0 lib/kubes/booter.rb
kubes-0.8.10 lib/kubes/booter.rb
kubes-0.8.9 lib/kubes/booter.rb
kubes-0.8.8 lib/kubes/booter.rb
kubes-0.8.7 lib/kubes/booter.rb
kubes-0.8.6 lib/kubes/booter.rb
kubes-0.8.5 lib/kubes/booter.rb
kubes-0.8.4 lib/kubes/booter.rb
kubes-0.8.3 lib/kubes/booter.rb
kubes-0.8.2 lib/kubes/booter.rb
kubes-0.8.1 lib/kubes/booter.rb
kubes-0.8.0 lib/kubes/booter.rb