Sha256: 84e4e428222cfa3601dc6354b5c43f6a41cc84e219250f784de8befa66625262
Contents?: true
Size: 917 Bytes
Versions: 20
Compression:
Stored size: 917 Bytes
Contents
require 'settingslogic' module EgovUtils def self.config_file ENV.fetch('EGOVUTILS_CONFIG') { Rails.root.join('config', 'config.yml') } end class Settings < ::Settingslogic source (File.exist?(EgovUtils.config_file) ? EgovUtils.config_file : {}) # namespace Rails.env def allow_internal_accounts? true end def allow_register? allow_internal_accounts? && allow_register end def allow_password_reset? allow_internal_accounts? && allow_password_reset end def mock_resources? mock_resources end end Settings['allow_register'] ||= false Settings['allow_password_reset'] ||= true Settings['redmine'] ||= Settingslogic.new({}) Settings['redmine']['enabled'] ||= false if !Settings.key?('mock_resources') Settings['mock_resources'] = !Rails.env.production? end Settings['mock_resources'] = true if Rails.env.test? end
Version data entries
20 entries across 20 versions & 1 rubygems