effective_messaging 0.5.6 → 0.6.0
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 +4 -4
- data/app/datatables/admin/effective_notifications_datatable.rb +1 -1
- data/app/models/effective/notification.rb +1 -1
- data/app/views/admin/notifications/_form_notification.html.haml +2 -7
- data/config/effective_messaging.rb +1 -4
- data/lib/effective_messaging/version.rb +1 -1
- data/lib/effective_messaging.rb +1 -1
- data/lib/tasks/effective_messaging_tasks.rake +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc984bf85e3e2cf47b5ceaae61d98dc2b336ea34d1ed802c439c7854beabc3b0
|
4
|
+
data.tar.gz: 2c695ed99c62e9b4d0d9a42f64d557fdabc8f151d0d5c32b28ed881c4de13385
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 462f2e88796ea1a1b9e0af27abafe25c580f42ee8b75259ecde6af4a99c1044ba765f7f9c13c2764337f82e179fc2cf9e72e1e33420ff1a270fffef35b0df75d
|
7
|
+
data.tar.gz: 95c16f285e650a356c08c85b922385246912bb6c14fab53d406e722e9010bc123266bcc0941a94ca93ec98fb27d3e83fd3f7ccb4b1623bf90a3a7b66a2da73e4
|
@@ -43,7 +43,7 @@ module Admin
|
|
43
43
|
col :subject
|
44
44
|
col :body, visible: false
|
45
45
|
|
46
|
-
col :from, visible: false, search:
|
46
|
+
col :from, visible: false, search: EffectiveMessaging.mailer_froms
|
47
47
|
col :cc, visible: false
|
48
48
|
col :bcc, visible: false
|
49
49
|
|
@@ -55,13 +55,8 @@
|
|
55
55
|
%h2 Notification
|
56
56
|
%p The following email notification will be sent
|
57
57
|
|
58
|
-
-
|
59
|
-
|
60
|
-
- if froms.present?
|
61
|
-
= f.radios :from, froms
|
62
|
-
- else
|
63
|
-
= f.email_field :from
|
64
|
-
|
58
|
+
- f.object.from ||= EffectiveMessaging.mailer_froms.first
|
59
|
+
= f.select :from, EffectiveMessaging.mailer_froms
|
65
60
|
= f.email_field :bcc
|
66
61
|
= f.text_field :subject
|
67
62
|
= f.text_area :body, rows: 20
|
@@ -3,10 +3,6 @@ EffectiveMessaging.setup do |config|
|
|
3
3
|
# Configure the Layout per controller, or all at once
|
4
4
|
# config.layout = { application: 'application', admin: 'admin' }
|
5
5
|
|
6
|
-
# From Settings
|
7
|
-
# For the Admin new notification form. Set to an array to use a select, or nil to use a freeform text entry
|
8
|
-
config.froms = ['noreply@example.com']
|
9
|
-
|
10
6
|
# Mailer Settings
|
11
7
|
# Please see config/initializers/effective_messaging.rb for default effective_* gem mailer settings
|
12
8
|
#
|
@@ -19,6 +15,7 @@ EffectiveMessaging.setup do |config|
|
|
19
15
|
# config.deliver_method = nil # The deliver method, deliver_later or deliver_now
|
20
16
|
# config.mailer_layout = nil # Default mailer layout
|
21
17
|
# config.mailer_sender = nil # Default From value
|
18
|
+
# config.mailer_froms = nil # Default Froms collection
|
22
19
|
# config.mailer_admin = nil # Default To value for Admin correspondence
|
23
20
|
# config.mailer_subject = nil # Proc.new method used to customize Subject
|
24
21
|
|
data/lib/effective_messaging.rb
CHANGED
@@ -10,7 +10,7 @@ module EffectiveMessaging
|
|
10
10
|
:chats_table_name, :chat_users_table_name, :chat_messages_table_name, :notifications_table_name, :notification_logs_table_name,
|
11
11
|
:layout,
|
12
12
|
:froms,
|
13
|
-
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject
|
13
|
+
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_froms, :mailer_admin, :mailer_subject
|
14
14
|
]
|
15
15
|
end
|
16
16
|
|
@@ -14,10 +14,10 @@ namespace :effective_messaging do
|
|
14
14
|
begin
|
15
15
|
notification.notify!
|
16
16
|
Rails.logger.info "Sent notifications for #{notification} and #{notification.report}"
|
17
|
-
rescue => e
|
17
|
+
rescue StandardError => e
|
18
18
|
data = { notification_id: notification.id, report_id: notification.report_id, resource_id: notification.current_resource&.id }
|
19
19
|
ExceptionNotifier.notify_exception(e, data: data) if defined?(ExceptionNotifier)
|
20
|
-
puts "Error with effective_messaging #{notification.id} resource #{notification.current_resource&.id}: #{
|
20
|
+
puts "Error with effective_messaging #{notification.id} resource #{notification.current_resource&.id}: #{notification.errors.inspect}"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|