diff --git a/lib/vagrant/util.rb b/lib/vagrant/util.rb index 16ee61efd..0c164a6fa 100644 --- a/lib/vagrant/util.rb +++ b/lib/vagrant/util.rb @@ -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 diff --git a/lib/vagrant/util/error_helper.rb b/lib/vagrant/util/error_helper.rb deleted file mode 100644 index 6286f36ef..000000000 --- a/lib/vagrant/util/error_helper.rb +++ /dev/null @@ -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 diff --git a/lib/vagrant/util/output_helper.rb b/lib/vagrant/util/output_helper.rb deleted file mode 100644 index 99257b41a..000000000 --- a/lib/vagrant/util/output_helper.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Vagrant - module Util - def wrap_output - puts "=====================================================================" - yield - puts "=====================================================================" - end - end -end diff --git a/test/vagrant/util/error_helper_test.rb b/test/vagrant/util/error_helper_test.rb deleted file mode 100644 index 7b8fc525a..000000000 --- a/test/vagrant/util/error_helper_test.rb +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 06f6ee9dc..000000000 --- a/test/vagrant/util/output_helper_test.rb +++ /dev/null @@ -1,5 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') - -class OutputHelperUtilTest < Test::Unit::TestCase - # TODO -end diff --git a/vagrant.gemspec b/vagrant.gemspec index 3b87bb549..8e53c6df3 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -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",