Skip to content

Commit

Permalink
Remove autoload from provisioners plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed May 23, 2012
1 parent 1622277 commit 22e54ee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
16 changes: 9 additions & 7 deletions plugins/provisioners/chef/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

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
Provides support for provisioning your virtual machines with
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
16 changes: 9 additions & 7 deletions plugins/provisioners/puppet/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

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
Provides support for provisioning your virtual machines with
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
7 changes: 4 additions & 3 deletions plugins/provisioners/shell/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

module VagrantPlugins
module Shell
autoload :Provisioner, File.expand_path("../provisioner", __FILE__)

class Plugin < Vagrant.plugin("1")
name "shell"
description <<-DESC
Provides support for provisioning your virtual machines with
shell scripts.
DESC

provisioner("shell") { Provisioner }
provisioner("shell") do
require File.expand_path("../provisioner", __FILE__)
Provisioner
end
end
end
end

0 comments on commit 22e54ee

Please sign in to comment.