Skip to content

Commit

Permalink
Get rid of autoload in hosts plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed May 23, 2012
1 parent 459d826 commit 096e61b
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 24 deletions.
4 changes: 4 additions & 0 deletions plugins/hosts/arch/host.rb
@@ -1,3 +1,7 @@
require "vagrant"

require Vagrant.source_root.join("plugins/hosts/linux/host")

module VagrantPlugins
module HostArch
class Host < VagrantPlugins::HostLinux::Host
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/arch/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostArch
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "Arch host"
description "Arch host support."

host("arch") { Host }
host("arch") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
1 change: 1 addition & 0 deletions plugins/hosts/bsd/host.rb
@@ -1,5 +1,6 @@
require 'log4r'

require "vagrant"
require 'vagrant/util/platform'

module VagrantPlugins
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/bsd/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostBSD
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "BSD host"
description "BSD host support."

host("bsd") { Host }
host("bsd") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
4 changes: 4 additions & 0 deletions plugins/hosts/fedora/host.rb
@@ -1,5 +1,9 @@
require "pathname"

require "vagrant"

require Vagrant.source_root.join("plugins/hosts/linux/host")

module VagrantPlugins
module HostFedora
class Host < VagrantPlugins::HostLinux::Host
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/fedora/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostFedora
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "Fedora host"
description "Fedora host support."

host("fedora") { Host }
host("fedora") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
3 changes: 3 additions & 0 deletions plugins/hosts/freebsd/host.rb
@@ -1,5 +1,8 @@
require "vagrant"
require 'vagrant/util/platform'

require Vagrant.source_root.join("plugins/hosts/bsd/host")

module VagrantPlugins
module HostFreeBSD
class Host < VagrantPlugins::HostBSD::Host
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/freebsd/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostFreeBSD
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "FreeBSD host"
description "FreeBSD host support."

host("freebsd") { Host }
host("freebsd") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
4 changes: 4 additions & 0 deletions plugins/hosts/gentoo/host.rb
@@ -1,3 +1,7 @@
require "vagrant"

require Vagrant.source_root.join("plugins/hosts/linux/host")

module VagrantPlugins
module HostGentoo
class Host < VagrantPlugins::HostLinux::Host
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/gentoo/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostGentoo
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "Gentoo host"
description "Gentoo host support."

host("gentoo") { Host }
host("gentoo") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
1 change: 1 addition & 0 deletions plugins/hosts/linux/host.rb
@@ -1,5 +1,6 @@
require 'log4r'

require "vagrant"
require 'vagrant/util/platform'

module VagrantPlugins
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/linux/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostLinux
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "Linux host"
description "Linux host support."

host("linux") { Host }
host("linux") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
4 changes: 4 additions & 0 deletions plugins/hosts/opensuse/host.rb
@@ -1,5 +1,9 @@
require "pathname"

require "vagrant"

require Vagrant.source_root.join("plugins/hosts/linux/host")

module VagrantPlugins
module HostOpenSUSE
class Host < VagrantPlugins::HostLinux::Host
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/opensuse/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostOpenSUSE
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "OpenSUSE host"
description "OpenSUSE host support."

host("opensuse") { Host }
host("opensuse") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end
1 change: 1 addition & 0 deletions plugins/hosts/windows/host.rb
@@ -1,3 +1,4 @@
require "vagrant"
require 'vagrant/util/platform'

module VagrantPlugins
Expand Down
7 changes: 4 additions & 3 deletions plugins/hosts/windows/plugin.rb
Expand Up @@ -2,13 +2,14 @@

module VagrantPlugins
module HostWindows
autoload :Host, File.expand_path("../host", __FILE__)

class Plugin < Vagrant.plugin("1")
name "Windows host"
description "Windows host support."

host("windows") { Host }
host("windows") do
require File.expand_path("../host", __FILE__)
Host
end
end
end
end

0 comments on commit 096e61b

Please sign in to comment.