Got rid of parent modules for stringhelper/outputhelper. Removed error/wrap_output from util.rb
This commit is contained in:
parent
398e254c39
commit
75b1df2f2f
|
@ -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
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
module Vagrant
|
||||
module Util
|
||||
module ErrorHelper
|
||||
def error_and_exit(key, data = {})
|
||||
abort <<-error
|
||||
def error_and_exit(key, data = {})
|
||||
abort <<-error
|
||||
=====================================================================
|
||||
Vagrant experienced an error!
|
||||
|
||||
#{Translator.t(key, data).chomp}
|
||||
=====================================================================
|
||||
error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
module Vagrant
|
||||
module Util
|
||||
module OutputHelper
|
||||
def wrap_output
|
||||
puts "====================================================================="
|
||||
yield
|
||||
puts "====================================================================="
|
||||
end
|
||||
def wrap_output
|
||||
puts "====================================================================="
|
||||
yield
|
||||
puts "====================================================================="
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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.
|
||||
|
@ -80,4 +80,4 @@ module Vagrant
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue