Sha256: 8b3d681edfe9347dcd42c4a7c1176c616ebda7a7ff427fd16b7dcfcf61eeb15e
Contents?: true
Size: 1.85 KB
Versions: 8
Compression:
Stored size: 1.85 KB
Contents
module ErpTechSvcs module Config class << self attr_accessor :max_file_size_in_mb, :file_upload_types, :installation_domain, :login_url, :email_notifications_from, :email_regex, :file_assets_location, :s3_url_expires_in_seconds, :s3_protocol, :file_storage, :s3_cache_expires_in_minutes, :session_expires_in_hours, :compass_logger_path def init! @defaults = { :@max_file_size_in_mb => 5, :@file_upload_types => 'txt,pdf,zip,tgz,gz,rar,jpg,jpeg,gif,png,tif,tiff,bmp,csv,xls,xlsx,doc,docx,ppt,pptx,psd,ai,css,js,mp3,mp4,m4a,m4v,mov,wav,wmv', :@installation_domain => 'localhost:3000', :@login_url => '/erp_app/login', :@email_notifications_from => 'notifications@noreply.com', :@email_regex => "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$", :@file_assets_location => 'file_assets', # relative to Rails.root/ :@s3_url_expires_in_seconds => 60, :@s3_protocol => 'https', # Can be either 'http' or 'https' :@file_storage => :filesystem, # Can be either :s3 or :filesystem :@s3_cache_expires_in_minutes => 60, :@session_expires_in_hours => 12, # this is used by DeleteExpiredSessionsJob to purge inactive sessions from database :@compass_logger_path => "#{Rails.root}/log" } end def reset! @defaults.each do |k,v| instance_variable_set(k,v) end end def configure(&blk) @configure_blk = blk end def configure! @configure_blk.call(self) if @configure_blk end end init! reset! end end
Version data entries
8 entries across 8 versions & 1 rubygems