pony 0.7 → 0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -0
- data/lib/pony.rb +3 -3
- data/pony.gemspec +1 -1
- data/spec/pony_spec.rb +3 -0
- metadata +25 -13
data/README.rdoc
CHANGED
data/lib/pony.rb
CHANGED
@@ -31,8 +31,8 @@ module Pony
|
|
31
31
|
def self.build_tmail(options)
|
32
32
|
mail = TMail::Mail.new
|
33
33
|
mail.to = options[:to]
|
34
|
-
mail.cc = options[:cc]
|
35
|
-
mail.bcc = options[:bcc]
|
34
|
+
mail.cc = options[:cc]
|
35
|
+
mail.bcc = options[:bcc]
|
36
36
|
mail.from = options[:from] || 'pony@unknown'
|
37
37
|
mail.subject = options[:subject]
|
38
38
|
if options[:attachments]
|
@@ -99,7 +99,7 @@ module Pony
|
|
99
99
|
else
|
100
100
|
smtp.start(o[:domain])
|
101
101
|
end
|
102
|
-
smtp.send_message tmail.to_s, tmail.from, [ tmail.to, tmail.cc, tmail.bcc ].select { |i| i != '' }
|
102
|
+
smtp.send_message tmail.to_s, tmail.from, [ tmail.to, tmail.cc, tmail.bcc ].select { |i| i && i != '' }
|
103
103
|
smtp.finish
|
104
104
|
end
|
105
105
|
end
|
data/pony.gemspec
CHANGED
data/spec/pony_spec.rb
CHANGED
@@ -124,6 +124,9 @@ Y29udGVudCBvZiBmb28ucGRm
|
|
124
124
|
it "passes cc and bcc as the list of recipients" do
|
125
125
|
@smtp.should_receive(:send_message).with("message", 'from', ['to', 'cc', 'bcc'])
|
126
126
|
Pony.transport_via_smtp(mock('tmail', :to => 'to', :cc => 'cc', :from => 'from', :to_s => 'message', :bcc => 'bcc'))
|
127
|
+
|
128
|
+
@smtp.should_receive(:send_message).with("message", 'from', ['to', 'cc'])
|
129
|
+
Pony.transport_via_smtp(mock('tmail', :to => 'to', :cc => 'cc', :from => 'from', :to_s => 'message', :bcc => nil))
|
127
130
|
end
|
128
131
|
|
129
132
|
it "only pass cc as the list of recipients" do
|
metadata
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 8
|
8
|
+
version: "0.8"
|
5
9
|
platform: ruby
|
6
10
|
authors:
|
7
11
|
- Adam Wiggins
|
@@ -10,29 +14,35 @@ autorequire:
|
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
16
|
|
13
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-12 00:00:00 -07:00
|
14
18
|
default_executable:
|
15
19
|
dependencies:
|
16
20
|
- !ruby/object:Gem::Dependency
|
17
21
|
name: tmail
|
18
|
-
|
19
|
-
|
20
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
21
24
|
requirements:
|
22
25
|
- - ~>
|
23
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 0
|
24
30
|
version: "1.0"
|
25
|
-
|
31
|
+
type: :runtime
|
32
|
+
version_requirements: *id001
|
26
33
|
- !ruby/object:Gem::Dependency
|
27
34
|
name: mime-types
|
28
|
-
|
29
|
-
|
30
|
-
version_requirements: !ruby/object:Gem::Requirement
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
38
|
- - ">="
|
33
39
|
- !ruby/object:Gem::Version
|
40
|
+
segments:
|
41
|
+
- 1
|
42
|
+
- 16
|
34
43
|
version: "1.16"
|
35
|
-
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
36
46
|
description: "Send email in one command: Pony.mail(:to => 'someone@example.com', :body => 'hello')"
|
37
47
|
email: ben.prew@gmail.com
|
38
48
|
executables: []
|
@@ -62,18 +72,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
72
|
requirements:
|
63
73
|
- - ">="
|
64
74
|
- !ruby/object:Gem::Version
|
75
|
+
segments:
|
76
|
+
- 0
|
65
77
|
version: "0"
|
66
|
-
version:
|
67
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
79
|
requirements:
|
69
80
|
- - ">="
|
70
81
|
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
71
84
|
version: "0"
|
72
|
-
version:
|
73
85
|
requirements: []
|
74
86
|
|
75
87
|
rubyforge_project: pony
|
76
|
-
rubygems_version: 1.3.
|
88
|
+
rubygems_version: 1.3.6
|
77
89
|
signing_key:
|
78
90
|
specification_version: 3
|
79
91
|
summary: "Send email in one command: Pony.mail(:to => 'someone@example.com', :body => 'hello')"
|