Class: Hasta::Configuration
- Inherits:
-
Object
- Object
- Hasta::Configuration
- Defined in:
- lib/hasta/configuration.rb
Overview
Global configuration settings
Instance Attribute Summary collapse
- #cache_storage_root ⇒ Object
- #filters ⇒ Object
- #local_storage_root ⇒ Object
- #logger ⇒ Object
-
#project_root ⇒ Object
Returns the value of attribute project_root.
- #project_steps ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#cache_storage_root ⇒ Object
23 24 25 |
# File 'lib/hasta/configuration.rb', line 23 def cache_storage_root @cache_storage_root ||= '~/.hasta' end |
#filters ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/hasta/configuration.rb', line 46 def filters unless @filters || ENV['HASTA_DATA_FILTERING'] == 'OFF' filter_file = ENV['HASTA_DATA_FILTER_FILE'] || 'filter_config.yml' @filters ||= Filters.from_file(filter_file) end @filters end |
#local_storage_root ⇒ Object
19 20 21 |
# File 'lib/hasta/configuration.rb', line 19 def local_storage_root @local_storage_root ||= '~/fog' end |
#logger ⇒ Object
31 32 33 |
# File 'lib/hasta/configuration.rb', line 31 def logger @logger ||= Logger.new(STDOUT) end |
#project_root ⇒ Object
Returns the value of attribute project_root.
16 17 18 |
# File 'lib/hasta/configuration.rb', line 16 def project_root @project_root end |
#project_steps ⇒ Object
27 28 29 |
# File 'lib/hasta/configuration.rb', line 27 def project_steps @project_steps ||= 'steps' end |
Instance Method Details
#combined_storage ⇒ Object
39 40 41 42 43 44 |
# File 'lib/hasta/configuration.rb', line 39 def combined_storage @combined_storage ||= CombinedStorage.new( S3Storage.new(fog_s3_storage, resolver), LocalStorage.new(fog_local_storage, resolver) ) end |
#project_steps_dir ⇒ Object
35 36 37 |
# File 'lib/hasta/configuration.rb', line 35 def project_steps_dir File.join(project_root, project_steps) end |