actionmailbox 6.1.4.6 → 6.1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f814482532334be72dc6dc85173767306b145939c7622388dbe78b92e2eb77b8
4
- data.tar.gz: a347bd40f3d68d2f2b568e45efcec4eccd325fdcb62f936ff47ef0b5ab4cf97b
3
+ metadata.gz: 26fed0991bd0af056ac0002ad89f454bdae4d3261249da72faa1e3e947aa1e4f
4
+ data.tar.gz: a9d6d40661f1ca8b224d34978e278f0b0e3ca6395c0478b75a5dce30ed5f0dcd
5
5
  SHA512:
6
- metadata.gz: b729400568d67f9fb942b5760f90a50123ef61f7c5f384c1819aa03c8aad47e7f31b3f9d1d811122e33a30b8e7723c6862d6ecbbbc7322eeeacd54aa77d2b088
7
- data.tar.gz: 37c0e357275bbfa2cdedbffe25e5ac77791e66cce00d94f77883d965da5e6748eac72929487eac09305e52c2d28859477a97270bfb9ec4aa853368f113e1710d
6
+ metadata.gz: f9e7c9b0f5a7c6b5c2fb4ae43093a3ed74d4faabc68087b121ce1bb309b3b886ff188e017fd33073e414b7f3f5eb9da0f436aa75925dc86d3ca85f3d611f8319
7
+ data.tar.gz: d4a7e7b562f72c0c5ddbe420d3c9bdde2fc8d5d0d62ab79e8271eb3b2409013ee9e82f4f58fa9c68ad7d1aea1f813acb31bcafb86a52d3456f775a97e1447461
data/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## Rails 6.1.5.1 (April 26, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 6.1.5 (March 09, 2022) ##
7
+
8
+ * Add `attachments` to the list of permitted parameters for inbound emails conductor.
9
+
10
+ When using the conductor to test inbound emails with attachments, this prevents an
11
+ unpermitted parameter warning in default configurations, and prevents errors for
12
+ applications that set:
13
+
14
+ ```ruby
15
+ config.action_controller.action_on_unpermitted_parameters = :raise
16
+ ```
17
+
18
+ *David Jones*, *Dana Henke*
19
+
20
+
21
+ ## Rails 6.1.4.7 (March 08, 2022) ##
22
+
23
+ * No changes.
24
+
25
+
1
26
  ## Rails 6.1.4.6 (February 11, 2022) ##
2
27
 
3
28
  * No changes.
data/MIT-LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018-2020 Basecamp, LLC
3
+ Copyright (c) 2018-2022 Basecamp, LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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 6.2.
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 6.2.
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(params.require(:mail).permit(:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body).to_h).tap do |mail|
23
+ Mail.new(mail_params.except(:attachments).to_h).tap do |mail|
24
24
  mail[:bcc]&.include_in_headers = true
25
- params[:mail][:attachments].to_a.each do |attachment|
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 "mail"
3
+ require "action_mailbox/mail_with_error_handling"
4
4
 
5
5
  module ActionMailbox
6
6
  # The +InboundEmail+ is an Active Record that keeps a reference to the raw email stored in Active Storage
@@ -9,8 +9,8 @@ module ActionMailbox
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 1
12
- TINY = 4
13
- PRE = "6"
12
+ TINY = 5
13
+ PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "mail"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionmailbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.4.6
4
+ version: 6.1.5.1
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-02-11 00:00:00.000000000 Z
12
+ date: 2022-04-26 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.4.6
20
+ version: 6.1.5.1
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.4.6
27
+ version: 6.1.5.1
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.4.6
34
+ version: 6.1.5.1
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.4.6
41
+ version: 6.1.5.1
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.4.6
48
+ version: 6.1.5.1
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.4.6
55
+ version: 6.1.5.1
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.4.6
62
+ version: 6.1.5.1
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.4.6
69
+ version: 6.1.5.1
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.4.6
76
+ version: 6.1.5.1
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.4.6
83
+ version: 6.1.5.1
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,10 +164,11 @@ 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.4.6/actionmailbox/CHANGELOG.md
167
- documentation_uri: https://api.rubyonrails.org/v6.1.4.6/
167
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.5.1/actionmailbox/CHANGELOG.md
168
+ documentation_uri: https://api.rubyonrails.org/v6.1.5.1/
168
169
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
169
- source_code_uri: https://github.com/rails/rails/tree/v6.1.4.6/actionmailbox
170
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.5.1/actionmailbox
171
+ rubygems_mfa_required: 'true'
170
172
  post_install_message:
171
173
  rdoc_options: []
172
174
  require_paths:
@@ -182,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
184
  - !ruby/object:Gem::Version
183
185
  version: '0'
184
186
  requirements: []
185
- rubygems_version: 3.2.22
187
+ rubygems_version: 3.1.6
186
188
  signing_key:
187
189
  specification_version: 4
188
190
  summary: Inbound email handling framework.