From b878f1bd669c48582bd37ee25cf73908cd48dc06 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 9 Dec 2011 17:23:27 -0800 Subject: [PATCH] class => module Action --- lib/vagrant/action.rb | 4 +--- lib/vagrant/action/box/destroy.rb | 2 +- lib/vagrant/action/box/download.rb | 2 +- lib/vagrant/action/box/package.rb | 2 +- lib/vagrant/action/box/unpackage.rb | 2 +- lib/vagrant/action/box/verify.rb | 2 +- lib/vagrant/action/builder.rb | 2 +- lib/vagrant/action/builtin.rb | 2 +- lib/vagrant/action/env/set.rb | 2 +- lib/vagrant/action/environment.rb | 2 +- lib/vagrant/action/general/package.rb | 2 +- lib/vagrant/action/general/validate.rb | 2 +- lib/vagrant/action/registry.rb | 2 +- lib/vagrant/action/runner.rb | 2 +- lib/vagrant/action/vm/boot.rb | 2 +- lib/vagrant/action/vm/check_accessible.rb | 2 +- lib/vagrant/action/vm/check_box.rb | 2 +- lib/vagrant/action/vm/check_guest_additions.rb | 2 +- lib/vagrant/action/vm/clean_machine_folder.rb | 2 +- lib/vagrant/action/vm/clear_forwarded_ports.rb | 2 +- lib/vagrant/action/vm/clear_nfs_exports.rb | 2 +- lib/vagrant/action/vm/clear_shared_folders.rb | 2 +- lib/vagrant/action/vm/customize.rb | 2 +- lib/vagrant/action/vm/destroy.rb | 2 +- lib/vagrant/action/vm/destroy_unused_network_interfaces.rb | 2 +- lib/vagrant/action/vm/discard_state.rb | 2 +- lib/vagrant/action/vm/export.rb | 2 +- lib/vagrant/action/vm/forward_ports.rb | 2 +- lib/vagrant/action/vm/forward_ports_helpers.rb | 2 +- lib/vagrant/action/vm/halt.rb | 2 +- lib/vagrant/action/vm/host_name.rb | 2 +- lib/vagrant/action/vm/import.rb | 2 +- lib/vagrant/action/vm/match_mac_address.rb | 2 +- lib/vagrant/action/vm/modify.rb | 2 +- lib/vagrant/action/vm/network.rb | 2 +- lib/vagrant/action/vm/nfs.rb | 2 +- lib/vagrant/action/vm/nfs_helpers.rb | 2 +- lib/vagrant/action/vm/package.rb | 2 +- lib/vagrant/action/vm/package_vagrantfile.rb | 2 +- lib/vagrant/action/vm/provision.rb | 2 +- lib/vagrant/action/vm/provisioner_cleanup.rb | 2 +- lib/vagrant/action/vm/resume.rb | 2 +- lib/vagrant/action/vm/share_folders.rb | 2 +- lib/vagrant/action/vm/suspend.rb | 2 +- lib/vagrant/action/warden.rb | 2 +- 45 files changed, 45 insertions(+), 47 deletions(-) diff --git a/lib/vagrant/action.rb b/lib/vagrant/action.rb index 671c6fe7c..8af1b338c 100644 --- a/lib/vagrant/action.rb +++ b/lib/vagrant/action.rb @@ -1,10 +1,8 @@ -require 'log4r' - require 'vagrant/action/builder' require 'vagrant/action/builtin' module Vagrant - class Action + module Action autoload :Environment, 'vagrant/action/environment' autoload :Registry, 'vagrant/action/registry' autoload :Runner, 'vagrant/action/runner' diff --git a/lib/vagrant/action/box/destroy.rb b/lib/vagrant/action/box/destroy.rb index 005affda9..8ead85e5b 100644 --- a/lib/vagrant/action/box/destroy.rb +++ b/lib/vagrant/action/box/destroy.rb @@ -1,7 +1,7 @@ require 'fileutils' module Vagrant - class Action + module Action module Box class Destroy def initialize(app, env) diff --git a/lib/vagrant/action/box/download.rb b/lib/vagrant/action/box/download.rb index a8e3aecdc..283d2eb55 100644 --- a/lib/vagrant/action/box/download.rb +++ b/lib/vagrant/action/box/download.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module Box class Download BASENAME = "box" diff --git a/lib/vagrant/action/box/package.rb b/lib/vagrant/action/box/package.rb index 62588fb9c..a513b28e8 100644 --- a/lib/vagrant/action/box/package.rb +++ b/lib/vagrant/action/box/package.rb @@ -1,7 +1,7 @@ require 'vagrant/action/general/package' module Vagrant - class Action + module Action module Box # Packages a box which has already been unpackaged (such as # for the `vagrant box repackage` command) by leveraging the diff --git a/lib/vagrant/action/box/unpackage.rb b/lib/vagrant/action/box/unpackage.rb index d4b630b19..31f05c8e1 100644 --- a/lib/vagrant/action/box/unpackage.rb +++ b/lib/vagrant/action/box/unpackage.rb @@ -2,7 +2,7 @@ require 'fileutils' require 'archive/tar/minitar' module Vagrant - class Action + module Action module Box # Unpackages a downloaded box to a given directory with a given # name. diff --git a/lib/vagrant/action/box/verify.rb b/lib/vagrant/action/box/verify.rb index 716fa398f..f0187265e 100644 --- a/lib/vagrant/action/box/verify.rb +++ b/lib/vagrant/action/box/verify.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module Box class Verify def initialize(app, env) diff --git a/lib/vagrant/action/builder.rb b/lib/vagrant/action/builder.rb index 091c646dd..efc8c3e8b 100644 --- a/lib/vagrant/action/builder.rb +++ b/lib/vagrant/action/builder.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action # Action builder which provides a nice DSL for building up # a middleware sequence for Vagrant actions. This code is based # heavily off of `Rack::Builder` and `ActionDispatch::MiddlewareStack` diff --git a/lib/vagrant/action/builtin.rb b/lib/vagrant/action/builtin.rb index 03258b98b..bc4881770 100644 --- a/lib/vagrant/action/builtin.rb +++ b/lib/vagrant/action/builtin.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action # Registers the builtin actions with a specific registry. # # These are the pre-built action sequences that are shipped with diff --git a/lib/vagrant/action/env/set.rb b/lib/vagrant/action/env/set.rb index dd88fe5cf..4c178f3f9 100644 --- a/lib/vagrant/action/env/set.rb +++ b/lib/vagrant/action/env/set.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module Env # A middleware which just sets up the environment with some # options which are passed to it. diff --git a/lib/vagrant/action/environment.rb b/lib/vagrant/action/environment.rb index 38a0909ff..769a16832 100644 --- a/lib/vagrant/action/environment.rb +++ b/lib/vagrant/action/environment.rb @@ -1,7 +1,7 @@ require 'vagrant/util/hash_with_indifferent_access' module Vagrant - class Action + module Action # Represents an action environment which is what is passed # to the `call` method of each action. This environment contains # some helper methods for accessing the environment as well diff --git a/lib/vagrant/action/general/package.rb b/lib/vagrant/action/general/package.rb index 3ed51b5d1..90522a6a9 100644 --- a/lib/vagrant/action/general/package.rb +++ b/lib/vagrant/action/general/package.rb @@ -2,7 +2,7 @@ require 'fileutils' require 'archive/tar/minitar' module Vagrant - class Action + module Action module General # A general packaging (tar) middleware. Given the following options, # it will do the right thing: diff --git a/lib/vagrant/action/general/validate.rb b/lib/vagrant/action/general/validate.rb index 78a5d5e20..ec87d1823 100644 --- a/lib/vagrant/action/general/validate.rb +++ b/lib/vagrant/action/general/validate.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module General # Simply validates the configuration of the current Vagrant # environment. diff --git a/lib/vagrant/action/registry.rb b/lib/vagrant/action/registry.rb index 0763ca896..9213d2e9c 100644 --- a/lib/vagrant/action/registry.rb +++ b/lib/vagrant/action/registry.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action # This is the action registry, which stores action steps indexed # by a unique name. These registry names can be used to call actions # via the `Runner` class. diff --git a/lib/vagrant/action/runner.rb b/lib/vagrant/action/runner.rb index 5d19757f6..fa530cc36 100644 --- a/lib/vagrant/action/runner.rb +++ b/lib/vagrant/action/runner.rb @@ -6,7 +6,7 @@ require 'vagrant/util/busy' # * env.lock module Vagrant - class Action + module Action class Runner @@reported_interrupt = false diff --git a/lib/vagrant/action/vm/boot.rb b/lib/vagrant/action/vm/boot.rb index 1329b974d..29cd0cf91 100644 --- a/lib/vagrant/action/vm/boot.rb +++ b/lib/vagrant/action/vm/boot.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Boot def initialize(app, env) diff --git a/lib/vagrant/action/vm/check_accessible.rb b/lib/vagrant/action/vm/check_accessible.rb index 9d8abaf1e..3dc804eb7 100644 --- a/lib/vagrant/action/vm/check_accessible.rb +++ b/lib/vagrant/action/vm/check_accessible.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class CheckAccessible def initialize(app, env) diff --git a/lib/vagrant/action/vm/check_box.rb b/lib/vagrant/action/vm/check_box.rb index 2ac0011f9..d8565ab11 100644 --- a/lib/vagrant/action/vm/check_box.rb +++ b/lib/vagrant/action/vm/check_box.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class CheckBox def initialize(app, env) diff --git a/lib/vagrant/action/vm/check_guest_additions.rb b/lib/vagrant/action/vm/check_guest_additions.rb index 2363434e4..6bd219f62 100644 --- a/lib/vagrant/action/vm/check_guest_additions.rb +++ b/lib/vagrant/action/vm/check_guest_additions.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # Middleware which verifies that the VM has the proper guest additions # installed and prints a warning if they're not detected or if the diff --git a/lib/vagrant/action/vm/clean_machine_folder.rb b/lib/vagrant/action/vm/clean_machine_folder.rb index 5df3cf6fe..99c64c837 100644 --- a/lib/vagrant/action/vm/clean_machine_folder.rb +++ b/lib/vagrant/action/vm/clean_machine_folder.rb @@ -1,7 +1,7 @@ require 'fileutils' module Vagrant - class Action + module Action module VM # Cleans up the VirtualBox machine folder for any ".xml-prev" # files which VirtualBox may have left over. This is a bug in diff --git a/lib/vagrant/action/vm/clear_forwarded_ports.rb b/lib/vagrant/action/vm/clear_forwarded_ports.rb index 957a8fad4..6f5fbe153 100644 --- a/lib/vagrant/action/vm/clear_forwarded_ports.rb +++ b/lib/vagrant/action/vm/clear_forwarded_ports.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class ClearForwardedPorts def initialize(app, env) diff --git a/lib/vagrant/action/vm/clear_nfs_exports.rb b/lib/vagrant/action/vm/clear_nfs_exports.rb index 291ece25d..33b5e2aa7 100644 --- a/lib/vagrant/action/vm/clear_nfs_exports.rb +++ b/lib/vagrant/action/vm/clear_nfs_exports.rb @@ -1,7 +1,7 @@ require File.expand_path("../nfs_helpers", __FILE__) module Vagrant - class Action + module Action module VM class ClearNFSExports include NFSHelpers diff --git a/lib/vagrant/action/vm/clear_shared_folders.rb b/lib/vagrant/action/vm/clear_shared_folders.rb index d1352347f..180875a48 100644 --- a/lib/vagrant/action/vm/clear_shared_folders.rb +++ b/lib/vagrant/action/vm/clear_shared_folders.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class ClearSharedFolders def initialize(app, env) diff --git a/lib/vagrant/action/vm/customize.rb b/lib/vagrant/action/vm/customize.rb index 2cce925e2..96c117e63 100644 --- a/lib/vagrant/action/vm/customize.rb +++ b/lib/vagrant/action/vm/customize.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Customize def initialize(app, env) diff --git a/lib/vagrant/action/vm/destroy.rb b/lib/vagrant/action/vm/destroy.rb index 9d3be98df..8ac21bdd9 100644 --- a/lib/vagrant/action/vm/destroy.rb +++ b/lib/vagrant/action/vm/destroy.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Destroy def initialize(app, env) diff --git a/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb b/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb index 0730d1ab6..f5d756466 100644 --- a/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +++ b/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # Destroys the unused host only interfaces. This middleware cleans # up any created host only networks. diff --git a/lib/vagrant/action/vm/discard_state.rb b/lib/vagrant/action/vm/discard_state.rb index 6802ab1a8..18b82f578 100644 --- a/lib/vagrant/action/vm/discard_state.rb +++ b/lib/vagrant/action/vm/discard_state.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # Discards the saved state of the VM if its saved. If its # not saved, does nothing. diff --git a/lib/vagrant/action/vm/export.rb b/lib/vagrant/action/vm/export.rb index 3b99389b0..cdb36e6d9 100644 --- a/lib/vagrant/action/vm/export.rb +++ b/lib/vagrant/action/vm/export.rb @@ -1,7 +1,7 @@ require 'fileutils' module Vagrant - class Action + module Action module VM class Export attr_reader :temp_dir diff --git a/lib/vagrant/action/vm/forward_ports.rb b/lib/vagrant/action/vm/forward_ports.rb index ef0e8e2e9..309533518 100644 --- a/lib/vagrant/action/vm/forward_ports.rb +++ b/lib/vagrant/action/vm/forward_ports.rb @@ -1,7 +1,7 @@ require File.join(File.dirname(__FILE__), 'forward_ports_helpers') module Vagrant - class Action + module Action module VM class ForwardPorts include ForwardPortsHelpers diff --git a/lib/vagrant/action/vm/forward_ports_helpers.rb b/lib/vagrant/action/vm/forward_ports_helpers.rb index 2ace0d181..4b81f50cf 100644 --- a/lib/vagrant/action/vm/forward_ports_helpers.rb +++ b/lib/vagrant/action/vm/forward_ports_helpers.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # Helper methods for forwarding ports. Requires that the environment # is set to the `@env` instance variable. diff --git a/lib/vagrant/action/vm/halt.rb b/lib/vagrant/action/vm/halt.rb index 935627a7c..ca9d248a2 100644 --- a/lib/vagrant/action/vm/halt.rb +++ b/lib/vagrant/action/vm/halt.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Halt def initialize(app, env, options=nil) diff --git a/lib/vagrant/action/vm/host_name.rb b/lib/vagrant/action/vm/host_name.rb index 94cfb1e6b..d2234e63b 100644 --- a/lib/vagrant/action/vm/host_name.rb +++ b/lib/vagrant/action/vm/host_name.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class HostName def initialize(app, env) diff --git a/lib/vagrant/action/vm/import.rb b/lib/vagrant/action/vm/import.rb index 867eb99c1..796e28725 100644 --- a/lib/vagrant/action/vm/import.rb +++ b/lib/vagrant/action/vm/import.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Import def initialize(app, env) diff --git a/lib/vagrant/action/vm/match_mac_address.rb b/lib/vagrant/action/vm/match_mac_address.rb index 4ca995be9..aba4bab01 100644 --- a/lib/vagrant/action/vm/match_mac_address.rb +++ b/lib/vagrant/action/vm/match_mac_address.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class MatchMACAddress def initialize(app, env) diff --git a/lib/vagrant/action/vm/modify.rb b/lib/vagrant/action/vm/modify.rb index 5f6895d66..ab5bbbccb 100644 --- a/lib/vagrant/action/vm/modify.rb +++ b/lib/vagrant/action/vm/modify.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # This class allows other actions on the virtual machine object # to be consolidated under a single write lock. This vastly speeds diff --git a/lib/vagrant/action/vm/network.rb b/lib/vagrant/action/vm/network.rb index ad817f0b5..3664151e3 100644 --- a/lib/vagrant/action/vm/network.rb +++ b/lib/vagrant/action/vm/network.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # Networking middleware for Vagrant. This enables host only # networking on VMs if configured as such. diff --git a/lib/vagrant/action/vm/nfs.rb b/lib/vagrant/action/vm/nfs.rb index afc41f755..ec6d5d552 100644 --- a/lib/vagrant/action/vm/nfs.rb +++ b/lib/vagrant/action/vm/nfs.rb @@ -1,7 +1,7 @@ require File.expand_path("../nfs_helpers", __FILE__) module Vagrant - class Action + module Action module VM # Enables NFS based shared folders. `nfsd` must already be installed # on the host machine, and NFS client must already be installed on diff --git a/lib/vagrant/action/vm/nfs_helpers.rb b/lib/vagrant/action/vm/nfs_helpers.rb index d5ed5332a..de4841b20 100644 --- a/lib/vagrant/action/vm/nfs_helpers.rb +++ b/lib/vagrant/action/vm/nfs_helpers.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM module NFSHelpers def clear_nfs_exports(env) diff --git a/lib/vagrant/action/vm/package.rb b/lib/vagrant/action/vm/package.rb index e27b94e56..d392d6514 100644 --- a/lib/vagrant/action/vm/package.rb +++ b/lib/vagrant/action/vm/package.rb @@ -1,7 +1,7 @@ require 'vagrant/action/general/package' module Vagrant - class Action + module Action module VM # A subclass of {General::Package} which simply makes sure that # the package directory is set to the directory which the VM diff --git a/lib/vagrant/action/vm/package_vagrantfile.rb b/lib/vagrant/action/vm/package_vagrantfile.rb index 04b4489ed..7796f500a 100644 --- a/lib/vagrant/action/vm/package_vagrantfile.rb +++ b/lib/vagrant/action/vm/package_vagrantfile.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM # Puts a generated Vagrantfile into the package directory so that # it can be included in the package. diff --git a/lib/vagrant/action/vm/provision.rb b/lib/vagrant/action/vm/provision.rb index 09b10f269..4b14a6fc1 100644 --- a/lib/vagrant/action/vm/provision.rb +++ b/lib/vagrant/action/vm/provision.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Provision def initialize(app, env) diff --git a/lib/vagrant/action/vm/provisioner_cleanup.rb b/lib/vagrant/action/vm/provisioner_cleanup.rb index 2dfb2a8be..33f355be6 100644 --- a/lib/vagrant/action/vm/provisioner_cleanup.rb +++ b/lib/vagrant/action/vm/provisioner_cleanup.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class ProvisionerCleanup def initialize(app, env) diff --git a/lib/vagrant/action/vm/resume.rb b/lib/vagrant/action/vm/resume.rb index b3d2b265a..d30099a63 100644 --- a/lib/vagrant/action/vm/resume.rb +++ b/lib/vagrant/action/vm/resume.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Resume def initialize(app, env) diff --git a/lib/vagrant/action/vm/share_folders.rb b/lib/vagrant/action/vm/share_folders.rb index 04ec62120..6106d1e5d 100644 --- a/lib/vagrant/action/vm/share_folders.rb +++ b/lib/vagrant/action/vm/share_folders.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class ShareFolders def initialize(app, env) diff --git a/lib/vagrant/action/vm/suspend.rb b/lib/vagrant/action/vm/suspend.rb index 309a8e737..8e76b278c 100644 --- a/lib/vagrant/action/vm/suspend.rb +++ b/lib/vagrant/action/vm/suspend.rb @@ -1,5 +1,5 @@ module Vagrant - class Action + module Action module VM class Suspend def initialize(app, env) diff --git a/lib/vagrant/action/warden.rb b/lib/vagrant/action/warden.rb index 9ee779177..42c50e49a 100644 --- a/lib/vagrant/action/warden.rb +++ b/lib/vagrant/action/warden.rb @@ -1,7 +1,7 @@ require "log4r" module Vagrant - class Action + module Action # The action warden is a middleware which injects itself between # every other middleware, watching for exceptions which are raised # and performing proper cleanup on every action by calling the `recover`