actionmailbox 6.1.4.7 → 6.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f0ad6651657442dfd1e59990420a29def775bcbf0adeb93c942d8dc6de413d7
4
- data.tar.gz: 430adc3501018afb74fc204c5dd8960cf212120d45b06ba4cdfb22557ba280a1
3
+ metadata.gz: 1b573fd73df5c364ff88353f465888eb502be1452201716075790806c119ed0c
4
+ data.tar.gz: 8d33ca6ebeb6607d5dd7c6f44d1ad39c1a5d3b0b0e13a7bdf76ce5c39ced60dc
5
5
  SHA512:
6
- metadata.gz: c0941e111fa6b5e76d63e99394bd0deac7dfab3dfb60fb86279b06b7240c39f2f288c4f01cbbbb7c751ebdeaaefbe51dddf739d03460d8ddb98befb2884a70f2
7
- data.tar.gz: 2348775ca9b529bbca75ac0d842f8612ecd4bae9951ca38354ba4abf2ab3b72a9a46e7b84608ef7ddcb053f0667985286b1592dd7a6e06e82e672a983744c1f7
6
+ metadata.gz: a5e305b948dbf35003b16ede469de3800cb07781d117e71436055c7bb14eff226fb10c0c9e884ec609a2628e1f00c8ca6f93ff2b52ec4db1d0a6c598a2fc2300
7
+ data.tar.gz: 4b1c32c4cb12e023caffaaa8022cd2f927df6e6b8dd7556c30bf26277d829d5cb761e31c54458986ddd7ae7110ef9f79936b5274e42e462595aaa7244bde373b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
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
+
1
21
  ## Rails 6.1.4.7 (March 08, 2022) ##
2
22
 
3
23
  * 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 = "7"
12
+ TINY = 6
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,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.7
4
+ version: 6.1.6
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-03-08 00:00:00.000000000 Z
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: 6.1.4.7
20
+ version: 6.1.6
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.7
27
+ version: 6.1.6
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.7
34
+ version: 6.1.6
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.7
41
+ version: 6.1.6
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.7
48
+ version: 6.1.6
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.7
55
+ version: 6.1.6
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.7
62
+ version: 6.1.6
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.7
69
+ version: 6.1.6
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.7
76
+ version: 6.1.6
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.7
83
+ version: 6.1.6
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.7/actionmailbox/CHANGELOG.md
167
- documentation_uri: https://api.rubyonrails.org/v6.1.4.7/
167
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.6/actionmailbox/CHANGELOG.md
168
+ documentation_uri: https://api.rubyonrails.org/v6.1.6/
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.7/actionmailbox
170
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.6/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.1.6
187
+ rubygems_version: 3.3.7
186
188
  signing_key:
187
189
  specification_version: 4
188
190
  summary: Inbound email handling framework.