Sha256: 485c6d0d62f6d7a1039448a91a1d4a7c8642c5ba8f772408494b1e678a1af1ca
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
module ErpTechSvcs module Config class << self attr_accessor :max_file_size_in_mb, :installation_domain, :login_url, :email_notifications_from, :file_assets_location, :s3_url_expires_in_seconds, :s3_protocol, :file_storage, :s3_cache_expires_in_minutes def init! @defaults = { :@max_file_size_in_mb => 5, :@installation_domain => 'localhost:3000', :@login_url => '/erp_app/login', :@email_notifications_from => 'notifications@noreply.com', :@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 } 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
erp_tech_svcs-3.0.1 | lib/erp_tech_svcs/config.rb |