Sha256: 9ed40ef231ac68fc5a389e48c17d0d35ec0e6f6ab72f96da2fe2101ba2c1741d

Contents?: true

Size: 1000 Bytes

Versions: 13

Compression:

Stored size: 1000 Bytes

Contents

module Evertils
  PACKAGE_NAME = "evertils"
  INSTALLED_DIR = Gem::Specification.find_by_name(Evertils::PACKAGE_NAME).gem_dir
  LOG_DIR = INSTALLED_DIR + "/logs"
  DEFAULT_LOG = Evertils::Log.new # no args means default log
  HELPER_DIR = INSTALLED_DIR + "/lib/helpers/"
  CONTROLLER_DIR = INSTALLED_DIR + "/lib/controllers/"
  MODEL_DIR = INSTALLED_DIR + "/lib/models/"
  TEMPLATE_DIR = INSTALLED_DIR + "/lib/configs/templates/"
  LOG_DIGEST_LENGTH = 20
  DEBUG = false

  class Cfg
    def bootstrap!
      begin
        # configure Notifaction gem
        Notify.configure do |c|
          c.plugins = []
        end
      rescue => e
        Notify.error("#{e.to_s}\n#{e.backtrace.join("\n")}")
      end
    end

    def constant?(name)
      name == name.upcase
    end

    def options
      keys = Evertils.constants.select do |name|
        constant? name
      end

      hash = {}
      keys.each do |key|
        hash[key] = Evertils.const_get(key)
      end
      hash
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
evertils-0.3.0 lib/config.rb
evertils-0.2.9 lib/config.rb
evertils-0.2.8.2 lib/config.rb
evertils-0.2.8.1 lib/config.rb
evertils-0.2.8 lib/config.rb
evertils-0.2.7.2 lib/config.rb
evertils-0.2.7.1 lib/config.rb
evertils-0.2.7 lib/config.rb
evertils-0.2.6 lib/config.rb
evertils-0.2.5 lib/config.rb
evertils-0.2.3 lib/config.rb
evertils-0.2.2 lib/config.rb
evertils-0.2.1 lib/config.rb