Files
vagrant-libvirt/lib/vagrant-libvirt.rb

32 lines
853 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2013-03-27 00:55:30 +01:00
require 'pathname'
module VagrantPlugins
module ProviderLibvirt
lib_path = Pathname.new(File.expand_path('../vagrant-libvirt', __FILE__))
autoload :Action, lib_path.join('action')
autoload :Errors, lib_path.join('errors')
autoload :Util, lib_path.join('util')
2013-03-27 00:55:30 +01:00
def self.source_root
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
2013-03-27 09:43:32 +01:00
end
2013-03-27 00:55:30 +01:00
end
end
begin
require 'vagrant'
rescue LoadError
raise 'The Vagrant Libvirt plugin 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.5.0'
2017-01-16 16:40:23 +01:00
raise 'The Vagrant Libvirt plugin is only compatible with Vagrant 1.5+.'
end
# make sure base module class defined before loading plugin
require 'vagrant-libvirt/plugin'