lib/fulmar/domain/task/configuration.rake in fulmar-1.10.1 vs lib/fulmar/domain/task/configuration.rake in fulmar-2.0.0

- old
+ new

@@ -1,11 +1,11 @@ require 'pp' namespace :test do task :config do require 'fulmar/domain/service/config_test_service' - test_service = Fulmar::Domain::Service::ConfigTestService.new(configuration) + test_service = Fulmar::Domain::Service::ConfigTestService.new(config) results = test_service.run results.each do |report| case report[:severity] when :warning @@ -20,21 +20,23 @@ info "Feelin' fine." if results.empty? end task :hosts do error_count = 0 - configuration.each do |env, target, _data| - configuration.environment = env - configuration.target = target + config.each do |env, target, _data| + config.environment = env + config.target = target - next if configuration[:hostname].blank? + next if config[:hostname].blank? remote_shell.quiet = true remote_shell.strict = false - message = "Cannot open remote shell to host '#{configuration[:hostname]}' (#{env}:#{target})" + info "Testing #{env}:#{target}..." + message = "Cannot open remote shell to host '#{config[:hostname]}' (#{env}:#{target})" + begin - remote_shell.run 'true' || error(message) + remote_shell.run('true') || error(message) rescue error(message) end end info "Feelin' fine." if error_count == 0