no_notifier_needed 2.2.3 → 2.2.4
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.
- data/VERSION +1 -1
- data/lib/no_notifier_needed/translate.rb +16 -14
- data/no_notifier_needed.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.4
|
@@ -1,27 +1,29 @@
|
|
1
1
|
module NoNotifierNeeded
|
2
2
|
module Translate
|
3
3
|
def get_send_hash(template)
|
4
|
-
send_hash =
|
4
|
+
send_hash = {}
|
5
|
+
NoNotifierNeeded::Config::VALID_OPTIONS_KEYS.each do |k|
|
6
|
+
send_hash[k] = NoNotifierNeeded.send(k)
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
|
5
11
|
send_hash[:subject] = render_template_subject_type(@template)
|
12
|
+
|
6
13
|
send_hash[:to] = @to if @to
|
7
14
|
send_hash[:to] ||= @user.email if @user
|
15
|
+
send_hash[:to] ||= template.sent_to.split(',')
|
16
|
+
|
8
17
|
send_hash[:from] = @from unless @from.blank?
|
18
|
+
send_hash[:from] ||= "#{send_hash.delete(:from_name)} <#{send_hash.delete(:from_email)}>"
|
19
|
+
send_hash[:from] ||= "#{template.from_name} <#{template.from_email}>" unless template.from_name.blank? || template.from_email.blank?
|
20
|
+
|
9
21
|
send_hash[:cc] = @cc.nil? ? nil : @cc
|
10
|
-
send_hash[:reply_to] = @reply_to unless @reply_to.blank?
|
11
|
-
send_hash
|
12
|
-
end
|
13
22
|
|
14
|
-
|
15
|
-
|
16
|
-
NoNotifierNeeded::Config::VALID_OPTIONS_KEYS.each do |k|
|
17
|
-
base[k] = NoNotifierNeeded.send(k)
|
18
|
-
end
|
23
|
+
send_hash[:reply_to] = @reply_to unless @reply_to.blank?
|
24
|
+
send_hash[:reply_to] ||= "#{template.reply_to}" unless template.reply_to.blank?
|
19
25
|
|
20
|
-
|
21
|
-
base[:from] = "#{template.from_name} <#{template.from_email}>" unless template.from_name.blank? || template.from_email.blank?
|
22
|
-
base[:to] ||= template.sent_to.split(',')
|
23
|
-
base[:reply_to] = "#{template.reply_to}" unless template.reply_to.blank?
|
24
|
-
base
|
26
|
+
send_hash
|
25
27
|
end
|
26
28
|
|
27
29
|
def args_to_instance_vars(args)
|
data/no_notifier_needed.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no_notifier_needed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -258,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
segments:
|
260
260
|
- 0
|
261
|
-
hash: -
|
261
|
+
hash: -1858574740547094975
|
262
262
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
263
|
none: false
|
264
264
|
requirements:
|