actionmailbox 6.1.4.5 → 6.1.5

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: abdd796cea769c303ca23e347c50f634b02e32431bb16b861e1353beeceba816
4
- data.tar.gz: 848eaf281f309a98334494e5bcba1be4441d0d24969e24127ccf1cbef19875b5
3
+ metadata.gz: c4d4dcfd2e70e4280b182201b312e395abdc9e815c7be1cc93785eece809f286
4
+ data.tar.gz: 9ca00b41515575a6c6730d6d00217d4789bd439c5bc3f5f8b165f5fa73201b53
5
5
  SHA512:
6
- metadata.gz: 8bf4b2fdf64b4f68791885b00154966447cb45a74435761a3741bb4d1b2f111ae612cf44f3c79627d4927d73f38247a8c22476e27eeecd8055ec9dc607059486
7
- data.tar.gz: 9116684003085dad9e2442b485a49b4de006db3fb49bbe4070613efe07728051dae74e6ab49fa55ca451db333795bf6e9d3de24d240b94688824f2e04b229430
6
+ metadata.gz: 5e06ad29b1d11368a1bf155ddd7cdf5a9eada9eb87952a34cec5954d05570301e172676ef0ad20f847b0ed231eb74e9080581f15e5108e9f51fc8e555df6ccae
7
+ data.tar.gz: f6b00f42554f869471013c7fa9001e6a94c0a9c93e0e3fdbd5971942e545c6436d94616b7e18771e9707833984e94d7b332c3b816957b06e13fcae7b267c938e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
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
+
16
+ ## Rails 6.1.4.7 (March 08, 2022) ##
17
+
18
+ * No changes.
19
+
20
+
21
+ ## Rails 6.1.4.6 (February 11, 2022) ##
22
+
23
+ * No changes.
24
+
25
+
1
26
  ## Rails 6.1.4.5 (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 = "5"
12
+ TINY = 5
13
+ PRE = nil
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,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.5
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-02-11 00:00:00.000000000 Z
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5
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.4.5/actionmailbox/CHANGELOG.md
167
- documentation_uri: https://api.rubyonrails.org/v6.1.4.5/
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.4.5/actionmailbox
170
- post_install_message:
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.2.22
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: []