lib/cloudstrap/config.rb in cloudstrap-0.48.2.pre vs lib/cloudstrap/config.rb in cloudstrap-0.48.15.pre
- old
+ new
@@ -310,10 +310,12 @@
@dir ||= ENV.fetch('BOOTSTRAP_CONFIG_DIR') { workdir }
end
Contract None => String
def file
- @file ||= ENV.fetch('BOOTSTRAP_CONFIG_FILE') { 'config.yaml' }
+ @file ||= ENV.fetch('BOOTSTRAP_CONFIG_FILE') do
+ %w(config.yaml config.yml).find { |f| File.exist? "#{dir}/#{f}" }
+ end
end
Contract None => String
def path
@path ||= File.expand_path [dir, file].join('/')