Move output helpers into the actual util class, gets rid of method missing on environment

This commit is contained in:
Mitchell Hashimoto 2010-07-13 21:35:47 -07:00
parent 3d13a071c6
commit 549fad0b91
6 changed files with 22 additions and 35 deletions

View File

@ -3,5 +3,21 @@ module Vagrant
def self.included(base)
base.extend(self)
end
def error_and_exit(key, data = {})
abort <<-error
=====================================================================
Vagrant experienced an error!
#{Translator.t(key, data).chomp}
=====================================================================
error
end
def wrap_output
puts "====================================================================="
yield
puts "====================================================================="
end
end
end

View File

@ -1,13 +0,0 @@
module Vagrant
module Util
def error_and_exit(key, data = {})
abort <<-error
=====================================================================
Vagrant experienced an error!
#{Translator.t(key, data).chomp}
=====================================================================
error
end
end
end

View File

@ -1,9 +0,0 @@
module Vagrant
module Util
def wrap_output
puts "====================================================================="
yield
puts "====================================================================="
end
end
end

View File

@ -1,5 +0,0 @@
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')
class ErrorHelperUtilTest < Test::Unit::TestCase
# TODO
end

View File

@ -1,5 +0,0 @@
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')
class OutputHelperUtilTest < Test::Unit::TestCase
# TODO
end

View File

@ -41,8 +41,9 @@ Gem::Specification.new do |s|
"lib/vagrant/action/box/verify.rb",
"lib/vagrant/action/builder.rb",
"lib/vagrant/action/builtin.rb",
"lib/vagrant/action/env/error_halt.rb",
"lib/vagrant/action/env/set.rb",
"lib/vagrant/action/environment.rb",
"lib/vagrant/action/error_halt.rb",
"lib/vagrant/action/exception_catcher.rb",
"lib/vagrant/action/vm/boot.rb",
"lib/vagrant/action/vm/check_guest_additions.rb",
@ -127,8 +128,9 @@ Gem::Specification.new do |s|
"test/vagrant/action/box/unpackage_test.rb",
"test/vagrant/action/box/verify_test.rb",
"test/vagrant/action/builder_test.rb",
"test/vagrant/action/env/error_halt_test.rb",
"test/vagrant/action/env/set_test.rb",
"test/vagrant/action/environment_test.rb",
"test/vagrant/action/error_halt_test.rb",
"test/vagrant/action/exception_catcher_test.rb",
"test/vagrant/action/vm/boot_test.rb",
"test/vagrant/action/vm/check_guest_additions_test.rb",
@ -210,8 +212,9 @@ Gem::Specification.new do |s|
"test/vagrant/action/box/unpackage_test.rb",
"test/vagrant/action/box/verify_test.rb",
"test/vagrant/action/builder_test.rb",
"test/vagrant/action/env/error_halt_test.rb",
"test/vagrant/action/env/set_test.rb",
"test/vagrant/action/environment_test.rb",
"test/vagrant/action/error_halt_test.rb",
"test/vagrant/action/exception_catcher_test.rb",
"test/vagrant/action/vm/boot_test.rb",
"test/vagrant/action/vm/check_guest_additions_test.rb",