Class: Hasta::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hasta/configuration.rb

Overview

Global configuration settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cache_storage_rootObject



23
24
25
# File 'lib/hasta/configuration.rb', line 23

def cache_storage_root
  @cache_storage_root ||= '~/.hasta'
end

#filtersObject



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_rootObject



19
20
21
# File 'lib/hasta/configuration.rb', line 19

def local_storage_root
  @local_storage_root ||= '~/fog'
end

#loggerObject



31
32
33
# File 'lib/hasta/configuration.rb', line 31

def logger
  @logger ||= Logger.new(STDOUT)
end

#project_rootObject

Returns the value of attribute project_root.



16
17
18
# File 'lib/hasta/configuration.rb', line 16

def project_root
  @project_root
end

#project_stepsObject



27
28
29
# File 'lib/hasta/configuration.rb', line 27

def project_steps
  @project_steps ||= 'steps'
end

Instance Method Details

#combined_storageObject



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_dirObject



35
36
37
# File 'lib/hasta/configuration.rb', line 35

def project_steps_dir
  File.join(project_root, project_steps)
end