Sha256: d6c594fabd7bc17e5255d5cf55832e1dd384ee7bcea9e06ef4120c1786f0003d

Contents?: true

Size: 634 Bytes

Versions: 5

Compression:

Stored size: 634 Bytes

Contents

require 'singleton'
require 'tlogger'
require 'fileutils'

module DevopsHelper
  class Global
    include Singleton

    attr_accessor :logger
    attr_reader :root_store
    def initialize()
      debug = ENV['DevOpsHelper_Debug']
      debugOut = ENV['DevOpsHelper_DebugOut'] || STDOUT

      if debug.nil?
        @logger = Tlogger.new('devops_helper.log', 5, 1024*1024*10)
      else
        @logger = Tlogger.new(debugOut)
      end
      @root_store = File.join(Dir.home,".devops_helper")
      FileUtils.mkdir_p(@root_store) if not File.exist?(@root_store)
    end # initialize

  end # class Global
end # module DevopsHelper

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
devops_helper-0.5.0 lib/devops_helper/global.rb
devops_helper-0.3.1 lib/devops_helper/global.rb
devops_helper-0.3.0 lib/devops_helper/global.rb
devops_helper-0.2.0 lib/devops_helper/global.rb
devops_helper-0.1.0 lib/devops_helper/global.rb