Sha256: 2c4359e61291e0e713d2ec7045710042630e9b324b983a3e0727de5d9ee59805
Contents?: true
Size: 819 Bytes
Versions: 30
Compression:
Stored size: 819 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.exists?(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 Settings['mock_resources'] ||= !Rails.env.production? end
Version data entries
30 entries across 30 versions & 1 rubygems