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 VagrantPlugins
module Chef 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") class Plugin < Vagrant.plugin("1")
name "chef" name "chef"
description <<-DESC description <<-DESC
@ -14,8 +9,15 @@ module VagrantPlugins
Chef via `chef-solo` or `chef-client`. Chef via `chef-solo` or `chef-client`.
DESC DESC
provisioner("chef_solo") { Provisioner::ChefSolo } provisioner("chef_solo") do
provisioner("chef_client") { Provisioner::ChefClient } 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 end
end end

View File

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

View File

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