From d33c529c7fb6c20b5709ef37c1f2019f60eb87f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 12 Oct 2021 21:15:09 +0000 Subject: [PATCH] Remove deprecated MAILGUN_INGRESS_API_KEY and mailgun_api_key configurations --- actionmailbox/CHANGELOG.md | 9 +++++++++ .../mailgun/inbound_emails_controller.rb | 16 +--------------- guides/source/7_0_release_notes.md | 4 ++++ 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/actionmailbox/CHANGELOG.md b/actionmailbox/CHANGELOG.md index 7e52fad0db..610fb7a467 100644 --- a/actionmailbox/CHANGELOG.md +++ b/actionmailbox/CHANGELOG.md @@ -1,3 +1,12 @@ +* Removed deprecated environment variable `MAILGUN_INGRESS_API_KEY`. + + *Rafael Mendonça França* + +* Removed deprecated `Rails.application.credentials.action_mailbox.mailgun_api_key`. + + *Rafael Mendonça França* + + ## Rails 7.0.0.alpha2 (September 15, 2021) ## * No changes. diff --git a/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb b/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb index cd934a0dc7..3d39c9a837 100644 --- a/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb +++ b/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb @@ -77,21 +77,7 @@ module ActionMailbox end def key - if Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key) - ActiveSupport::Deprecation.warn(<<-MSG.squish) - Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails 7.0. - Use Rails.application.credentials.action_mailbox.signing_key instead. - MSG - Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key) - elsif ENV["MAILGUN_INGRESS_API_KEY"] - ActiveSupport::Deprecation.warn(<<-MSG.squish) - The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails 7.0. - Use MAILGUN_INGRESS_SIGNING_KEY instead. - MSG - ENV["MAILGUN_INGRESS_API_KEY"] - else - Rails.application.credentials.dig(:action_mailbox, :mailgun_signing_key) || ENV["MAILGUN_INGRESS_SIGNING_KEY"] - end + Rails.application.credentials.dig(:action_mailbox, :mailgun_signing_key) || ENV["MAILGUN_INGRESS_SIGNING_KEY"] end class Authenticator diff --git a/guides/source/7_0_release_notes.md b/guides/source/7_0_release_notes.md index 32b5d4fb6f..a62694a458 100644 --- a/guides/source/7_0_release_notes.md +++ b/guides/source/7_0_release_notes.md @@ -153,6 +153,10 @@ Please refer to the [Changelog][action-mailbox] for detailed changes. ### Removals +* Removed deprecated `Rails.application.credentials.action_mailbox.mailgun_api_key`. + +* Removed deprecated environment variable `MAILGUN_INGRESS_API_KEY`. + ### Deprecations ### Notable changes