diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd3d06..1bd9b73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Add `Mel::Job::Template#run` abstract method +### Changed +- Rename `Mel::Carbon::DeliverLaterStrategy` to `DeliverLater` + ## [0.20.0] - 2024-04-16 ### Changed diff --git a/README.md b/README.md index 3681b9b..ebb7ef5 100644 --- a/README.md +++ b/README.md @@ -809,7 +809,7 @@ If it is a negative integer `-N` (other than `-1`), the number of due tasks pul BaseEmail.configure do |settings| # ... - settings.deliver_later_strategy = Mel::Carbon::DeliverLaterStrategy.new + settings.deliver_later_strategy = Mel::Carbon::DeliverLater.new # ... end ``` diff --git a/spec/carbon/deliver_later_strategy_spec.cr b/spec/carbon/deliver_later_spec.cr similarity index 82% rename from spec/carbon/deliver_later_strategy_spec.cr rename to spec/carbon/deliver_later_spec.cr index c5e6896..d2f3af0 100644 --- a/spec/carbon/deliver_later_strategy_spec.cr +++ b/spec/carbon/deliver_later_spec.cr @@ -1,6 +1,6 @@ require "../spec_helper" -describe Mel::Carbon::DeliverLaterStrategy do +describe Mel::Carbon::DeliverLater do it "sends email" do email = WelcomeEmail.new("Mary", "mary@domain.tld") diff --git a/spec/support/config/email.cr b/spec/support/config/email.cr index 12bf0da..b704093 100644 --- a/spec/support/config/email.cr +++ b/spec/support/config/email.cr @@ -1,4 +1,4 @@ BaseEmail.configure do |settings| settings.adapter = Carbon::DevAdapter.new - settings.deliver_later_strategy = Mel::Carbon::DeliverLaterStrategy.new + settings.deliver_later_strategy = Mel::Carbon::DeliverLater.new end diff --git a/src/carbon/deliver_later_strategy.cr b/src/carbon/deliver_later.cr similarity index 86% rename from src/carbon/deliver_later_strategy.cr rename to src/carbon/deliver_later.cr index c104e52..50aca36 100644 --- a/src/carbon/deliver_later_strategy.cr +++ b/src/carbon/deliver_later.cr @@ -1,4 +1,4 @@ -class Mel::Carbon::DeliverLaterStrategy < Carbon::DeliverLaterStrategy +class Mel::Carbon::DeliverLater < Carbon::DeliverLaterStrategy def run(email, &block) {% begin %} case email