Module: Egads::RemoteConfig

Extended by:
CommonConfig
Defined in:
lib/egads/config.rb

Overview

Remote config for the extract command (before data in tarball is available)

Class Method Summary collapse

Methods included from CommonConfig

config, s3_bucket, s3_prefix

Class Method Details

.bundler_optionsObject



88
89
90
# File 'lib/egads/config.rb', line 88

def self.bundler_options
  config['bundler']['options'] if config['bundler']
end

.config_pathObject



55
56
57
58
59
60
61
# File 'lib/egads/config.rb', line 55

def self.config_path
  path = ENV['EGADS_REMOTE_CONFIG'] || "/etc/egads.yml"
  unless path && File.readable?(path)
    raise ArgumentError.new("Could not read remote config file. Set either EGADS_REMOTE_CONFIG, or create /etc/egads.yml")
  end
  path
end

.extract_toObject



67
68
69
# File 'lib/egads/config.rb', line 67

def self.extract_to
  config['extract_to']
end

.release_dir(sha) ⇒ Object



75
76
77
# File 'lib/egads/config.rb', line 75

def self.release_dir(sha)
  File.join(config['extract_to'], sha)
end

.release_toObject



63
64
65
# File 'lib/egads/config.rb', line 63

def self.release_to
  config['release_to']
end

.restart_commandObject



84
85
86
# File 'lib/egads/config.rb', line 84

def self.restart_command
  config['restart_command']
end

.seed_dirObject



71
72
73
# File 'lib/egads/config.rb', line 71

def self.seed_dir
  config['cache_seeds_to']
end

.setup_environmentObject

Set environment variables from the config



80
81
82
# File 'lib/egads/config.rb', line 80

def self.setup_environment
  config['env'].each{|k,v| ENV[k] = v.to_s } if config['env']
end