actionmailbox 6.0.0.beta1 → 6.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb +1 -1
- data/app/jobs/action_mailbox/incineration_job.rb +3 -0
- data/app/models/action_mailbox/inbound_email/incineratable.rb +1 -1
- data/app/views/layouts/rails/conductor.html.erb +1 -0
- data/db/migrate/20180917164000_create_action_mailbox_tables.rb +1 -5
- data/lib/action_mailbox.rb +1 -0
- data/lib/action_mailbox/engine.rb +6 -6
- data/lib/action_mailbox/gem_version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c23415495825cca15ad9d5a4c9cba1dd5fb5c4cb77e3b2eaf951b5e099b8f9e9
|
4
|
+
data.tar.gz: 2cdb3f49842ae19d3bc637faec19bfa1181519a9341c6f56db66ec3dab3787cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20cbc8de6837bb3368dd1a05485823620552d67f497f144be37fd939b5745ec6211d67a71a45cc774db7f72cd69b27dc8597903d42fd8a0793343bf1a0ab1d9a
|
7
|
+
data.tar.gz: d8bd32f6900c71a653c9479b27b25c4325fd57dd553745cb21f2abf557ff418f05ecbd9f98f7b64b34b91a7694db85164982228a19a64a3facf3d469243b4df9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## Rails 6.0.0.beta2 (February 25, 2019) ##
|
2
|
+
|
3
|
+
* Allow skipping incineration of processed emails.
|
4
|
+
|
5
|
+
This can be done by setting `config.action_mailbox.incinerate` to `false`.
|
6
|
+
|
7
|
+
*Pratik Naik*
|
8
|
+
|
1
9
|
## Rails 6.0.0.beta1 (January 18, 2019) ##
|
2
10
|
|
3
11
|
* Added to Rails.
|
@@ -22,7 +22,7 @@ module Rails
|
|
22
22
|
def new_mail
|
23
23
|
Mail.new(params.require(:mail).permit(:from, :to, :cc, :bcc, :in_reply_to, :subject, :body).to_h).tap do |mail|
|
24
24
|
params[:mail][:attachments].to_a.each do |attachment|
|
25
|
-
mail.
|
25
|
+
mail.add_file(filename: attachment.path, content: attachment.read)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -6,6 +6,9 @@ module ActionMailbox
|
|
6
6
|
#
|
7
7
|
# Since this incineration is set for the future, it'll automatically ignore any <tt>InboundEmail</tt>s
|
8
8
|
# that have already been deleted and discard itself if so.
|
9
|
+
#
|
10
|
+
# You can disable incinerating processed emails by setting +config.action_mailbox.incinerate+ or
|
11
|
+
# +ActionMailbox.incinerate+ to +false+.
|
9
12
|
class IncinerationJob < ActiveJob::Base
|
10
13
|
queue_as { ActionMailbox.queues[:incineration] }
|
11
14
|
|
@@ -7,7 +7,7 @@ module ActionMailbox::InboundEmail::Incineratable
|
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
9
|
included do
|
10
|
-
after_update_commit :incinerate_later, if: -> { status_previously_changed? && processed? }
|
10
|
+
after_update_commit :incinerate_later, if: -> { ActionMailbox.incinerate && status_previously_changed? && processed? }
|
11
11
|
end
|
12
12
|
|
13
13
|
def incinerate_later
|
@@ -5,11 +5,7 @@ class CreateActionMailboxTables < ActiveRecord::Migration[6.0]
|
|
5
5
|
t.string :message_id, null: false
|
6
6
|
t.string :message_checksum, null: false
|
7
7
|
|
8
|
-
|
9
|
-
t.timestamps precision: 6
|
10
|
-
else
|
11
|
-
t.timestamps
|
12
|
-
end
|
8
|
+
t.timestamps
|
13
9
|
|
14
10
|
t.index [ :message_id, :message_checksum ], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true
|
15
11
|
end
|
data/lib/action_mailbox.rb
CHANGED
@@ -14,6 +14,7 @@ module ActionMailbox
|
|
14
14
|
config.eager_load_namespaces << ActionMailbox
|
15
15
|
|
16
16
|
config.action_mailbox = ActiveSupport::OrderedOptions.new
|
17
|
+
config.action_mailbox.incinerate = true
|
17
18
|
config.action_mailbox.incinerate_after = 30.days
|
18
19
|
|
19
20
|
config.action_mailbox.queues = ActiveSupport::InheritableOptions.new \
|
@@ -22,18 +23,17 @@ module ActionMailbox
|
|
22
23
|
initializer "action_mailbox.config" do
|
23
24
|
config.after_initialize do |app|
|
24
25
|
ActionMailbox.logger = app.config.action_mailbox.logger || Rails.logger
|
26
|
+
ActionMailbox.incinerate = app.config.action_mailbox.incinerate.nil? ? true : app.config.action_mailbox.incinerate
|
25
27
|
ActionMailbox.incinerate_after = app.config.action_mailbox.incinerate_after || 30.days
|
26
28
|
ActionMailbox.queues = app.config.action_mailbox.queues || {}
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
30
|
-
initializer "action_mailbox.ingress" do
|
31
|
-
config.
|
32
|
+
initializer "action_mailbox.ingress" do |app|
|
33
|
+
config.to_prepare do
|
32
34
|
if ActionMailbox.ingress = app.config.action_mailbox.ingress.presence
|
33
|
-
|
34
|
-
|
35
|
-
ingress_controller_class.prepare
|
36
|
-
end
|
35
|
+
if ingress_controller_class = "ActionMailbox::Ingresses::#{ActionMailbox.ingress.to_s.classify}::InboundEmailsController".safe_constantize
|
36
|
+
ingress_controller_class.prepare
|
37
37
|
end
|
38
38
|
end
|
39
39
|
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.0.0.
|
4
|
+
version: 6.0.0.beta2
|
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: 2019-
|
12
|
+
date: 2019-02-25 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.0.0.
|
20
|
+
version: 6.0.0.beta2
|
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.0.0.
|
27
|
+
version: 6.0.0.beta2
|
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.0.0.
|
34
|
+
version: 6.0.0.beta2
|
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.0.0.
|
41
|
+
version: 6.0.0.beta2
|
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.0.0.
|
48
|
+
version: 6.0.0.beta2
|
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.0.0.
|
55
|
+
version: 6.0.0.beta2
|
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.0.0.
|
62
|
+
version: 6.0.0.beta2
|
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.0.0.
|
69
|
+
version: 6.0.0.beta2
|
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.0.0.
|
76
|
+
version: 6.0.0.beta2
|
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.0.0.
|
83
|
+
version: 6.0.0.beta2
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: mail
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,8 +160,8 @@ homepage: https://rubyonrails.org
|
|
160
160
|
licenses:
|
161
161
|
- MIT
|
162
162
|
metadata:
|
163
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.
|
164
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.
|
163
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.beta2/actionmailbox
|
164
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.beta2/actionmailbox/CHANGELOG.md
|
165
165
|
post_install_message:
|
166
166
|
rdoc_options: []
|
167
167
|
require_paths:
|