diff options
author | George Claghorn <george@basecamp.com> | 2018-11-14 20:47:40 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-11-15 13:15:47 -0500 |
commit | 7aef5695b8d225a89f41320869b5065fa8f1b158 (patch) | |
tree | bd2c42431ac40d290c80bf2a6d30b72ec8872dee /lib/tasks/ingress.rake | |
parent | e96dbf984d7574c07232a480d61832c216eca348 (diff) | |
download | rails-7aef5695b8d225a89f41320869b5065fa8f1b158.tar.gz rails-7aef5695b8d225a89f41320869b5065fa8f1b158.tar.bz2 rails-7aef5695b8d225a89f41320869b5065fa8f1b158.zip |
Permit redirecting stderr to /dev/null to shush deprecation warnings
Diffstat (limited to 'lib/tasks/ingress.rake')
-rw-r--r-- | lib/tasks/ingress.rake | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/tasks/ingress.rake b/lib/tasks/ingress.rake index 96bd9b184a..6620e1fe43 100644 --- a/lib/tasks/ingress.rake +++ b/lib/tasks/ingress.rake @@ -11,7 +11,8 @@ namespace :action_mailbox do url, password = ENV.values_at("URL", "INGRESS_PASSWORD") if url.blank? || password.blank? - abort "4.3.5 URL and INGRESS_PASSWORD are required" + puts "4.3.5 URL and INGRESS_PASSWORD are required" + exit 1 end begin @@ -24,16 +25,21 @@ namespace :action_mailbox do when response.status.success? puts "2.0.0 HTTP #{response.status}" when response.status.unauthorized? - abort "4.7.0 HTTP #{response.status}" + puts "4.7.0 HTTP #{response.status}" + exit 1 when response.status.unsupported_media_type? - abort "5.6.1 HTTP #{response.status}" + puts "5.6.1 HTTP #{response.status}" + exit 1 else - abort "4.0.0 HTTP #{response.status}" + puts "4.0.0 HTTP #{response.status}" + exit 1 end rescue HTTP::ConnectionError => error - abort "4.4.2 Error connecting to the Postfix ingress: #{error.message}" + puts "4.4.2 Error connecting to the Postfix ingress: #{error.message}" + exit 1 rescue HTTP::TimeoutError - abort "4.4.7 Timed out piping to the Postfix ingress" + puts "4.4.7 Timed out piping to the Postfix ingress" + exit 1 end end end |