Ruby framework for keeping all types of notifications (mailers, push notifications, whatever) in one place
MIT License
Bot releases are hidden (Show)
require "active_delivery/testing/minitest"
class MyDeliveryServiceTest < Minitest::Test
include ActiveDelivery::TestHelper
def test_delivers_notification
assert_delivery_enqueued(Community::EventsDelivery, :modified, with: [event]) do
some_action
end
end
def test_no_notification_is_delivered
assert_no_deliveries do
some_action
end
# Alternatively, you can use the positive assertion
assert_deliveries(0) do
some_action
end
end
end
Published by palkan 11 months ago
Add delayed delivery options support to #deliver_later
.
Now you can specify when to perform the delivery (similar to Action Mailer):
PostDelivery.with(user:, post:).new_comment(comment).deliver_later(wait_until: 1.hour.from_now)
Published by palkan about 1 year ago
These gems are used together in ~100% cases, so maintaining them independently doesn't bring any value. Less gems to add to your Gemfile!
Notifiers now quack more like mailers from Action Mailer: we added callbacks support, refactored async delivery implementation to build notifications only before the delivery (i.e., in the background job, not at the enqueuing time).
More ways to organize files and define delivery to notifier name mappings. See docs.
Delivery classes now can explicitly specify which delivery actions are supported (the .delivers
API).
See Changelog for the list of all changes.