card-mod-email 0.11.1 → 0.11.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/abstract/email_field.rb +1 -2
- data/set/abstract/test_context.rb +1 -0
- data/set/all/email_text.rb +0 -1
- data/set/right/html_message.rb +1 -0
- data/set/type/email_template.rb +4 -3
- data/set/type/email_template/email_config.rb +3 -1
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d076f4ba3c9d997699807f62334ba1dd36954bcf68250fb8f7ee241b9842489c
|
4
|
+
data.tar.gz: 5e895011086c10d2b70732f33b5da115608a5e51b4395b3981356b628276d090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c36790dc112e5c10a5c7cc5a4f10bceba583b5ae8505dbc168311daefcd66173fc5c497a363d92398c6bc3bde38abf431bae1d62e2d0e4e4fe5092e148a538da
|
7
|
+
data.tar.gz: d1b9d4665ef3360c1d2c088f0ecfb82904055e457ddfacb711d9267d6ae6b27c63c7c9b57c6ba6cb08e686f14c347a7874e61df385d70f17c6e55e7ded331c68
|
data/set/abstract/email_field.rb
CHANGED
data/set/all/email_text.rb
CHANGED
data/set/right/html_message.rb
CHANGED
data/set/type/email_template.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
def clean_html?
|
3
2
|
false
|
4
3
|
end
|
@@ -6,8 +5,8 @@ end
|
|
6
5
|
def deliver context=nil, fields={}, opts={}
|
7
6
|
mail = format.mail context, fields, opts
|
8
7
|
mail.deliver
|
9
|
-
rescue Net::SMTPError =>
|
10
|
-
errors.add :exception,
|
8
|
+
rescue Net::SMTPError => e
|
9
|
+
errors.add :exception, e.message
|
11
10
|
end
|
12
11
|
|
13
12
|
format do
|
@@ -72,6 +71,7 @@ format do
|
|
72
71
|
|
73
72
|
def add_attachments mail, list
|
74
73
|
return unless list.present?
|
74
|
+
|
75
75
|
each_valid_attachment list do |file, index|
|
76
76
|
mail.add_file filename: attachment_name(file, index),
|
77
77
|
content: File.read(file.path)
|
@@ -81,6 +81,7 @@ format do
|
|
81
81
|
def each_valid_attachment list
|
82
82
|
list.each_with_index do |cardname, index|
|
83
83
|
next unless (file = Card[cardname]&.try(:attachment))
|
84
|
+
|
84
85
|
yield file, index
|
85
86
|
end
|
86
87
|
end
|
@@ -22,6 +22,7 @@ end
|
|
22
22
|
|
23
23
|
def email_field_from_card field, auth, format_opts
|
24
24
|
return unless (field_card = fetch(field))
|
25
|
+
|
25
26
|
auth ||= field_card.updater
|
26
27
|
special_email_field_method(field, field_card, auth, format_opts) ||
|
27
28
|
standard_email_field(field, field_card, auth, format_opts)
|
@@ -30,6 +31,7 @@ end
|
|
30
31
|
def special_email_field_method field, field_card, auth, format_opts
|
31
32
|
method = "email_#{field}_field"
|
32
33
|
return unless respond_to? method
|
34
|
+
|
33
35
|
send method, field_card, auth, format_opts
|
34
36
|
end
|
35
37
|
|
@@ -73,7 +75,7 @@ def email_from_field_value conf_name, conf_email, actual_email
|
|
73
75
|
end
|
74
76
|
|
75
77
|
def configured_from_name_and_email raw_string
|
76
|
-
if raw_string =~ /(.*)
|
78
|
+
if raw_string =~ /(.*)<(.*)>/
|
77
79
|
[Regexp.last_match(1).strip, Regexp.last_match(2)]
|
78
80
|
else
|
79
81
|
[nil, raw_string]
|
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.11.
|
4
|
+
version: 0.11.6
|
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: 2021-
|
13
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.6
|
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.101.
|
28
|
+
version: 1.101.6
|
29
29
|
description: ''
|
30
30
|
email:
|
31
31
|
- info@decko.org
|
@@ -48,10 +48,15 @@ files:
|
|
48
48
|
- set/right/to.rb
|
49
49
|
- set/type/email_template.rb
|
50
50
|
- set/type/email_template/email_config.rb
|
51
|
-
homepage:
|
51
|
+
homepage: https://decko.org
|
52
52
|
licenses:
|
53
53
|
- GPL-3.0
|
54
54
|
metadata:
|
55
|
+
source_code_uri: https://github.com/decko-commons/decko
|
56
|
+
homepage_uri: https://decko.org
|
57
|
+
bug_tracker_uri: https://github.com/decko-commons/decko/issues
|
58
|
+
wiki_uri: https://decko.org
|
59
|
+
documentation_url: http://docs.decko.org/
|
55
60
|
card-mod: email
|
56
61
|
post_install_message:
|
57
62
|
rdoc_options: []
|
@@ -68,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
73
|
- !ruby/object:Gem::Version
|
69
74
|
version: '0'
|
70
75
|
requirements: []
|
71
|
-
rubygems_version: 3.
|
76
|
+
rubygems_version: 3.1.4
|
72
77
|
signing_key:
|
73
78
|
specification_version: 4
|
74
79
|
summary: Email handling
|