Skip to content

Releases: palkan/active_delivery

1.2.0

05 Feb 19:53
Compare
Choose a tag to compare

Features

  • Added Minitest assertions for deliveries:
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

1.1.0

01 Dec 16:55
Compare
Choose a tag to compare

Features

  • 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)

1.0.0

29 Aug 20:54
Compare
Choose a tag to compare

Highlights

  • Abstract Notifier is now a part of Active Delivery.

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.