Rename EasyCommand namespace to Easy

This commit is contained in:
Mitchell Hashimoto 2012-05-05 22:16:13 -07:00
parent 3d147f1d96
commit 31ac7271aa
5 changed files with 11 additions and 11 deletions

View File

@ -66,7 +66,7 @@ module Vagrant
autoload :DataStore, 'vagrant/data_store' autoload :DataStore, 'vagrant/data_store'
autoload :Downloaders, 'vagrant/downloaders' autoload :Downloaders, 'vagrant/downloaders'
autoload :Driver, 'vagrant/driver' autoload :Driver, 'vagrant/driver'
autoload :EasyCommand, 'vagrant/easy_command' autoload :Easy, 'vagrant/easy'
autoload :Environment, 'vagrant/environment' autoload :Environment, 'vagrant/environment'
autoload :Errors, 'vagrant/errors' autoload :Errors, 'vagrant/errors'
autoload :Guest, 'vagrant/guest' autoload :Guest, 'vagrant/guest'

View File

@ -1,14 +1,14 @@
module Vagrant module Vagrant
module EasyCommand module Easy
autoload :Base, "vagrant/easy_command/base" autoload :CommandBase, "vagrant/easy/command_base"
autoload :Operations, "vagrant/easy_command/operations" autoload :Operations, "vagrant/easy/operations"
# This creates a new easy command. This typically is not called # This creates a new easy command. This typically is not called
# directly. Instead, the plugin interface's `easy_command` is # directly. Instead, the plugin interface's `easy_command` is
# used to create one of these. # 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 # Create a new command class for this command, and return it
command = Class.new(Base) command = Class.new(CommandBase)
command.configure(name, &block) command.configure(name, &block)
command command
end end

View File

@ -1,10 +1,10 @@
require "log4r" require "log4r"
module Vagrant module Vagrant
module EasyCommand module Easy
# Base class for all easy commands. This contains the basic code # Base class for all easy commands. This contains the basic code
# that knows how to run the easy commands. # that knows how to run the easy commands.
class Base < Vagrant::Command::Base class CommandBase < Vagrant::Command::Base
@@command = nil @@command = nil
@@runner = nil @@runner = nil

View File

@ -6,13 +6,13 @@ require "log4r"
require "vagrant/util/subprocess" require "vagrant/util/subprocess"
module Vagrant module Vagrant
module EasyCommand module Easy
# This class contains all the "operations" that easy commands are able # 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 # to run. An instance of this is class is what is sent into the callback
# for all easy commands. # for all easy commands.
class Operations class Operations
def initialize(vm) def initialize(vm)
@logger = Log4r::Logger.new("vagrant::easy_command::operations") @logger = Log4r::Logger.new("vagrant::easy::operations")
@vm = vm @vm = vm
end end

View File

@ -113,7 +113,7 @@ module Vagrant
# @param [String] name Name of the command, how it will be invoked # @param [String] name Name of the command, how it will be invoked
# on the command line. # on the command line.
def self.easy_command(name, &block) def self.easy_command(name, &block)
command(name) { EasyCommand.create(name, &block) } command(name) { Easy.create_command(name, &block) }
end end
# Defines an additionally available guest implementation with # Defines an additionally available guest implementation with