Got rid of parent modules for stringhelper/outputhelper. Removed error/wrap_output from util.rb

This commit is contained in:
Mitchell Hashimoto 2010-05-20 16:15:43 -07:00
parent 398e254c39
commit 75b1df2f2f
5 changed files with 20 additions and 32 deletions

View File

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

View File

@ -1,6 +1,5 @@
module Vagrant
module Util
module ErrorHelper
def error_and_exit(key, data = {})
abort <<-error
=====================================================================
@ -11,5 +10,4 @@ Vagrant experienced an error!
error
end
end
end
end

View File

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

View File

@ -6,7 +6,7 @@ module Vagrant
# This class is used to render the ERB templates in the
# `GEM_ROOT/templates` directory.
class TemplateRenderer < OpenStruct
class <<self
class << self
# Render a given template and return the result. This method optionally
# takes a block which will be passed the renderer prior to rendering, which
# allows the caller to set any view variables within the renderer itself.

View File

@ -87,11 +87,15 @@ Gem::Specification.new do |s|
"lib/vagrant/provisioners/chef.rb",
"lib/vagrant/provisioners/chef_server.rb",
"lib/vagrant/provisioners/chef_solo.rb",
"lib/vagrant/resource_logger.rb",
"lib/vagrant/ssh.rb",
"lib/vagrant/systems/base.rb",
"lib/vagrant/systems/linux.rb",
"lib/vagrant/util.rb",
"lib/vagrant/util/error_helper.rb",
"lib/vagrant/util/glob_loader.rb",
"lib/vagrant/util/output_helper.rb",
"lib/vagrant/util/plain_logger.rb",
"lib/vagrant/util/platform.rb",
"lib/vagrant/util/progress_meter.rb",
"lib/vagrant/util/stacked_proc_runner.rb",
@ -160,8 +164,12 @@ Gem::Specification.new do |s|
"test/vagrant/provisioners/chef_server_test.rb",
"test/vagrant/provisioners/chef_solo_test.rb",
"test/vagrant/provisioners/chef_test.rb",
"test/vagrant/resource_logger_test.rb",
"test/vagrant/ssh_test.rb",
"test/vagrant/systems/linux_test.rb",
"test/vagrant/util/error_helper_test.rb",
"test/vagrant/util/output_helper_test.rb",
"test/vagrant/util/plain_logger_test.rb",
"test/vagrant/util/progress_meter_test.rb",
"test/vagrant/util/stacked_proc_runner_test.rb",
"test/vagrant/util/template_renderer_test.rb",
@ -230,13 +238,17 @@ Gem::Specification.new do |s|
"test/vagrant/commands/up_test.rb",
"test/vagrant/commands/resume_test.rb",
"test/vagrant/commands/ssh_test.rb",
"test/vagrant/resource_logger_test.rb",
"test/vagrant/downloaders/base_test.rb",
"test/vagrant/downloaders/file_test.rb",
"test/vagrant/downloaders/http_test.rb",
"test/vagrant/util/stacked_proc_runner_test.rb",
"test/vagrant/util/progress_meter_test.rb",
"test/vagrant/util/output_helper_test.rb",
"test/vagrant/util/template_renderer_test.rb",
"test/vagrant/util/translator_test.rb",
"test/vagrant/util/error_helper_test.rb",
"test/vagrant/util/plain_logger_test.rb",
"test/vagrant/ssh_test.rb"
]