Module: ErpTechSvcs::Config
- Defined in:
- lib/erp_tech_svcs/config.rb
Class Attribute Summary collapse
-
.compass_logger_path ⇒ Object
Returns the value of attribute compass_logger_path.
-
.email_notifications_from ⇒ Object
Returns the value of attribute email_notifications_from.
-
.file_assets_location ⇒ Object
Returns the value of attribute file_assets_location.
-
.file_storage ⇒ Object
Returns the value of attribute file_storage.
-
.installation_domain ⇒ Object
Returns the value of attribute installation_domain.
-
.login_url ⇒ Object
Returns the value of attribute login_url.
-
.max_file_size_in_mb ⇒ Object
Returns the value of attribute max_file_size_in_mb.
-
.s3_cache_expires_in_minutes ⇒ Object
Returns the value of attribute s3_cache_expires_in_minutes.
-
.s3_protocol ⇒ Object
Returns the value of attribute s3_protocol.
-
.s3_url_expires_in_seconds ⇒ Object
Returns the value of attribute s3_url_expires_in_seconds.
-
.session_expires_in_hours ⇒ Object
Returns the value of attribute session_expires_in_hours.
Class Method Summary collapse
Class Attribute Details
.compass_logger_path ⇒ Object
Returns the value of attribute compass_logger_path.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def compass_logger_path @compass_logger_path end |
.email_notifications_from ⇒ Object
Returns the value of attribute email_notifications_from.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def email_notifications_from @email_notifications_from end |
.file_assets_location ⇒ Object
Returns the value of attribute file_assets_location.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def file_assets_location @file_assets_location end |
.file_storage ⇒ Object
Returns the value of attribute file_storage.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def file_storage @file_storage end |
.installation_domain ⇒ Object
Returns the value of attribute installation_domain.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def installation_domain @installation_domain end |
.login_url ⇒ Object
Returns the value of attribute login_url.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def login_url @login_url end |
.max_file_size_in_mb ⇒ Object
Returns the value of attribute max_file_size_in_mb.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def max_file_size_in_mb @max_file_size_in_mb end |
.s3_cache_expires_in_minutes ⇒ Object
Returns the value of attribute s3_cache_expires_in_minutes.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def s3_cache_expires_in_minutes @s3_cache_expires_in_minutes end |
.s3_protocol ⇒ Object
Returns the value of attribute s3_protocol.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def s3_protocol @s3_protocol end |
.s3_url_expires_in_seconds ⇒ Object
Returns the value of attribute s3_url_expires_in_seconds.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def s3_url_expires_in_seconds @s3_url_expires_in_seconds end |
.session_expires_in_hours ⇒ Object
Returns the value of attribute session_expires_in_hours.
5 6 7 |
# File 'lib/erp_tech_svcs/config.rb', line 5 def session_expires_in_hours @session_expires_in_hours end |
Class Method Details
.configure(&blk) ⇒ Object
39 40 41 |
# File 'lib/erp_tech_svcs/config.rb', line 39 def configure(&blk) @configure_blk = blk end |
.configure! ⇒ Object
43 44 45 |
# File 'lib/erp_tech_svcs/config.rb', line 43 def configure! @configure_blk.call(self) if @configure_blk end |
.init! ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/erp_tech_svcs/config.rb', line 17 def init! @defaults = { :@max_file_size_in_mb => 5, :@installation_domain => 'localhost:3000', :@login_url => '/erp_app/login', :@email_notifications_from => '[email protected]', :@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 |
.reset! ⇒ Object
33 34 35 36 37 |
# File 'lib/erp_tech_svcs/config.rb', line 33 def reset! @defaults.each do |k,v| instance_variable_set(k,v) end end |