From 72affa0a10ba65edc27a4c48212a1183fd3ce7db Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Wed, 22 Oct 2014 22:03:11 -0400 Subject: [PATCH] Accept a list of options in #push signature --- lib/vagrant/plugin/v2/plugin.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/plugin/v2/plugin.rb b/lib/vagrant/plugin/v2/plugin.rb index e6020f6c5..9b09d94b0 100644 --- a/lib/vagrant/plugin/v2/plugin.rb +++ b/lib/vagrant/plugin/v2/plugin.rb @@ -224,11 +224,13 @@ module Vagrant # Registers additional pushes to be available. # # @param [String] name Name of the push. - def self.push(name=UNSET_VALUE, &block) + def self.push(name=UNSET_VALUE, options=nil, &block) data[:pushes] ||= Registry.new # Register a new pusher class only if a name was given - data[:pushes].register(name.to_sym, &block) if name != UNSET_VALUE + if name != UNSET_VALUE + data[:pushes].register(name.to_sym) { [block.call, options] } + end # Return the registry data[:pushes]