begin require "vagrant" rescue LoadError raise "The ProfitBricks Cloud provider must be run within Vagrant." end # This is a sanity check to make sure no one is attempting to install # this into an early Vagrant version. if Vagrant::VERSION < "1.1.0" raise "ProfitBricks Cloud provider is only compatible with Vagrant 1.1+" end module VagrantPlugins module ProfitBricks class Plugin < Vagrant.plugin("2") name "ProfitBricks Cloud" description <<-DESC This plugin enables Vagrant to manage machines in the ProfitBricks Cloud. DESC config(:profitbricks, :provider) do require_relative "config" Config end provider(:profitbricks, { :box_optional => true, parallel: true}) do # Setup localization and logging ProfitBricks.init_i18n ProfitBricks.init_logging # Load the actual provider require_relative "provider" Provider end command('profitbricks') do ProfitBricks.init_i18n require_relative "command/root" Command::Root end end end end