mailkick 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/mailkick/serializer.rb +15 -0
- data/lib/mailkick/version.rb +1 -1
- data/lib/mailkick.rb +3 -3
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d27cea2a7290b64e0b7d59322124923e5c84069040d43df800269bd17069aec
|
4
|
+
data.tar.gz: 4a40900192322ef6e5f04940277713ce43d0c64c3a672ec29ec3a5dbd2269e80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39fc8af0c0b60f613834f05e9b02b8bbe795cb483ce62e4a99016d257ae0345ff7a97d024d5e4c9791b04f5074e51679b92175470e987e613152034aa8ee5128
|
7
|
+
data.tar.gz: b1f1ed3b224be6bfb74d87851e029a797783b7bf25d4d19c09a2b1867b3ce6a1803e19cabf7942ec9eedd1575c3aff6f6279386373fe8a6af807f659bb395817
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
# need custom class due to
|
2
|
+
# https://github.com/rails/rails/issues/47185
|
3
|
+
module Mailkick
|
4
|
+
class Serializer
|
5
|
+
def self.dump(value)
|
6
|
+
JSON.dump(value)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.load(value)
|
10
|
+
JSON.load(value)
|
11
|
+
rescue JSON::ParserError
|
12
|
+
Marshal.load(value)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/mailkick/version.rb
CHANGED
data/lib/mailkick.rb
CHANGED
@@ -2,11 +2,13 @@
|
|
2
2
|
require "active_support"
|
3
3
|
|
4
4
|
# stdlib
|
5
|
+
require "json"
|
5
6
|
require "set"
|
6
7
|
|
7
8
|
# modules
|
8
9
|
require "mailkick/legacy"
|
9
10
|
require "mailkick/model"
|
11
|
+
require "mailkick/serializer"
|
10
12
|
require "mailkick/service"
|
11
13
|
require "mailkick/service/aws_ses"
|
12
14
|
require "mailkick/service/mailchimp"
|
@@ -44,10 +46,8 @@ module Mailkick
|
|
44
46
|
@@message_verifier = nil
|
45
47
|
end
|
46
48
|
|
47
|
-
# TODO use JSON serializer
|
48
|
-
# can't currently rotate serializer without rotating token or digest
|
49
49
|
def self.message_verifier
|
50
|
-
@@message_verifier ||= ActiveSupport::MessageVerifier.new(Mailkick.secret_token)
|
50
|
+
@@message_verifier ||= ActiveSupport::MessageVerifier.new(Mailkick.secret_token, serializer: Serializer)
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.generate_token(subscriber, list)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailkick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- lib/mailkick/engine.rb
|
46
46
|
- lib/mailkick/legacy.rb
|
47
47
|
- lib/mailkick/model.rb
|
48
|
+
- lib/mailkick/serializer.rb
|
48
49
|
- lib/mailkick/service.rb
|
49
50
|
- lib/mailkick/service/aws_ses.rb
|
50
51
|
- lib/mailkick/service/mailchimp.rb
|