Rename push environment to env

This commit is contained in:
Seth Vargo 2014-11-11 18:58:02 -05:00
parent 8aaf5dc578
commit c8bdf53c7e
2 changed files with 10 additions and 10 deletions

View File

@ -2,16 +2,16 @@ module Vagrant
module Plugin module Plugin
module V2 module V2
class Push class Push
attr_reader :environment attr_reader :env
attr_reader :config attr_reader :config
# Initializes the pusher with the given environment the push # Initializes the pusher with the given environment the push
# configuration. # configuration.
# #
# @param [environment] environment # @param [Environment] env
# @param [Object] config Push configuration # @param [Object] config Push configuration
def initialize(environment, config) def initialize(env, config)
@environment = environment @env = env
@config = config @config = config
end end

View File

@ -23,11 +23,11 @@ module VagrantPlugins
# if we're on a system that doesn't support exec, so handle that properly. # if we're on a system that doesn't support exec, so handle that properly.
def execute(uploader) def execute(uploader)
cmd = [] cmd = []
cmd << "-vcs" if @config.vcs cmd << "-vcs" if config.vcs
cmd += @config.include.map { |v| ["-include", v] } cmd += config.include.map { |v| ["-include", v] }
cmd += @config.exclude.map { |v| ["-exclude", v] } cmd += config.exclude.map { |v| ["-exclude", v] }
cmd << @config.app cmd << config.app
cmd << File.expand_path(@config.dir, @environment.root_path) cmd << File.expand_path(config.dir, env.root_path)
Vagrant::Util::SafeExec.exec(uploader, *cmd.flatten) Vagrant::Util::SafeExec.exec(uploader, *cmd.flatten)
end end
@ -37,7 +37,7 @@ module VagrantPlugins
# @return [String] # @return [String]
def uploader_path def uploader_path
# Determine the uploader path # Determine the uploader path
uploader = @config.uploader_path uploader = config.uploader_path
if uploader if uploader
return uploader return uploader
end end