You can no longer set env vars on Builders via `use`

This commit is contained in:
Mitchell Hashimoto 2012-07-27 19:05:35 -07:00
parent 90517a0f9b
commit 556a53d48d
2 changed files with 0 additions and 17 deletions

View File

@ -32,11 +32,6 @@ module Vagrant
# #
# @param [Class] middleware The middleware class # @param [Class] middleware The middleware class
def use(middleware, *args, &block) def use(middleware, *args, &block)
# Prepend with a environment setter if args are given
if !args.empty? && args.first.is_a?(Hash) && middleware != Env::Set
self.use(Env::Set, args.shift, &block)
end
if middleware.kind_of?(Builder) if middleware.kind_of?(Builder)
# Merge in the other builder's stack into our own # Merge in the other builder's stack into our own
self.stack.concat(middleware.stack) self.stack.concat(middleware.stack)

View File

@ -50,18 +50,6 @@ describe Vagrant::Action::Builder do
two.call(data) two.call(data)
data[:one].should == true data[:one].should == true
end end
it "should be able to set additional variables when using" do
data = { }
proc1 = Proc.new { |env| env[:data] += 1 }
# Build the first builder
one = described_class.new
one.use proc1, :data => 5
one.call(data)
data[:data].should == 6
end
end end
context "inserting" do context "inserting" do