# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION ||= "2"

## Locate and load the config file
magentoAppYamlPath = File.expand_path("vagrant/magento.yaml", File.dirname(__FILE__))

# Load external script
require File.expand_path("vagrant/Bootstrap.rb", File.dirname(__FILE__))

Vagrant.configure("2") do |config|

    if File.exist? magentoAppYamlPath then
        settings = YAML::load(File.read(magentoAppYamlPath))
    else
        abort "Bootstrap settings file not found."
    end

    Bootstrap.configure(config, settings)
end