pony-express 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/pony-express.rb +8 -7
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
@@ -43,9 +43,10 @@ module PonyExpress
43
43
  def mail options
44
44
  via = options.delete(:via) || :smtp
45
45
  via_options = options.delete(:via_options) || {}
46
+ via = via.to_sym
46
47
 
47
48
  if TRANSPORTS.include? via
48
- case via.to_sym
49
+ case via
49
50
  when :sendmail then transport_via_sendmail build(options), via_options
50
51
  when :smtp then transport_via_smtp build(options), options[:from], options[:to], via_options
51
52
  end
@@ -86,8 +87,8 @@ module PonyExpress
86
87
  include PonyExpress
87
88
  attr_accessor :options
88
89
 
89
- def initialize opt={}
90
- @options = opt
90
+ def initialize options = {}
91
+ @options = options
91
92
  end
92
93
 
93
94
 
@@ -97,8 +98,8 @@ module PonyExpress
97
98
  # require "pony-express"
98
99
  # mail = PonyExpress::Mail.new
99
100
  # mail.add to: "burns@plant.local"
100
- def add opt
101
- @options.merge! opt
101
+ def add options
102
+ @options.merge! options
102
103
  end
103
104
 
104
105
  # Remove an option.
@@ -108,8 +109,8 @@ module PonyExpress
108
109
  # mail = PonyExpress::Mail.new
109
110
  # mail.add to: "burns@plant.local", cc: "smithers@plant.local"
110
111
  # mail.remove :cc
111
- def remove opt
112
- keys = opt.keys
112
+ def remove keys
113
+ keys = keys.map(&:to_sym)
113
114
  @options.reject! {|k, v| keys.include?(k) }
114
115
  end
115
116
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 1
9
- version: 0.8.1
8
+ - 2
9
+ version: 0.8.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bharanee Rathna
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-04-07 00:00:00 +10:00
17
+ date: 2011-04-11 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies: []
20
20