Sha256: 2760a5f72465e15d3df3100ee39d558ecab5fcec7fc02e5defc44e4d67d00fac
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
# Don't change this file! # Configure your daemon in config/environment.rb DAEMON_ROOT = "#{File.expand_path(File.dirname(__FILE__))}/.." unless defined?( DAEMON_ROOT ) module DaemonKit class << self def boot! unless booted? pick_boot.run end end def booted? defined? DaemonKit::Initializer end def pick_boot (vendor_kit? ? VendorBoot : GemBoot).new end def vendor_kit? lib_path = "#{DAEMON_ROOT}/vendor/daemon-kit/lib/daemon_kit.rb" puts lib_path File.exists?( lib_path ) true end end class Boot def run load_initializer DaemonKit::Arguments.parser_available = true DaemonKit::Initializer.run end end class VendorBoot < Boot def load_initializer require "#{DAEMON_ROOT}/vendor/daemon-kit/lib/daemon_kit/initializer" end end class GemBoot < Boot def load_initializer begin gem 'daemon-kit' require 'daemon_kit/initializer' rescue Gem::LoadError => e msg = <<EOF You are missing the daemon-kit gem. Please install the following gems: * Stable - sudo gem install daemon-kit EOF $stderr.puts msg exit 1 end end end end DaemonKit.boot!
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bunnicula-0.2.2 | config/boot.rb |