actionmailbox 7.0.2.2 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/app/controllers/action_mailbox/base_controller.rb +1 -1
- data/lib/action_mailbox/base.rb +4 -4
- data/lib/action_mailbox/gem_version.rb +3 -3
- data/lib/action_mailbox/router/route.rb +1 -1
- data/lib/action_mailbox/routing.rb +1 -1
- data/lib/action_mailbox/test_helper.rb +9 -10
- data/lib/action_mailbox/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30de8fb6a34a8231b6177dcae7be98b504f0359bfd64a6eb45c6e26ceb4a37c3
|
4
|
+
data.tar.gz: 95d95ff8320a2071d428ca1081749bc6b480f12c8405b10dde1edc711f09062f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 670679b82e6f5a571ecb371ee46cdf8b8e447fa96cb25b894c53667f45e966cce87b5d223ecb847ec565eaef99c170552ab78180de02cfd9ecbe765c24d4d4b2
|
7
|
+
data.tar.gz: e5939868cf0f099633e6e4f16b19d2d532e9f2d1e60cf4bfa76f027d513e225bfe354b63ac3fe51982536ee35d5a7698a8c0a45c98c31e43f62a82cd007c0233
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Rails 7.0.3 (May 09, 2022) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 7.0.2.4 (April 26, 2022) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 7.0.2.3 (March 08, 2022) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
1
16
|
## Rails 7.0.2.2 (February 11, 2022) ##
|
2
17
|
|
3
18
|
* No changes.
|
data/lib/action_mailbox/base.rb
CHANGED
@@ -27,7 +27,7 @@ module ActionMailbox
|
|
27
27
|
# routing :all => :backstop
|
28
28
|
# end
|
29
29
|
#
|
30
|
-
# Application mailboxes need to
|
30
|
+
# Application mailboxes need to override the #process method, which is invoked by the framework after
|
31
31
|
# callbacks have been run. The callbacks available are: +before_processing+, +after_processing+, and
|
32
32
|
# +around_processing+. The primary use case is ensure certain preconditions to processing are fulfilled
|
33
33
|
# using +before_processing+ callbacks.
|
@@ -35,7 +35,7 @@ module ActionMailbox
|
|
35
35
|
# If a precondition fails to be met, you can halt the processing using the +#bounced!+ method,
|
36
36
|
# which will silently prevent any further processing, but not actually send out any bounce notice. You
|
37
37
|
# can also pair this behavior with the invocation of an Action Mailer class responsible for sending out
|
38
|
-
# an actual bounce email. This is done using the
|
38
|
+
# an actual bounce email. This is done using the #bounce_with method, which takes the mail object returned
|
39
39
|
# by an Action Mailer method, like so:
|
40
40
|
#
|
41
41
|
# class ForwardsMailbox < ApplicationMailbox
|
@@ -51,7 +51,7 @@ module ActionMailbox
|
|
51
51
|
#
|
52
52
|
# During the processing of the inbound email, the status will be tracked. Before processing begins,
|
53
53
|
# the email will normally have the +pending+ status. Once processing begins, just before callbacks
|
54
|
-
# and the
|
54
|
+
# and the #process method is called, the status is changed to +processing+. If processing is allowed to
|
55
55
|
# complete, the status is changed to +delivered+. If a bounce is triggered, then +bounced+. If an unhandled
|
56
56
|
# exception is bubbled up, then +failed+.
|
57
57
|
#
|
@@ -89,7 +89,7 @@ module ActionMailbox
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def process
|
92
|
-
#
|
92
|
+
# Override in subclasses
|
93
93
|
end
|
94
94
|
|
95
95
|
def finished_processing? # :nodoc:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module ActionMailbox
|
4
|
-
# Returns the currently
|
4
|
+
# Returns the currently loaded version of Action Mailbox as a <tt>Gem::Version</tt>.
|
5
5
|
def self.gem_version
|
6
6
|
Gem::Version.new VERSION::STRING
|
7
7
|
end
|
@@ -9,8 +9,8 @@ module ActionMailbox
|
|
9
9
|
module VERSION
|
10
10
|
MAJOR = 7
|
11
11
|
MINOR = 0
|
12
|
-
TINY =
|
13
|
-
PRE =
|
12
|
+
TINY = 3
|
13
|
+
PRE = nil
|
14
14
|
|
15
15
|
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
16
16
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module ActionMailbox
|
4
4
|
# Encapsulates a route, which can then be matched against an inbound_email and provide a lookup of the matching
|
5
|
-
# mailbox class. See examples for the different route addresses and how to use them in the
|
5
|
+
# mailbox class. See examples for the different route addresses and how to use them in the ActionMailbox::Base
|
6
6
|
# documentation.
|
7
7
|
class Router::Route
|
8
8
|
attr_reader :address, :mailbox_name
|
@@ -4,18 +4,18 @@ require "mail"
|
|
4
4
|
|
5
5
|
module ActionMailbox
|
6
6
|
module TestHelper
|
7
|
-
# Create an
|
7
|
+
# Create an InboundEmail record using an eml fixture in the format of message/rfc822
|
8
8
|
# referenced with +fixture_name+ located in +test/fixtures/files/fixture_name+.
|
9
9
|
def create_inbound_email_from_fixture(fixture_name, status: :processing)
|
10
10
|
create_inbound_email_from_source file_fixture(fixture_name).read, status: status
|
11
11
|
end
|
12
12
|
|
13
|
-
# Creates an
|
13
|
+
# Creates an InboundEmail by specifying through options or a block.
|
14
14
|
#
|
15
15
|
# ==== Options
|
16
16
|
#
|
17
|
-
# * <tt>:status</tt> - The +status+ to set for the created
|
18
|
-
# For possible statuses, see
|
17
|
+
# * <tt>:status</tt> - The +status+ to set for the created InboundEmail.
|
18
|
+
# For possible statuses, see its documentation.
|
19
19
|
#
|
20
20
|
# ==== Creating a simple email
|
21
21
|
#
|
@@ -68,26 +68,25 @@ module ActionMailbox
|
|
68
68
|
create_inbound_email_from_source mail.to_s, status: status
|
69
69
|
end
|
70
70
|
|
71
|
-
# Create an
|
71
|
+
# Create an InboundEmail using the raw rfc822 +source+ as text.
|
72
72
|
def create_inbound_email_from_source(source, status: :processing)
|
73
73
|
ActionMailbox::InboundEmail.create_and_extract_message_id! source, status: status
|
74
74
|
end
|
75
75
|
|
76
76
|
|
77
|
-
# Create an
|
77
|
+
# Create an InboundEmail from fixture using the same arguments as create_inbound_email_from_fixture
|
78
78
|
# and immediately route it to processing.
|
79
79
|
def receive_inbound_email_from_fixture(*args)
|
80
80
|
create_inbound_email_from_fixture(*args).tap(&:route)
|
81
81
|
end
|
82
82
|
|
83
|
-
# Create an
|
84
|
-
#
|
85
|
-
# then immediately route it for processing.
|
83
|
+
# Create an InboundEmail using the same options or block as
|
84
|
+
# create_inbound_email_from_mail, then immediately route it for processing.
|
86
85
|
def receive_inbound_email_from_mail(**kwargs, &block)
|
87
86
|
create_inbound_email_from_mail(**kwargs, &block).tap(&:route)
|
88
87
|
end
|
89
88
|
|
90
|
-
# Create an
|
89
|
+
# Create an InboundEmail using the same arguments as create_inbound_email_from_source and immediately route it
|
91
90
|
# to processing.
|
92
91
|
def receive_inbound_email_from_source(*args)
|
93
92
|
create_inbound_email_from_source(*args).tap(&:route)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require_relative "gem_version"
|
4
4
|
|
5
5
|
module ActionMailbox
|
6
|
-
# Returns the currently
|
6
|
+
# Returns the currently loaded version of Action Mailbox as a <tt>Gem::Version</tt>.
|
7
7
|
def self.version
|
8
8
|
gem_version
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -17,70 +17,70 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 7.0.
|
20
|
+
version: 7.0.3
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 7.0.
|
27
|
+
version: 7.0.3
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: activerecord
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 7.0.
|
34
|
+
version: 7.0.3
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 7.0.
|
41
|
+
version: 7.0.3
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: activestorage
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 7.0.
|
48
|
+
version: 7.0.3
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - '='
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 7.0.
|
55
|
+
version: 7.0.3
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: activejob
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - '='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 7.0.
|
62
|
+
version: 7.0.3
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 7.0.
|
69
|
+
version: 7.0.3
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: actionpack
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 7.0.
|
76
|
+
version: 7.0.3
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - '='
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 7.0.
|
83
|
+
version: 7.0.3
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: mail
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,10 +206,10 @@ licenses:
|
|
206
206
|
- MIT
|
207
207
|
metadata:
|
208
208
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
209
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
210
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
209
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.3/actionmailbox/CHANGELOG.md
|
210
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.3/
|
211
211
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
212
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
212
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.3/actionmailbox
|
213
213
|
rubygems_mfa_required: 'true'
|
214
214
|
post_install_message:
|
215
215
|
rdoc_options: []
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: '0'
|
228
228
|
requirements: []
|
229
|
-
rubygems_version: 3.
|
229
|
+
rubygems_version: 3.3.7
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: Inbound email handling framework.
|