Class: Appifier::Configuration::Checker

Inherits:
Object
  • Object
show all
Extended by:
Carioca::Injector
Defined in:
lib/appifier/setup.rb

Class Method Summary collapse

Class Method Details

.sanitycheckObject



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/appifier/setup.rb', line 27

def self.sanitycheck
  output.info "Checking path for #{current_user} : "
  status = { true => :ok, false => :error }
  [DEFAULT_PATH,DEFAULT_TEMPLATES_PATH,DEFAULT_CONFIG_PATH,DEFAULT_LOGS_PATH,DEFAULT_DATASETS_PATH].each do |path|
    output.send status[File::exist?(File::expand_path(path))], path
  end
  output.info "Checking file for #{current_user} : "

  ["#{DEFAULT_CONFIG_PATH}/#{DEFAULT_SETTINGS_FILENAME}","#{DEFAULT_LOGS_PATH}/#{DEFAULT_LOG_FILENAME}"].each do |file|
    output.send status[File::exist?(File::expand_path(file))], file
  end
end