winton-active_wrapper 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/active_wrapper.gemspec +1 -1
- data/gemspec.rb +1 -1
- data/lib/active_wrapper/mail.rb +5 -3
- metadata +1 -1
data/active_wrapper.gemspec
CHANGED
data/gemspec.rb
CHANGED
data/lib/active_wrapper/mail.rb
CHANGED
@@ -5,16 +5,18 @@ module ActiveWrapper
|
|
5
5
|
|
6
6
|
def initialize(options)
|
7
7
|
@base = options[:base]
|
8
|
-
@config = {
|
8
|
+
@config = {
|
9
|
+
:smtp => options[:smtp] || {},
|
10
|
+
:imap => options[:imap] || {}
|
11
|
+
}
|
9
12
|
@env = options[:env].to_s
|
10
13
|
|
11
14
|
path = "#{base}/config/mail.yml"
|
12
15
|
|
13
16
|
if @env == 'test'
|
14
17
|
ActionMailer::Base.delivery_method = :test
|
18
|
+
@config = nil
|
15
19
|
else
|
16
|
-
@config[:smtp] = options[:smtp] || {}
|
17
|
-
@config[:imap] = options[:imap] || {}
|
18
20
|
if File.exists?(path)
|
19
21
|
yaml = YAML::load(File.open(path))
|
20
22
|
if yaml && yaml = yaml[@env].to_options
|