diff --git a/README.md b/README.md index b91523c..694aa3b 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ shared: # Token auth params # See https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns key_id: <%= Rails.application.credentials.dig(:action_push_native, :apns, :key_id) %> - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :encryption_key)&.dump %> team_id: your_apple_team_id # Your identifier found on https://developer.apple.com/account/resources/identifiers/list @@ -85,7 +85,7 @@ shared: google: # Your Firebase project service account credentials # See https://firebase.google.com/docs/cloud-messaging/auth-server - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :encryption_key)&.dump %> # Firebase project_id project_id: your_project_id @@ -131,7 +131,7 @@ shared: # Token auth params # See https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns key_id: <%= Rails.application.credentials.dig(:action_push_native, :apns, :calendar, :key_id) %> - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :calendar, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :calendar, :encryption_key)&.dump %> # Your identifier found on https://developer.apple.com/account/resources/identifiers/list topic: calendar.bundle.identifier @@ -139,7 +139,7 @@ shared: # Token auth params # See https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns key_id: <%= Rails.application.credentials.dig(:action_push_native, :apns, :email, :key_id) %> - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :email, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :email, :encryption_key)&.dump %> # Your identifier found on https://developer.apple.com/account/resources/identifiers/list topic: email.bundle.identifier @@ -147,7 +147,7 @@ shared: calendar: # Your Firebase project service account credentials # See https://firebase.google.com/docs/cloud-messaging/auth-server - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :calendar, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :calendar, :encryption_key)&.dump %> # Firebase project_id project_id: calendar_project_id @@ -155,7 +155,7 @@ shared: email: # Your Firebase project service account credentials # See https://firebase.google.com/docs/cloud-messaging/auth-server - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :email, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :email, :encryption_key)&.dump %> # Firebase project_id project_id: email_project_id diff --git a/lib/generators/action_push_native/install/templates/config/push.yml.tt b/lib/generators/action_push_native/install/templates/config/push.yml.tt index 6bc9e01..4e5c813 100644 --- a/lib/generators/action_push_native/install/templates/config/push.yml.tt +++ b/lib/generators/action_push_native/install/templates/config/push.yml.tt @@ -4,7 +4,7 @@ shared: # Token auth params # See https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns key_id: <%%= Rails.application.credentials.dig(:action_push_native, :apns, :key_id) %> - encryption_key: <%%= Rails.application.credentials.dig(:action_push_native, :apns, :encryption_key) %> + encryption_key: <%%= Rails.application.credentials.dig(:action_push_native, :apns, :encryption_key)&.dump %> team_id: your_apple_team_id # Your identifier found on https://developer.apple.com/account/resources/identifiers/list @@ -27,7 +27,7 @@ shared: google: # Your Firebase project service account credentials # See https://firebase.google.com/docs/cloud-messaging/auth-server - encryption_key: <%%= Rails.application.credentials.dig(:action_push_native, :fcm, :encryption_key) %> + encryption_key: <%%= Rails.application.credentials.dig(:action_push_native, :fcm, :encryption_key)&.dump %> # Firebase project_id project_id: your_project_id diff --git a/test/dummy/config/push.yml b/test/dummy/config/push.yml index 792fd9b..94f90e8 100644 --- a/test/dummy/config/push.yml +++ b/test/dummy/config/push.yml @@ -4,7 +4,7 @@ shared: # Token auth params # See https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns key_id: <%= Rails.application.credentials.dig(:action_push_native, :apns, :key_id) %> - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :apns, :encryption_key)&.dump %> team_id: your_apple_team_id # Your identifier found on https://developer.apple.com/account/resources/identifiers/list @@ -27,7 +27,7 @@ shared: google: # Your Firebase project service account credentials # See https://firebase.google.com/docs/cloud-messaging/auth-server - encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :encryption_key) %> + encryption_key: <%= Rails.application.credentials.dig(:action_push_native, :fcm, :encryption_key)&.dump %> # Set this to the number of threads used to process notifications (default: 5). # When the pool size is too small a HTTPX::PoolTimeoutError error will be raised.