Trigger plugin cleanup
This commit is contained in:
parent
c832168846
commit
ca672eb8e6
|
@ -49,9 +49,6 @@ module VagrantPlugins
|
||||||
# so the last element should be the "config block"
|
# so the last element should be the "config block"
|
||||||
# and the rest are commands for the trigger
|
# and the rest are commands for the trigger
|
||||||
blk = command.pop
|
blk = command.pop
|
||||||
else
|
|
||||||
# TODO:
|
|
||||||
# No config block given at all, validation step should throw error?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
command.each do |cmd|
|
command.each do |cmd|
|
||||||
|
@ -68,14 +65,12 @@ module VagrantPlugins
|
||||||
def after(*command, &block)
|
def after(*command, &block)
|
||||||
command.flatten!
|
command.flatten!
|
||||||
blk = block
|
blk = block
|
||||||
|
|
||||||
if !block_given? && command.last.is_a?(Hash)
|
if !block_given? && command.last.is_a?(Hash)
|
||||||
# We were given a hash rather than a block,
|
# We were given a hash rather than a block,
|
||||||
# so the last element should be the "config block"
|
# so the last element should be the "config block"
|
||||||
# and the rest are commands for the trigger
|
# and the rest are commands for the trigger
|
||||||
blk = command.pop
|
blk = command.pop
|
||||||
else
|
|
||||||
# TODO:
|
|
||||||
# No config block given at all, validation step should throw error?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
command.each do |cmd|
|
command.each do |cmd|
|
||||||
|
|
|
@ -17,7 +17,7 @@ module VagrantPlugins
|
||||||
# Note: This is for internal use only.
|
# Note: This is for internal use only.
|
||||||
#
|
#
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :id
|
attr_reader :id
|
||||||
|
|
||||||
# Name for the given Trigger. Defaults to nil.
|
# Name for the given Trigger. Defaults to nil.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue