Get rid of autoload in hosts plugins

This commit is contained in:
Mitchell Hashimoto 2012-05-23 16:03:14 -07:00
parent 459d82689e
commit 096e61b122
16 changed files with 54 additions and 24 deletions

View File

@ -1,3 +1,7 @@
require "vagrant"
require Vagrant.source_root.join("plugins/hosts/linux/host")
module VagrantPlugins module VagrantPlugins
module HostArch module HostArch
class Host < VagrantPlugins::HostLinux::Host class Host < VagrantPlugins::HostLinux::Host

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostArch module HostArch
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "Arch host" name "Arch host"
description "Arch host support." description "Arch host support."
host("arch") { Host } host("arch") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,5 +1,6 @@
require 'log4r' require 'log4r'
require "vagrant"
require 'vagrant/util/platform' require 'vagrant/util/platform'
module VagrantPlugins module VagrantPlugins

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostBSD module HostBSD
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "BSD host" name "BSD host"
description "BSD host support." description "BSD host support."
host("bsd") { Host } host("bsd") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,5 +1,9 @@
require "pathname" require "pathname"
require "vagrant"
require Vagrant.source_root.join("plugins/hosts/linux/host")
module VagrantPlugins module VagrantPlugins
module HostFedora module HostFedora
class Host < VagrantPlugins::HostLinux::Host class Host < VagrantPlugins::HostLinux::Host

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostFedora module HostFedora
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "Fedora host" name "Fedora host"
description "Fedora host support." description "Fedora host support."
host("fedora") { Host } host("fedora") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,5 +1,8 @@
require "vagrant"
require 'vagrant/util/platform' require 'vagrant/util/platform'
require Vagrant.source_root.join("plugins/hosts/bsd/host")
module VagrantPlugins module VagrantPlugins
module HostFreeBSD module HostFreeBSD
class Host < VagrantPlugins::HostBSD::Host class Host < VagrantPlugins::HostBSD::Host

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostFreeBSD module HostFreeBSD
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "FreeBSD host" name "FreeBSD host"
description "FreeBSD host support." description "FreeBSD host support."
host("freebsd") { Host } host("freebsd") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,3 +1,7 @@
require "vagrant"
require Vagrant.source_root.join("plugins/hosts/linux/host")
module VagrantPlugins module VagrantPlugins
module HostGentoo module HostGentoo
class Host < VagrantPlugins::HostLinux::Host class Host < VagrantPlugins::HostLinux::Host

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostGentoo module HostGentoo
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "Gentoo host" name "Gentoo host"
description "Gentoo host support." description "Gentoo host support."
host("gentoo") { Host } host("gentoo") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,5 +1,6 @@
require 'log4r' require 'log4r'
require "vagrant"
require 'vagrant/util/platform' require 'vagrant/util/platform'
module VagrantPlugins module VagrantPlugins

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostLinux module HostLinux
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "Linux host" name "Linux host"
description "Linux host support." description "Linux host support."
host("linux") { Host } host("linux") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,5 +1,9 @@
require "pathname" require "pathname"
require "vagrant"
require Vagrant.source_root.join("plugins/hosts/linux/host")
module VagrantPlugins module VagrantPlugins
module HostOpenSUSE module HostOpenSUSE
class Host < VagrantPlugins::HostLinux::Host class Host < VagrantPlugins::HostLinux::Host

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostOpenSUSE module HostOpenSUSE
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "OpenSUSE host" name "OpenSUSE host"
description "OpenSUSE host support." description "OpenSUSE host support."
host("opensuse") { Host } host("opensuse") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end

View File

@ -1,3 +1,4 @@
require "vagrant"
require 'vagrant/util/platform' require 'vagrant/util/platform'
module VagrantPlugins module VagrantPlugins

View File

@ -2,13 +2,14 @@ require "vagrant"
module VagrantPlugins module VagrantPlugins
module HostWindows module HostWindows
autoload :Host, File.expand_path("../host", __FILE__)
class Plugin < Vagrant.plugin("1") class Plugin < Vagrant.plugin("1")
name "Windows host" name "Windows host"
description "Windows host support." description "Windows host support."
host("windows") { Host } host("windows") do
require File.expand_path("../host", __FILE__)
Host
end
end end
end end
end end