mailkick 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -0
- data/lib/mailkick/serializer.rb +15 -0
- data/lib/mailkick/version.rb +1 -1
- data/lib/mailkick.rb +17 -17
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb59432bb88208ad9818187d12da9be032d021e8c8e9e47635e15b4fe2aa7e6e
|
4
|
+
data.tar.gz: 10c2e216d3d9622bd770e4fdc1dcf5f4f0b84913edbb715698e56f6f2ac2d8d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8280c3fbaa4dace1475bd68e5b938d2d7f6593a2b38d0afb77073fd3e49cc807792187470f59df812da5bc9dbe43685058540b9029a33dd93c2f8012a4a816
|
7
|
+
data.tar.gz: 1c49cec20083acacf9ef9441c7d5595de6311d82c95c2debb02461ae7b167d23a40d6845e9008fcb1c731cb77bd2c9489db22c7507471b9ee4b6d33b301875c1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
+
## 1.1.2 (2023-02-07)
|
2
|
+
|
3
|
+
- Improved serialization
|
4
|
+
|
5
|
+
## 1.1.1 (2023-01-30)
|
6
|
+
|
7
|
+
- Switched to JSON for serialization with non-default `secret_token`
|
8
|
+
|
1
9
|
## 1.1.0 (2023-01-29)
|
2
10
|
|
3
11
|
- Improved secret token generation
|
12
|
+
- Switched to JSON for serialization with default `secret_token`
|
4
13
|
|
5
14
|
## 1.0.1 (2021-06-20)
|
6
15
|
|
data/README.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
|
+
ActiveSupport::JSON.encode(value)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.load(value)
|
10
|
+
ActiveSupport::JSON.decode(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,24 +2,26 @@
|
|
2
2
|
require "active_support"
|
3
3
|
|
4
4
|
# stdlib
|
5
|
+
require "json"
|
5
6
|
require "set"
|
6
7
|
|
7
8
|
# modules
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
require_relative "mailkick/legacy"
|
10
|
+
require_relative "mailkick/model"
|
11
|
+
require_relative "mailkick/serializer"
|
12
|
+
require_relative "mailkick/service"
|
13
|
+
require_relative "mailkick/service/aws_ses"
|
14
|
+
require_relative "mailkick/service/mailchimp"
|
15
|
+
require_relative "mailkick/service/mailgun"
|
16
|
+
require_relative "mailkick/service/mandrill"
|
17
|
+
require_relative "mailkick/service/sendgrid"
|
18
|
+
require_relative "mailkick/service/sendgrid_v2"
|
19
|
+
require_relative "mailkick/service/postmark"
|
20
|
+
require_relative "mailkick/url_helper"
|
21
|
+
require_relative "mailkick/version"
|
20
22
|
|
21
23
|
# integrations
|
22
|
-
|
24
|
+
require_relative "mailkick/engine" if defined?(Rails)
|
23
25
|
|
24
26
|
module Mailkick
|
25
27
|
mattr_accessor :services, :mount, :process_opt_outs_method
|
@@ -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)
|
@@ -58,7 +58,7 @@ module Mailkick
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
ActiveSupport.on_load
|
61
|
+
ActiveSupport.on_load(:action_mailer) do
|
62
62
|
helper Mailkick::UrlHelper
|
63
63
|
end
|
64
64
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -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
|
@@ -74,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
75
|
- !ruby/object:Gem::Version
|
75
76
|
version: '0'
|
76
77
|
requirements: []
|
77
|
-
rubygems_version: 3.4.
|
78
|
+
rubygems_version: 3.4.6
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: Email subscriptions for Rails
|