lib/antismoker/deployment.rb in antismoker-0.0.1 vs lib/antismoker/deployment.rb in antismoker-0.0.2
- old
+ new
@@ -11,11 +11,11 @@
context_name = "vlad"
role_default = "[:app]"
error_type = ::Rake::CommandFailedError
end
- roles = context.fetch(:antismoker_roles, false)
+ roles = context.fetch(:antismoker_roles, [:app])
opts[:roles] = roles if roles
context.send :namespace, :antismoker do
send :desc, "Run smoke test."
send task_method, :invoke, opts do
@@ -28,15 +28,16 @@
end
args = []
args += context.fetch(:antismoker_flags, [])
args << "RAILS_ENV=#{rails_env}"
+ run_opts = context.fetch(:antismoker_run_options, {})
begin
- run "cd #{app_path} && #{rake_cmd} #{args.join(' ')} #{antismoker_task}"
+ run "cd #{app_path} && #{rake_cmd} #{args.join(' ')} #{antismoker_task}", run_opts
antismoker_success
- rescue => error
- logger.info("[ERROR] #{error}")
+ rescue
antismoker_failure
+ abort
ensure
finalize_antismoker
end
end