Module: Egads::Config
Overview
Local config in the tarball or current working directory
Class Method Summary
collapse
config, s3_bucket, s3_prefix
Class Method Details
47
48
49
|
# File 'lib/egads/config.rb', line 47
def self.
config['build'] && Array(config['build']['extra_paths'])
end
|
.config_path ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/egads/config.rb', line 29
def self.config_path
path = ENV['EGADS_CONFIG'] || File.join(Dir.pwd, 'egads.yml')
unless path && File.readable?(path)
raise ArgumentError.new("Could not read config file. Set either EGADS_CONFIG, or create egads.yml in the current directory")
end
path
end
|
.hooks_for(cmd, hook) ⇒ Object
Returns the hooks in the config for cmd and hook. E.g. hooks_for(:build, :post)
39
40
41
42
43
44
45
|
# File 'lib/egads/config.rb', line 39
def self.hooks_for(cmd, hook)
if Hash === config[cmd.to_s]
Array(config[cmd.to_s][hook.to_s])
else
[]
end
end
|
.seed_branch ⇒ Object
51
52
53
|
# File 'lib/egads/config.rb', line 51
def self.seed_branch
config['seed_branch'] || "egads-seed"
end
|