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 V2
class Push
attr_reader :environment
attr_reader :env
attr_reader :config
# Initializes the pusher with the given environment the push
# configuration.
#
# @param [environment] environment
# @param [Environment] env
# @param [Object] config Push configuration
def initialize(environment, config)
@environment = environment
def initialize(env, config)
@env = env
@config = config
end

View File

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