13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/karo/config.rb', line 13
def self.load_configuration(options)
configuration = lookup_configuration(Dir.getwd, options[:config_file])
configuration = configuration[options[:environment]]
if configuration.nil? || configuration.empty?
puts "Please pass a valid configuration for an environment '#{options[:environment]}' within this file '#{File.expand_path(options[:config_file])}'"
raise Thor::Error, "You can use 'karo generate' to generate a skeleton .karo.yml file"
else
configuration
end
end
|