no_notifier_needed 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.3
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 = base_send_hash(template)
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
- def base_send_hash(template)
15
- base = {}
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
- base[:from] = "#{base.delete(:from_name)} <#{base.delete(:from_email)}>"
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)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "no_notifier_needed"
8
- s.version = "2.2.3"
8
+ s.version = "2.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert R. Meyer"]
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.3
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: -2111440459372589073
261
+ hash: -1858574740547094975
262
262
  required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  none: false
264
264
  requirements: