Remove autoload from provisioners plugins

This commit is contained in:
Mitchell Hashimoto 2012-05-23 16:07:08 -07:00
parent 162227765f
commit 22e54eed58
3 changed files with 22 additions and 17 deletions

View File

@ -2,11 +2,6 @@ require "vagrant"
module VagrantPlugins
module Chef
module Provisioner
autoload :ChefSolo, File.expand_path("../provisioner/chef_solo", __FILE__)
autoload :ChefClient, File.expand_path("../provisioner/chef_client", __FILE__)
end
class Plugin < Vagrant.plugin("1")
name "chef"
description <<-DESC
@ -14,8 +9,15 @@ module VagrantPlugins
Chef via `chef-solo` or `chef-client`.
DESC
provisioner("chef_solo") { Provisioner::ChefSolo }
provisioner("chef_client") { Provisioner::ChefClient }
provisioner("chef_solo") do
require File.expand_path("../provisioner/chef_solo", __FILE__)
Provisioner::ChefSolo
end
provisioner("chef_client") do
require File.expand_path("../provisioner/chef_client", __FILE__)
Provisioner::ChefClient
end
end
end
end

View File

@ -2,11 +2,6 @@ require "vagrant"
module VagrantPlugins
module Pupppet
module Provisioner
autoload :Puppet, File.expand_path("../provisioner/puppet", __FILE__)
autoload :PuppetServer, File.expand_path("../provisioner/puppet_server", __FILE__)
end
class Plugin < Vagrant.plugin("1")
name "puppet"
description <<-DESC
@ -14,8 +9,15 @@ module VagrantPlugins
Puppet either using `puppet apply` or a Puppet server.
DESC
provisioner("puppet") { Provisioner::Puppet }
provisioner("puppet_server") { Provisioner::PuppetServer }
provisioner("puppet") do
require File.expand_path("../provisioner/puppet", __FILE__)
Provisioner::Puppet
end
provisioner("puppet_server") do
require File.expand_path("../provisioner/puppet_server", __FILE__)
Provisioner::PuppetServer
end
end
end
end

View File

@ -2,8 +2,6 @@ require "vagrant"
module VagrantPlugins
module Shell
autoload :Provisioner, File.expand_path("../provisioner", __FILE__)
class Plugin < Vagrant.plugin("1")
name "shell"
description <<-DESC
@ -11,7 +9,10 @@ module VagrantPlugins
shell scripts.
DESC
provisioner("shell") { Provisioner }
provisioner("shell") do
require File.expand_path("../provisioner", __FILE__)
Provisioner
end
end
end
end