lib/mailkick.rb in mailkick-1.1.0 vs lib/mailkick.rb in mailkick-1.1.1
- old
+ new
@@ -1,14 +1,16 @@
# dependencies
require "active_support"
# stdlib
+require "json"
require "set"
# modules
require "mailkick/legacy"
require "mailkick/model"
+require "mailkick/serializer"
require "mailkick/service"
require "mailkick/service/aws_ses"
require "mailkick/service/mailchimp"
require "mailkick/service/mailgun"
require "mailkick/service/mandrill"
@@ -42,13 +44,11 @@
def self.secret_token=(token)
@@secret_token = token
@@message_verifier = nil
end
- # TODO use JSON serializer
- # can't currently rotate serializer without rotating token or digest
def self.message_verifier
- @@message_verifier ||= ActiveSupport::MessageVerifier.new(Mailkick.secret_token)
+ @@message_verifier ||= ActiveSupport::MessageVerifier.new(Mailkick.secret_token, serializer: Serializer)
end
def self.generate_token(subscriber, list)
raise ArgumentError, "Missing subscriber" unless subscriber
raise ArgumentError, "Missing list" unless list.present?