diff --git a/README.rdoc b/README.rdoc index 11eec6b..554a7d3 100644 --- a/README.rdoc +++ b/README.rdoc @@ -25,7 +25,7 @@ JRuby (1.5.2) Add the following gem dependency to your Rails project's Gemfile: - gem 'the-maestro', '0.4.1', :require => 'maestro' + gem 'the-maestro', '0.4.2', :require => 'maestro' Then run the following to install the Maestro gem: @@ -44,7 +44,7 @@ Add the following gem dependency to your Rails project's config/environmen Rails::Initializer.run do |config| - config.gem "the-maestro", :lib => "maestro", :version => "0.4.1", :source => "http://gemcutter.org" + config.gem "the-maestro", :lib => "maestro", :version => "0.4.2", :source => "http://gemcutter.org" end diff --git a/lib/maestro/cloud.rb b/lib/maestro/cloud.rb index 578c4d1..12c94c1 100644 --- a/lib/maestro/cloud.rb +++ b/lib/maestro/cloud.rb @@ -200,8 +200,20 @@ def install_chef_solo(session=nil) channel.request_pty {|ch, success| abort "could not obtain pty" if !success} channel.exec(cmd) do |ch, success| @logger.progress "." - ch.on_data {|ch, data| the_node.logger.info data} - ch.on_extended_data {|ch, data| the_node.logger.error } + ch.on_data do |ch2, data2| + begin + the_node.logger.info data2 + rescue StandardError => err + the_node.logger.error "Unexpected error logging: #{err.to_s}" + end + end + ch.on_extended_data do |ch2, data2| + begin + the_node.logger.error data2 + rescue StandardError => err + the_node.logger.error "Unexpected error logging: #{err.to_s}" + end + end end end end @@ -274,8 +286,20 @@ def run_chef_solo(session=nil) else node_cmd = cmd + " -j '#{node_json_url(the_node)}'" channel.exec(node_cmd) do |ch, success| - ch.on_data {|ch2, data2| the_node.logger.info data2} - ch.on_extended_data {|ch2, data2| the_node.logger.error data2} + ch.on_data do |ch2, data2| + begin + the_node.logger.info data2 + rescue StandardError => err + the_node.logger.error "Unexpected error logging: #{err.to_s}" + end + end + ch.on_extended_data do |ch2, data2| + begin + the_node.logger.error data2 + rescue StandardError => err + the_node.logger.error "Unexpected error logging: #{err.to_s}" + end + end end end end diff --git a/the-maestro.gemspec b/the-maestro.gemspec index a241ec6..83aa77f 100644 --- a/the-maestro.gemspec +++ b/the-maestro.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{the-maestro} - s.version = "0.4.1" + s.version = "0.4.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Brian Ploetz"] - s.date = %q{2010-10-10} + s.date = %q{2010-10-17} s.description = %q{Maestro is a cloud provisioning, configuration, and management utility for your Ruby and Ruby On Rails applications.} s.extra_rdoc_files = [ "LICENSE", @@ -81,7 +81,7 @@ Gem::Specification.new do |s| s.homepage = %q{http://github.com/bploetz/maestro} s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] - s.rubygems_version = %q{1.3.5} + s.rubygems_version = %q{1.3.7} s.summary = %q{Maestro: Conduct your clouds.} s.test_files = [ "test/integration/base_aws.rb", @@ -117,7 +117,7 @@ Gem::Specification.new do |s| current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 3 - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q, ["= 2.10.2"]) s.add_runtime_dependency(%q, ["= 2.0.15"]) s.add_runtime_dependency(%q, ["= 1.0.2"])