# encoding: utf-8 module LocalPac @config = LocalPac::Config.new @ui_logger = LocalPac::UiLogger.new class << self attr_accessor :debug_mode, :config, :ui_logger def enable_debug_mode LocalPac.ui_logger.info "Activating debug mode." require 'pry' require 'debugger' rescue LoadError LocalPac.ui_logger.error "You tried to enable debug-mode, but either 'pry'- or 'debugger'-gem are not installed. Please fix that before using the debug-switch again." end def error_id SecureRandom.hex end def root_path ::File.expand_path('../../..', __FILE__) end end I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) I18n.load_path = Dir[::File.join(LocalPac.root_path, 'app', 'locales', '*.yml')] I18n.backend.load_translations I18n.enforce_available_locales = true end