winton-active_wrapper 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -18,7 +18,7 @@ require 'rubygems'
18
18
  require 'active_wrapper'
19
19
 
20
20
  $db, $log, $mail = ActiveWrapper.setup(
21
- :base => File.dirname('__FILE__'),
21
+ :base => File.dirname(__FILE__),
22
22
  :env => 'development',
23
23
  :log => 'custom',
24
24
  :stdout => true
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{active_wrapper}
5
- s.version = "0.1.5"
5
+ s.version = "0.1.6"
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"]
9
- s.date = %q{2009-07-03}
9
+ s.date = %q{2009-07-28}
10
10
  s.email = %q{mail@wintoni.us}
11
11
  s.extra_rdoc_files = ["README.markdown"]
12
12
  s.files = ["active_wrapper.gemspec", "gemspec.rb", "lib", "lib/active_wrapper", "lib/active_wrapper/db.rb", "lib/active_wrapper/log.rb", "lib/active_wrapper/mail.rb", "lib/active_wrapper/tasks.rb", "lib/active_wrapper.rb", "MIT-LICENSE", "Rakefile", "README.markdown", "resources", "resources/migration.template", "spec", "spec/spec.opts", "spec/spec_helper.rb"]
data/gemspec.rb CHANGED
@@ -15,5 +15,5 @@ GEM_SPEC = Gem::Specification.new do |s|
15
15
  s.name = GEM_NAME
16
16
  s.platform = Gem::Platform::RUBY
17
17
  s.require_path = "lib"
18
- s.version = "0.1.5"
18
+ s.version = "0.1.6"
19
19
  end
@@ -11,18 +11,21 @@ module ActiveWrapper
11
11
 
12
12
  if @env == 'test'
13
13
  ActionMailer::Base.delivery_method = :test
14
- elsif File.exists?(path)
15
- @config = YAML::load(File.open(path))
16
- if @config && @config = @config[@env]
17
-
18
- @config = @config.to_options
19
- @config[:imap] = @config[:imap].to_options if @config[:imap]
20
- @config[:smtp] = @config[:smtp].to_options if @config[:smtp]
21
- if @config[:smtp]
22
- ActionMailer::Base.delivery_method = :smtp
23
- ActionMailer::Base.smtp_settings = @config[:smtp]
14
+ else
15
+ @config[:smtp] = options[:smtp]
16
+ @config[:imap] = options[:imap]
17
+ if File.exists?(path)
18
+ @config = YAML::load(File.open(path))
19
+ if @config && @config = @config[@env]
20
+ @config = @config.to_options
21
+ @config[:imap] = @config[:imap].to_options unless @config[:imap]
22
+ @config[:smtp] = @config[:smtp].to_options unless @config[:smtp]
24
23
  end
25
24
  end
25
+ if @config[:smtp]
26
+ ActionMailer::Base.delivery_method = :smtp
27
+ ActionMailer::Base.smtp_settings = @config[:smtp]
28
+ end
26
29
  end
27
30
  end
28
31
 
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-03 00:00:00 -07:00
12
+ date: 2009-07-28 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -60,6 +60,7 @@ files:
60
60
  - spec/spec_helper.rb
61
61
  has_rdoc: false
62
62
  homepage: http://github.com/winton/active_wrapper
63
+ licenses:
63
64
  post_install_message:
64
65
  rdoc_options: []
65
66
 
@@ -80,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
81
  requirements: []
81
82
 
82
83
  rubyforge_project:
83
- rubygems_version: 1.2.0
84
+ rubygems_version: 1.3.5
84
85
  signing_key:
85
86
  specification_version: 2
86
87
  summary: Wraps ActiveRecord and Logger for use in non-Rails environments