diff --git a/lib/vagrant.rb b/lib/vagrant.rb index 265ca8922..1783dc27f 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -66,7 +66,7 @@ module Vagrant autoload :DataStore, 'vagrant/data_store' autoload :Downloaders, 'vagrant/downloaders' autoload :Driver, 'vagrant/driver' - autoload :EasyCommand, 'vagrant/easy_command' + autoload :Easy, 'vagrant/easy' autoload :Environment, 'vagrant/environment' autoload :Errors, 'vagrant/errors' autoload :Guest, 'vagrant/guest' diff --git a/lib/vagrant/easy_command.rb b/lib/vagrant/easy.rb similarity index 61% rename from lib/vagrant/easy_command.rb rename to lib/vagrant/easy.rb index 17f264f51..55a861bcb 100644 --- a/lib/vagrant/easy_command.rb +++ b/lib/vagrant/easy.rb @@ -1,14 +1,14 @@ module Vagrant - module EasyCommand - autoload :Base, "vagrant/easy_command/base" - autoload :Operations, "vagrant/easy_command/operations" + module Easy + autoload :CommandBase, "vagrant/easy/command_base" + autoload :Operations, "vagrant/easy/operations" # This creates a new easy command. This typically is not called # directly. Instead, the plugin interface's `easy_command` is # used to create one of these. - def self.create(name, &block) + def self.create_command(name, &block) # Create a new command class for this command, and return it - command = Class.new(Base) + command = Class.new(CommandBase) command.configure(name, &block) command end diff --git a/lib/vagrant/easy_command/base.rb b/lib/vagrant/easy/command_base.rb similarity index 95% rename from lib/vagrant/easy_command/base.rb rename to lib/vagrant/easy/command_base.rb index 61ce29aa6..26d064aeb 100644 --- a/lib/vagrant/easy_command/base.rb +++ b/lib/vagrant/easy/command_base.rb @@ -1,10 +1,10 @@ require "log4r" module Vagrant - module EasyCommand + module Easy # Base class for all easy commands. This contains the basic code # that knows how to run the easy commands. - class Base < Vagrant::Command::Base + class CommandBase < Vagrant::Command::Base @@command = nil @@runner = nil diff --git a/lib/vagrant/easy_command/operations.rb b/lib/vagrant/easy/operations.rb similarity index 97% rename from lib/vagrant/easy_command/operations.rb rename to lib/vagrant/easy/operations.rb index b03e8c733..584ec2588 100644 --- a/lib/vagrant/easy_command/operations.rb +++ b/lib/vagrant/easy/operations.rb @@ -6,13 +6,13 @@ require "log4r" require "vagrant/util/subprocess" module Vagrant - module EasyCommand + module Easy # This class contains all the "operations" that easy commands are able # to run. An instance of this is class is what is sent into the callback # for all easy commands. class Operations def initialize(vm) - @logger = Log4r::Logger.new("vagrant::easy_command::operations") + @logger = Log4r::Logger.new("vagrant::easy::operations") @vm = vm end diff --git a/lib/vagrant/plugin/v1.rb b/lib/vagrant/plugin/v1.rb index 3c81174e4..ea78aa297 100644 --- a/lib/vagrant/plugin/v1.rb +++ b/lib/vagrant/plugin/v1.rb @@ -113,7 +113,7 @@ module Vagrant # @param [String] name Name of the command, how it will be invoked # on the command line. def self.easy_command(name, &block) - command(name) { EasyCommand.create(name, &block) } + command(name) { Easy.create_command(name, &block) } end # Defines an additionally available guest implementation with