lib/poolparty.rb in poolparty-0.2.69 vs lib/poolparty.rb in poolparty-0.2.84

- old
+ new

@@ -1,10 +1,10 @@ require 'rubygems' # Load required gems @required_software = Array.new -%w(activesupport ftools logging resolv ruby2ruby).each do |lib| +%w(activesupport ftools logging resolv ruby2ruby digest/sha2 open3 capistrano).each do |lib| begin require lib rescue Exception => e @required_software << lib end @@ -34,25 +34,27 @@ # Use active supports auto load mechanism ActiveSupport::Dependencies.load_paths << File.dirname(__FILE__) ## Load PoolParty -require "#{File.dirname(__FILE__)}/poolparty/version" +%w(version).each do |f| + require "#{File.dirname(__FILE__)}/poolparty/#{f}" +end -%w(core modules exceptions dependency_resolutions aska monitors net).each do |dir| +%w(core modules exceptions dependency_resolutions aska monitors provisioners extra net).each do |dir| Dir[File.dirname(__FILE__) + "/poolparty/#{dir}/**.rb"].each do |file| require file end end -Kernel.load_p File.dirname(__FILE__) + "/poolparty/pool" +Kernel.load_p File.dirname(__FILE__) + "/poolparty/poolparty" Logging.init :debug, :info, :warn, :error, :fatal module PoolParty include FileWriter - def logger + def log @logger ||= make_new_logger end class PoolParty def initialize(spec) @@ -79,10 +81,12 @@ class Class include PoolParty::PluginModel end ## Load PoolParty Plugins and package -%w(plugins base_packages).each do |dir| - Dir[File.dirname(__FILE__) + "/poolparty/#{dir}/**.rb"].each do |file| - require file +module PoolParty + %w(plugins base_packages).each do |dir| + Dir[::File.dirname(__FILE__) + "/poolparty/#{dir}/*.rb"].each do |file| + require file + end end end \ No newline at end of file