Rename push environment to env
This commit is contained in:
parent
8aaf5dc578
commit
c8bdf53c7e
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue