card-mod-email 0.16.0 → 0.18.0

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: c1f3431b7ef59c64ef0fd1b48058fbde782d9b104a6d572842a85ce16de6447c
4
- data.tar.gz: ecbc8a76053c17ff749d446713f4d7771e41f4cafcb49b4e4823eebfa002816a
3
+ metadata.gz: 33ada9de60e89494fac14277a62c4bc1f6a4d419eb78cc397611cb8196de8267
4
+ data.tar.gz: 18cdb18f4e696bb3ebf3509532deb59c646bdb4a1f254ac0f802c03c4161b9f3
5
5
  SHA512:
6
- metadata.gz: 8a60a69f91b3d69daa7dea84606c943590026868bd9349a78da4f99fa804165b5241417556915583c707c11b6fa55c1fa48e3c107697b4132b5db5d3aa902816
7
- data.tar.gz: 8e039b13c0879771d122371064bc515f00eaf9ba183f915ecaef975b7123d4a82000d0f19ade0dc9ba42b7bbfa0fac57efdb1bd11dd0227a1c645efdb83a0f1b
6
+ metadata.gz: e18a02aa21f2486eed3c110fc930c739632ec8bd4634ce417bf9622091e8c5c0dd37cd3b4c0fd40034dd76df8b2ebabe527ea11ee19f46f71b020363508cb1f3
7
+ data.tar.gz: 49bf33d014116019473d61c25cb595b0518051e2a0b0286ae9e227290e0bf573171ea656926d4cb547f942fcba21416d1c449c05a875e595eb4049b380b5b9fd
data/config/admin.yml ADDED
@@ -0,0 +1,3 @@
1
+ cardtypes:
2
+ template:
3
+ - email_template
@@ -1,5 +1,5 @@
1
1
  format :html do
2
- view :core do
2
+ view :core, cache: :never do
3
3
  return super() if voo.hide? :test_context
4
4
 
5
5
  card.with_context test_context_card do
@@ -20,6 +20,19 @@ def email_config context, fields={}, opts={}
20
20
  config.select { |_k, v| v.present? }
21
21
  end
22
22
 
23
+ # html messages return procs because image attachments can't be properly rendered
24
+ # without a mail object. (which isn't available at initial config time)
25
+ def email_html_message_field message_card, auth, format_opts
26
+ proc do |mail|
27
+ Auth.as auth do
28
+ format_opts = format_opts.merge format: :email_html, active_mail: mail
29
+ message_card.format(format_opts).email_content @active_email_context
30
+ end
31
+ end
32
+ end
33
+
34
+ private
35
+
23
36
  def email_field_from_card field, auth, format_opts
24
37
  return unless (field_card = fetch(field))
25
38
 
@@ -43,17 +56,6 @@ def standard_email_field field, field_card, auth, format_opts
43
56
  end
44
57
  end
45
58
 
46
- # html messages return procs because image attachments can't be properly rendered
47
- # without a mail object. (which isn't available at initial config time)
48
- def email_html_message_field message_card, auth, format_opts
49
- proc do |mail|
50
- Auth.as auth do
51
- format_opts = format_opts.merge format: :email_html, active_mail: mail
52
- message_card.format(format_opts).email_content @active_email_context
53
- end
54
- end
55
- end
56
-
57
59
  # whenever a default "from" field is configured in Card::Mailer, emails are always
58
60
  # actually "from" that address
59
61
  def safe_from_and_reply_to! config
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-11-18 00:00:00.000000000 Z
13
+ date: 2024-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.106.0
21
+ version: 1.108.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.106.0
28
+ version: 1.108.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-search
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.16.0
35
+ version: 0.18.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.16.0
42
+ version: 0.18.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-list
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.16.0
49
+ version: 0.18.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.16.0
56
+ version: 0.18.0
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-permissions
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.16.0
63
+ version: 0.18.0
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.16.0
70
+ version: 0.18.0
71
71
  description: ''
72
72
  email:
73
73
  - info@decko.org
@@ -77,6 +77,7 @@ extra_rdoc_files: []
77
77
  files:
78
78
  - LICENSE
79
79
  - README.md
80
+ - config/admin.yml
80
81
  - data/real.yml
81
82
  - data/test.yml
82
83
  - lib/card/format/email_html_format.rb
@@ -96,7 +97,7 @@ files:
96
97
  - set/type/email_template/email_config.rb
97
98
  homepage: https://decko.org
98
99
  licenses:
99
- - GPL-3.0
100
+ - GPL-3.0-or-later
100
101
  metadata:
101
102
  source_code_uri: https://github.com/decko-commons/decko
102
103
  homepage_uri: https://decko.org
@@ -113,14 +114,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
114
  requirements:
114
115
  - - ">="
115
116
  - !ruby/object:Gem::Version
116
- version: '2.5'
117
+ version: '3.0'
117
118
  required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  requirements:
119
120
  - - ">="
120
121
  - !ruby/object:Gem::Version
121
122
  version: '0'
122
123
  requirements: []
123
- rubygems_version: 3.4.10
124
+ rubygems_version: 3.5.7
124
125
  signing_key:
125
126
  specification_version: 4
126
127
  summary: Email handling