active_wrapper 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
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.2.6"
22
+ s.version = "0.2.7"
23
23
  end
@@ -7,6 +7,7 @@ module ActiveWrapper
7
7
  @base = options[:base]
8
8
  @config = {
9
9
  :smtp => options[:smtp] || {},
10
+ :sendmail => options[:sendmail] || nil,
10
11
  :imap => options[:imap] || {}
11
12
  }
12
13
  @env = options[:env].to_s
@@ -18,11 +19,14 @@ module ActiveWrapper
18
19
  if yaml && yaml[@env]
19
20
  yaml = yaml[@env].to_options
20
21
  @config[:imap] = yaml[:imap].to_options if yaml[:imap]
22
+ @config[:sendmail] = yaml[:sendmail] if !yaml[:sendmail].nil?
21
23
  @config[:smtp] = yaml[:smtp].to_options if yaml[:smtp]
22
24
  end
23
25
  end
24
26
  if @env == 'test'
25
27
  ActionMailer::Base.delivery_method = :test
28
+ elsif @config[:sendmail]
29
+ ActionMailer::Base.delivery_method = :sendmail
26
30
  elsif @config[:smtp]
27
31
  ActionMailer::Base.delivery_method = :smtp
28
32
  ActionMailer::Base.smtp_settings = @config[:smtp]
@@ -12,6 +12,7 @@ describe ActiveWrapper::Db do
12
12
  it "should set instance variables" do
13
13
  $mail.base.should =~ %r{active_wrapper/spec/example_project}
14
14
  $mail.config.should == {
15
+ :sendmail => false,
15
16
  :smtp => {
16
17
  :address => "smtp.gmail.com",
17
18
  :authentication => :plain,
@@ -13,4 +13,5 @@ test:
13
13
  password: password
14
14
  port: 587
15
15
  enable_starttls_auto: true
16
- user_name: test@mydomain.com
16
+ user_name: test@mydomain.com
17
+ sendmail: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
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: 2010-04-08 00:00:00 -07:00
12
+ date: 2010-04-19 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency