actionmailbox 7.2.0 → 8.0.0.beta1

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: 4543a5df92de3062758a9041ea3b3278095e55d2927544816c45e9d55290f71e
4
- data.tar.gz: 13bf08a4c2e78e5feb9ad740c824b0df77a1fc602ec44bd91c5e11c56b56238f
3
+ metadata.gz: 8e75805ebb1ec7368d26763c58ae3fb21455d774d8ce88c71fbb6782db2c273f
4
+ data.tar.gz: fc3cc7bb0b49c49dc0d488be1b2da66c9dfa3d0440c646dc3ee9f07a66a03286
5
5
  SHA512:
6
- metadata.gz: 47cef00d112f9a7327cd131782d0374fea9a5b805f9a6534be12b3b3d5a93976a5609e19f189366752c5e4d56e26104f9deb27a633d49a637bf7271b981a5f4a
7
- data.tar.gz: 701c8aab5d8f44b6d82bda4150e35453db6f407baef41bb931109891cf507a09d70250b11bfcce34521682eded3cca48abbd9c07fbe88c5e1ddc6ff50c60f1bf
6
+ metadata.gz: 58f8fcd6bea46b41c2e11639da20298c1aa773b6c4fbe3274ef330e3f697534ae54af0e73b5cc27f0a01a8062aef013b5eebf76c96e065aefb9854ebd3d5130a
7
+ data.tar.gz: 41dcbc810dc4fb45f80a355647e2796ab938f16bed8ef073a8163ae5a4308d9318aee54d2e9264b15e5363b41c1fa6b2d6fe7ce177bdc0c9c53448b894bd432c
data/CHANGELOG.md CHANGED
@@ -1,8 +1,4 @@
1
- ## Rails 7.2.0 (August 09, 2024) ##
1
+ ## Rails 8.0.0.beta1 (September 26, 2024) ##
2
2
 
3
- * Fix all Action Mailbox database related models to respect
4
- `ActiveRecord::Base.table_name_prefix` configuration.
5
3
 
6
- *Chedli Bourguiba*
7
-
8
- Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actionmailbox/CHANGELOG.md) for previous changes.
4
+ Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/actionmailbox/CHANGELOG.md) for previous changes.
@@ -49,7 +49,7 @@ module ActionMailbox
49
49
  param_encoding :create, "RawEmail", Encoding::ASCII_8BIT
50
50
 
51
51
  def create
52
- ActionMailbox::InboundEmail.create_and_extract_message_id! params.require("RawEmail")
52
+ ActionMailbox::InboundEmail.create_and_extract_message_id! mail
53
53
  rescue ActionController::ParameterMissing => error
54
54
  logger.error <<~MESSAGE
55
55
  #{error.message}
@@ -59,5 +59,12 @@ module ActionMailbox
59
59
  MESSAGE
60
60
  head :unprocessable_entity
61
61
  end
62
+
63
+ private
64
+ def mail
65
+ params.require("RawEmail").tap do |raw_email|
66
+ raw_email.prepend("X-Original-To: ", params.require("OriginalRecipient"), "\n") if params.key?("OriginalRecipient")
67
+ end
68
+ end
62
69
  end
63
70
  end
@@ -52,7 +52,11 @@ module ActionMailbox
52
52
  before_action :authenticate_by_password, :require_valid_rfc822_message
53
53
 
54
54
  def create
55
- ActionMailbox::InboundEmail.create_and_extract_message_id! request.body.read
55
+ if request.body
56
+ ActionMailbox::InboundEmail.create_and_extract_message_id! request.body.read
57
+ else
58
+ head :unprocessable_entity
59
+ end
56
60
  end
57
61
 
58
62
  private
@@ -31,7 +31,7 @@ module Rails
31
31
  end
32
32
 
33
33
  def mail_params
34
- params.require(:mail).permit(:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body, attachments: [])
34
+ params.expect(mail: [:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body, attachments: []])
35
35
  end
36
36
 
37
37
  def create_inbound_email(mail)
@@ -40,7 +40,7 @@
40
40
 
41
41
  <div>
42
42
  <%= form.label :body, "Body" %><br>
43
- <%= form.text_area :body, size: "40x20", value: params[:body] %>
43
+ <%= form.textarea :body, size: "40x20", value: params[:body] %>
44
44
  </div>
45
45
 
46
46
  <div>
@@ -5,7 +5,7 @@
5
5
  <%= form_with(url: main_app.rails_conductor_inbound_email_sources_path, local: true) do |form| %>
6
6
  <div>
7
7
  <%= form.label :source, "Source" %><br>
8
- <%= form.text_area :source, size: "80x60" %>
8
+ <%= form.textarea :source, size: "80x60" %>
9
9
  </div>
10
10
 
11
11
  <%= form.submit "Deliver inbound email" %>
@@ -7,10 +7,10 @@ module ActionMailbox
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 7
11
- MINOR = 2
10
+ MAJOR = 8
11
+ MINOR = 0
12
12
  TINY = 0
13
- PRE = nil
13
+ PRE = "beta1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  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: 7.2.0
4
+ version: 8.0.0.beta1
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: 2024-08-09 00:00:00.000000000 Z
12
+ date: 2024-09-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: 7.2.0
20
+ version: 8.0.0.beta1
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.2.0
27
+ version: 8.0.0.beta1
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.2.0
34
+ version: 8.0.0.beta1
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.2.0
41
+ version: 8.0.0.beta1
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.2.0
48
+ version: 8.0.0.beta1
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.2.0
55
+ version: 8.0.0.beta1
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.2.0
62
+ version: 8.0.0.beta1
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.2.0
69
+ version: 8.0.0.beta1
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.2.0
76
+ version: 8.0.0.beta1
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.2.0
83
+ version: 8.0.0.beta1
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: mail
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -165,12 +165,12 @@ licenses:
165
165
  - MIT
166
166
  metadata:
167
167
  bug_tracker_uri: https://github.com/rails/rails/issues
168
- changelog_uri: https://github.com/rails/rails/blob/v7.2.0/actionmailbox/CHANGELOG.md
169
- documentation_uri: https://api.rubyonrails.org/v7.2.0/
168
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.0.beta1/actionmailbox/CHANGELOG.md
169
+ documentation_uri: https://api.rubyonrails.org/v8.0.0.beta1/
170
170
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
171
- source_code_uri: https://github.com/rails/rails/tree/v7.2.0/actionmailbox
171
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.0.beta1/actionmailbox
172
172
  rubygems_mfa_required: 'true'
173
- post_install_message:
173
+ post_install_message:
174
174
  rdoc_options: []
175
175
  require_paths:
176
176
  - lib
@@ -178,15 +178,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
178
  requirements:
179
179
  - - ">="
180
180
  - !ruby/object:Gem::Version
181
- version: 3.1.0
181
+ version: 3.2.0
182
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.5.11
189
- signing_key:
188
+ rubygems_version: 3.5.16
189
+ signing_key:
190
190
  specification_version: 4
191
191
  summary: Inbound email handling framework.
192
192
  test_files: []