winton-active_wrapper 0.1.8 → 0.1.9

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{active_wrapper}
5
- s.version = "0.1.8"
5
+ s.version = "0.1.9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Winton Welsh"]
data/gemspec.rb CHANGED
@@ -19,5 +19,5 @@ GEM_SPEC = Gem::Specification.new do |s|
19
19
  s.name = GEM_NAME
20
20
  s.platform = Gem::Platform::RUBY
21
21
  s.require_path = "lib"
22
- s.version = "0.1.8"
22
+ s.version = "0.1.9"
23
23
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winton-active_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh