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



93
94
95
# File 'lib/egads/config.rb', line 93

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

.config_pathObject



60
61
62
63
64
65
66
# File 'lib/egads/config.rb', line 60

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



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

def self.extract_to
  config['extract_to']
end

.release_dir(sha) ⇒ Object



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

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

.release_toObject



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

def self.release_to
  config['release_to']
end

.restart_commandObject



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

def self.restart_command
  config['restart_command']
end

.seed_dirObject



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

def self.seed_dir
  config['cache_seeds_to']
end

.setup_environmentObject

Set environment variables from the config



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

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