Sha256: 626ec6cbd19ee0030d5c6658da94102ff9518e4da6c6a49eb32ed94e72be0b7f

Contents?: true

Size: 1.5 KB

Versions: 2

Compression:

Stored size: 1.5 KB

Contents

# Copyright (2008) Sandia Corporation.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Original Author: Bryan T. Richardson, Sandia National Laboratories <btricha@sandia.gov>
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
#
# This script is modeled after the Rails boot script.

ANTFARM_ROOT = (ENV['ANTFARM_ROOT'] || File.dirname(__FILE__) + "/..").dup unless defined? ANTFARM_ROOT
USER_DIR = (ENV['HOME'] + "/.antfarm").dup unless (!File.exist?(ENV['HOME'] + "/.antfarm") || defined? USER_DIR)

module Antfarm

  class << self
    def boot!
      unless booted?
        require ANTFARM_ROOT + "/lib/init/initializer"
        Antfarm::Initializer.run(:set_load_path)
      end
    end

    def booted?
      defined? Antfarm::Initializer
    end
  end

end

Antfarm.boot!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
antfarm-0.3.0 config/boot.rb
antfarm-0.4.0 config/boot.rb