effective_memberships 0.3.12 → 0.3.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38134acc9619d9ea0404332803f0c17535fee985688ddcc628db39c1cbf9987c
|
4
|
+
data.tar.gz: 781c42e6cdeb6c501aa696c1a13bc9917db90c5090b05a845754b2547b4a9689
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ea602b5671e84066f96d77d996c08f6524ff46659ff1ede3b0b730a133c95693aa83b1e4dbf837b06f271c8d01ee73fa9c1c44528a2fd4bb3b3e10123e60888
|
7
|
+
data.tar.gz: dc6909b2b20ef4db2200be6cd8bcbf2bcc2ea5492e2c745ae64b48158b4092b78db8305b43d0ae46f2fa800e41767bbb1faf9ad13a9547b0676b3dd8ff283520
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Effective
|
2
2
|
class MembershipsMailer < EffectiveMemberships.parent_mailer_class
|
3
|
-
|
3
|
+
|
4
|
+
include EffectiveEmailTemplatesMailer if EffectiveMemberships.use_effective_email_templates
|
4
5
|
|
5
6
|
default from: -> { EffectiveMemberships.mailer_sender }
|
6
|
-
layout -> { EffectiveMemberships.mailer_layout
|
7
|
+
layout -> { EffectiveMemberships.mailer_layout }
|
7
8
|
|
8
9
|
def applicant_completed(resource, opts = {})
|
9
10
|
@assigns = assigns_for(resource)
|
@@ -26,27 +26,20 @@ EffectiveMemberships.setup do |config|
|
|
26
26
|
# When false, hide the reviewed state entirely
|
27
27
|
# config.applicant_reviews = false
|
28
28
|
|
29
|
-
# Mailer
|
29
|
+
# Mailer Settings
|
30
|
+
# Please see config/initializers/effective_resources.rb for default effective_* gem mailer settings
|
31
|
+
#
|
30
32
|
# Configure the class responsible to send e-mails.
|
31
33
|
# config.mailer = 'Effective::MembershipsMailer'
|
32
|
-
|
33
|
-
#
|
34
|
-
#
|
35
|
-
|
36
|
-
#
|
37
|
-
# config.
|
38
|
-
|
39
|
-
# Default
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
config.mailer_sender = "no-reply@example.com"
|
44
|
-
|
45
|
-
# Send Admin correspondence To
|
46
|
-
config.mailer_admin = "admin@example.com"
|
47
|
-
|
48
|
-
# Will work with effective_email_templates gem:
|
49
|
-
# - The audit and audit review email content will be preopulated based off the template
|
50
|
-
# - Uses an EmailTemplatesMailer mailer instead of ActionMailer::Base for default parent_mailer
|
51
|
-
config.use_effective_email_templates = false
|
34
|
+
#
|
35
|
+
# Override effective_resource mailer defaults
|
36
|
+
#
|
37
|
+
# config.parent_mailer = nil # The parent class responsible for sending emails
|
38
|
+
# config.deliver_method = nil # The deliver method, deliver_later or deliver_now
|
39
|
+
# config.mailer_layout = nil # Default mailer layout
|
40
|
+
# config.mailer_sender = nil # Default From value
|
41
|
+
# config.mailer_admin = nil # Default To value for Admin correspondence
|
42
|
+
|
43
|
+
# Will work with effective_email_templates gem
|
44
|
+
config.use_effective_email_templates = true
|
52
45
|
end
|
@@ -50,17 +50,6 @@ module EffectiveMemberships
|
|
50
50
|
mailer&.constantize || Effective::MembershipsMailer
|
51
51
|
end
|
52
52
|
|
53
|
-
def self.parent_mailer_class
|
54
|
-
return parent_mailer.constantize if parent_mailer.present?
|
55
|
-
|
56
|
-
if use_effective_email_templates
|
57
|
-
require 'effective_email_templates'
|
58
|
-
Effective::EmailTemplatesMailer
|
59
|
-
else
|
60
|
-
ActionMailer::Base
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
53
|
def self.fee_types
|
65
54
|
required = ['Applicant', 'Prorated', 'Discount', 'Renewal', 'Late', 'Admin']
|
66
55
|
additional = Array(additional_fee_types)
|
@@ -73,21 +62,4 @@ module EffectiveMemberships
|
|
73
62
|
['Admin']
|
74
63
|
end
|
75
64
|
|
76
|
-
def self.send_email(email, *args)
|
77
|
-
raise('expected args to be an Array') unless args.kind_of?(Array)
|
78
|
-
|
79
|
-
if defined?(Tenant)
|
80
|
-
tenant = Tenant.current || raise('expected a current tenant')
|
81
|
-
args.last.kind_of?(Hash) ? args.last.merge!(tenant: tenant) : args << { tenant: tenant }
|
82
|
-
end
|
83
|
-
|
84
|
-
deliver_method = EffectiveMemberships.deliver_method || EffectiveResources.deliver_method
|
85
|
-
|
86
|
-
begin
|
87
|
-
EffectiveMemberships.mailer_class.send(email, *args).send(deliver_method)
|
88
|
-
rescue => e
|
89
|
-
raise if Rails.env.development? || Rails.env.test?
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_memberships
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.13
|
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: 2022-03-
|
11
|
+
date: 2022-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -410,7 +410,6 @@ files:
|
|
410
410
|
- app/views/effective/memberships_mailer/applicant_declined.liquid
|
411
411
|
- app/views/effective/memberships_mailer/applicant_missing_info.liquid
|
412
412
|
- app/views/effective/memberships_mailer/applicant_reference_notification.liquid
|
413
|
-
- app/views/layouts/effective_memberships_mailer_layout.html.haml
|
414
413
|
- config/effective_memberships.rb
|
415
414
|
- config/routes.rb
|
416
415
|
- db/migrate/01_create_effective_memberships.rb.erb
|