INNER CODE UNIT · Ruby
apply_path_settings
EugenMayer/docker-sync · lib/docker-sync/compose.rb:55
def apply_path_settings(compose_files, settings, error_key)
if settings.kind_of?(Array)
apply_filepaths(compose_files, settings, error_key)
else
apply_filepath(compose_files, settings, error_key)
end
end
private
def apply_filepath(array, filepath, error_key)
path = File.expand_path(filepath)
unless File.exist?(path)
raise("Your referenced docker-compose file in docker-sync.yml was not found at #{error_key}")
end
array.push path
end
def apply_filepaths(array, filepath_array, error_key)