lib/stella.rb in solutious-stella-0.7.0.004 vs lib/stella.rb in solutious-stella-0.7.0.005

- old
+ new

@@ -1,45 +1,30 @@ -unless defined?(STELLA_LIB_HOME) - STELLA_LIB_HOME = File.expand_path File.dirname(__FILE__) -end - -local_libs = %w{drydock storable sysinfo gibbler} -local_libs.each { |dir| $:.unshift File.join(STELLA_LIB_HOME, '..', '..', dir, 'lib') } -#require 'rubygems' - -require 'storable' -require 'sysinfo' -require 'gibbler' -require 'gibbler/aliases' require 'ostruct' require 'threadify' -require 'drydock/screen' module Stella extend self - require 'stella/version' - require 'stella/exceptions' - require 'stella/utils' - require 'stella/stats' - require 'stella/mixins' - require 'stella/dsl' - require 'stella/engine' - require 'stella/testplan' - autoload :Utils, STELLA_LIB_HOME + "/stella/utils" - autoload :Data, STELLA_LIB_HOME + "/stella/data" - autoload :Config, STELLA_LIB_HOME + "/stella/config" - autoload :Client, STELLA_LIB_HOME + "/stella/client" + LIB_HOME = File.expand_path File.dirname(__FILE__) unless defined?(LIB_HOME) + %w{storable sysinfo gibbler}.each do |dir| + $:.unshift File.join(LIB_HOME, '..', '..', dir, 'lib') + end + require 'storable' + require 'sysinfo' + require 'gibbler' + require 'gibbler/aliases' + require 'drydock/screen' + @@sysinfo = SysInfo.new.freeze - @@logger = Drydock::Screen @@loglev = 1 @@debug = false # Puts +msg+ to +@@logger+ + def lflush; @@logger.flush if @@logger.respond_to? :flush; end def li(*msg); msg.each { |m| @@logger.puts m } if !quiet? end def li1(*msg); li *msg if @@loglev >= 1 end def li2(*msg); li *msg if @@loglev >= 2 end def li3(*msg); li *msg if @@loglev >= 3 end def li4(*msg); li *msg if @@loglev >= 4 end @@ -68,6 +53,13 @@ rescue => ex Stella.le "ERROR: #{ex.message}" Stella.ld ex.backtrace end end + +require 'stella/version' +require 'stella/exceptions' +require 'stella/utils' + +Stella::Utils.require_glob(Stella::LIB_HOME, 'stella', '*.rb') +Stella::Utils.require_vendor "httpclient", '2.1.5.2'