diff --git a/lib/vagrant/util/error_helper.rb b/lib/vagrant/util/error_helper.rb new file mode 100644 index 000000000..235217611 --- /dev/null +++ b/lib/vagrant/util/error_helper.rb @@ -0,0 +1,15 @@ +module Vagrant + module Util + module ErrorHelper + def error_and_exit(key, data = {}) + abort <<-error +===================================================================== +Vagrant experienced an error! + +#{Translator.t(key, data).chomp} +===================================================================== +error + end + end + end +end diff --git a/lib/vagrant/util/output_helper.rb b/lib/vagrant/util/output_helper.rb new file mode 100644 index 000000000..ffdca3678 --- /dev/null +++ b/lib/vagrant/util/output_helper.rb @@ -0,0 +1,11 @@ +module Vagrant + module Util + module OutputHelper + def wrap_output + puts "=====================================================================" + yield + puts "=====================================================================" + end + end + end +end diff --git a/test/vagrant/util/error_helper_test.rb b/test/vagrant/util/error_helper_test.rb new file mode 100644 index 000000000..7b8fc525a --- /dev/null +++ b/test/vagrant/util/error_helper_test.rb @@ -0,0 +1,5 @@ +require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') + +class ErrorHelperUtilTest < Test::Unit::TestCase + # TODO +end diff --git a/test/vagrant/util/output_helper_test.rb b/test/vagrant/util/output_helper_test.rb new file mode 100644 index 000000000..06f6ee9dc --- /dev/null +++ b/test/vagrant/util/output_helper_test.rb @@ -0,0 +1,5 @@ +require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') + +class OutputHelperUtilTest < Test::Unit::TestCase + # TODO +end