actionmailbox 6.1.4.7 → 6.1.5
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/MIT-LICENSE +1 -1
- data/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb +2 -2
- data/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb +6 -2
- data/app/models/action_mailbox/inbound_email.rb +1 -1
- data/lib/action_mailbox/gem_version.rb +2 -2
- data/lib/action_mailbox/mail_ext.rb +1 -1
- data/lib/action_mailbox/mail_with_error_handling.rb +10 -0
- metadata +21 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4d4dcfd2e70e4280b182201b312e395abdc9e815c7be1cc93785eece809f286
|
4
|
+
data.tar.gz: 9ca00b41515575a6c6730d6d00217d4789bd439c5bc3f5f8b165f5fa73201b53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e06ad29b1d11368a1bf155ddd7cdf5a9eada9eb87952a34cec5954d05570301e172676ef0ad20f847b0ed231eb74e9080581f15e5108e9f51fc8e555df6ccae
|
7
|
+
data.tar.gz: f6b00f42554f869471013c7fa9001e6a94c0a9c93e0e3fdbd5971942e545c6436d94616b7e18771e9707833984e94d7b332c3b816957b06e13fcae7b267c938e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Rails 6.1.5 (March 09, 2022) ##
|
2
|
+
|
3
|
+
* Add `attachments` to the list of permitted parameters for inbound emails conductor.
|
4
|
+
|
5
|
+
When using the conductor to test inbound emails with attachments, this prevents an
|
6
|
+
unpermitted parameter warning in default configurations, and prevents errors for
|
7
|
+
applications that set:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
config.action_controller.action_on_unpermitted_parameters = :raise
|
11
|
+
```
|
12
|
+
|
13
|
+
*David Jones*, *Dana Henke*
|
14
|
+
|
15
|
+
|
1
16
|
## Rails 6.1.4.7 (March 08, 2022) ##
|
2
17
|
|
3
18
|
* No changes.
|
data/MIT-LICENSE
CHANGED
@@ -79,13 +79,13 @@ module ActionMailbox
|
|
79
79
|
def key
|
80
80
|
if Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key)
|
81
81
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
82
|
-
Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails
|
82
|
+
Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails 7.0.
|
83
83
|
Use Rails.application.credentials.action_mailbox.signing_key instead.
|
84
84
|
MSG
|
85
85
|
Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key)
|
86
86
|
elsif ENV["MAILGUN_INGRESS_API_KEY"]
|
87
87
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
88
|
-
The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails
|
88
|
+
The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails 7.0.
|
89
89
|
Use MAILGUN_INGRESS_SIGNING_KEY instead.
|
90
90
|
MSG
|
91
91
|
ENV["MAILGUN_INGRESS_API_KEY"]
|
@@ -20,14 +20,18 @@ module Rails
|
|
20
20
|
|
21
21
|
private
|
22
22
|
def new_mail
|
23
|
-
Mail.new(
|
23
|
+
Mail.new(mail_params.except(:attachments).to_h).tap do |mail|
|
24
24
|
mail[:bcc]&.include_in_headers = true
|
25
|
-
|
25
|
+
mail_params[:attachments].to_a.each do |attachment|
|
26
26
|
mail.add_file(filename: attachment.original_filename, content: attachment.read)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
def mail_params
|
32
|
+
params.require(:mail).permit(:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body, attachments: [])
|
33
|
+
end
|
34
|
+
|
31
35
|
def create_inbound_email(mail)
|
32
36
|
ActionMailbox::InboundEmail.create_and_extract_message_id!(mail.to_s)
|
33
37
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "action_mailbox/mail_with_error_handling"
|
4
4
|
|
5
5
|
# The hope is to upstream most of these basic additions to the Mail gem's Mail object. But until then, here they lay!
|
6
6
|
Dir["#{File.expand_path(File.dirname(__FILE__))}/mail_ext/*"].each { |path| require "action_mailbox/mail_ext/#{File.basename(path)}" }
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
begin
|
4
|
+
require "mail"
|
5
|
+
rescue LoadError => error
|
6
|
+
if error.message.match?(/net-smtp/)
|
7
|
+
$stderr.puts "You don't have net-smtp installed in your application. Please add it to your Gemfile and run bundle install"
|
8
|
+
raise
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
- George Claghorn
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-03-
|
12
|
+
date: 2022-03-10 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: 6.1.
|
20
|
+
version: 6.1.5
|
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: 6.1.
|
27
|
+
version: 6.1.5
|
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: 6.1.
|
34
|
+
version: 6.1.5
|
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: 6.1.
|
41
|
+
version: 6.1.5
|
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: 6.1.
|
48
|
+
version: 6.1.5
|
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: 6.1.
|
55
|
+
version: 6.1.5
|
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: 6.1.
|
62
|
+
version: 6.1.5
|
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: 6.1.
|
69
|
+
version: 6.1.5
|
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: 6.1.
|
76
|
+
version: 6.1.5
|
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: 6.1.
|
83
|
+
version: 6.1.5
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: mail
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/action_mailbox/mail_ext/addresses.rb
|
143
143
|
- lib/action_mailbox/mail_ext/from_source.rb
|
144
144
|
- lib/action_mailbox/mail_ext/recipients.rb
|
145
|
+
- lib/action_mailbox/mail_with_error_handling.rb
|
145
146
|
- lib/action_mailbox/relayer.rb
|
146
147
|
- lib/action_mailbox/router.rb
|
147
148
|
- lib/action_mailbox/router/route.rb
|
@@ -163,11 +164,12 @@ licenses:
|
|
163
164
|
- MIT
|
164
165
|
metadata:
|
165
166
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
166
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.1.
|
167
|
-
documentation_uri: https://api.rubyonrails.org/v6.1.
|
167
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.5/actionmailbox/CHANGELOG.md
|
168
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.5/
|
168
169
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
169
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.1.
|
170
|
-
|
170
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.5/actionmailbox
|
171
|
+
rubygems_mfa_required: 'true'
|
172
|
+
post_install_message:
|
171
173
|
rdoc_options: []
|
172
174
|
require_paths:
|
173
175
|
- lib
|
@@ -182,8 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
184
|
- !ruby/object:Gem::Version
|
183
185
|
version: '0'
|
184
186
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
186
|
-
signing_key:
|
187
|
+
rubygems_version: 3.3.7
|
188
|
+
signing_key:
|
187
189
|
specification_version: 4
|
188
190
|
summary: Inbound email handling framework.
|
189
191
|
test_files: []
|