pony 1.2 → 1.3
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.
- data/README.rdoc +4 -0
- data/lib/pony.rb +4 -0
- data/pony.gemspec +1 -1
- data/spec/pony_spec.rb +5 -0
- metadata +4 -18
data/README.rdoc
CHANGED
@@ -78,6 +78,7 @@ Options passed pretty much directly to Mail
|
|
78
78
|
html_body # for sending html-formatted email
|
79
79
|
subject
|
80
80
|
charset # In case you need to send in utf-8 or similar
|
81
|
+
text_part_charset # for multipart messages, set the charset of the text part
|
81
82
|
attachments # see Attachments section above
|
82
83
|
headers # see Custom headers section above
|
83
84
|
message_id
|
@@ -133,6 +134,9 @@ mailing list: ponyrb@googlegroups.com
|
|
133
134
|
|
134
135
|
== Releases
|
135
136
|
|
137
|
+
1.3
|
138
|
+
* Add new option :text_part_charset, which allows you to specify the charset for the text portion
|
139
|
+
|
136
140
|
1.2
|
137
141
|
* Remove limitations on :via, and let mail handle it (this means you can say things like :via => test)
|
138
142
|
* Add reply-to option and a bundler file
|
data/lib/pony.rb
CHANGED
@@ -219,6 +219,10 @@ module Pony
|
|
219
219
|
|
220
220
|
mail.charset = options[:charset] if options[:charset] # charset must be set after setting content_type
|
221
221
|
|
222
|
+
if mail.multipart? && options[:text_part_charset]
|
223
|
+
mail.text_part.charset = options[:text_part_charset]
|
224
|
+
end
|
225
|
+
|
222
226
|
mail
|
223
227
|
end
|
224
228
|
|
data/pony.gemspec
CHANGED
data/spec/pony_spec.rb
CHANGED
@@ -82,6 +82,11 @@ describe Pony do
|
|
82
82
|
mail.charset.should == 'UTF-8'
|
83
83
|
end
|
84
84
|
|
85
|
+
it "text_part_charset" do
|
86
|
+
mail = Pony.build_mail(:attachments => {"foo.txt" => "content of foo.txt"}, :body => 'test', :text_part_charset => 'ISO-2022-JP')
|
87
|
+
mail.text_part.charset.should == 'ISO-2022-JP'
|
88
|
+
end
|
89
|
+
|
85
90
|
it "default charset" do
|
86
91
|
Pony.build_mail(:body => 'body').charset.should == 'UTF-8'
|
87
92
|
Pony.build_mail(:body => 'body', :content_type => 'text/html').charset.should == 'UTF-8'
|
metadata
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 2
|
8
|
-
version: "1.2"
|
4
|
+
prerelease:
|
5
|
+
version: "1.3"
|
9
6
|
platform: ruby
|
10
7
|
authors:
|
11
8
|
- Adam Wiggins
|
@@ -14,7 +11,7 @@ autorequire:
|
|
14
11
|
bindir: bin
|
15
12
|
cert_chain: []
|
16
13
|
|
17
|
-
date: 2011-
|
14
|
+
date: 2011-06-23 00:00:00 -07:00
|
18
15
|
default_executable:
|
19
16
|
dependencies:
|
20
17
|
- !ruby/object:Gem::Dependency
|
@@ -25,9 +22,6 @@ dependencies:
|
|
25
22
|
requirements:
|
26
23
|
- - ">"
|
27
24
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 2
|
30
|
-
- 0
|
31
25
|
version: "2.0"
|
32
26
|
type: :runtime
|
33
27
|
version_requirements: *id001
|
@@ -39,10 +33,6 @@ dependencies:
|
|
39
33
|
requirements:
|
40
34
|
- - ">="
|
41
35
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 2
|
44
|
-
- 0
|
45
|
-
- 0
|
46
36
|
version: 2.0.0
|
47
37
|
type: :development
|
48
38
|
version_requirements: *id002
|
@@ -76,21 +66,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
66
|
requirements:
|
77
67
|
- - ">="
|
78
68
|
- !ruby/object:Gem::Version
|
79
|
-
segments:
|
80
|
-
- 0
|
81
69
|
version: "0"
|
82
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
71
|
none: false
|
84
72
|
requirements:
|
85
73
|
- - ">="
|
86
74
|
- !ruby/object:Gem::Version
|
87
|
-
segments:
|
88
|
-
- 0
|
89
75
|
version: "0"
|
90
76
|
requirements: []
|
91
77
|
|
92
78
|
rubyforge_project: pony
|
93
|
-
rubygems_version: 1.
|
79
|
+
rubygems_version: 1.6.2
|
94
80
|
signing_key:
|
95
81
|
specification_version: 3
|
96
82
|
summary: "Send email in one command: Pony.mail(:to => 'someone@example.com', :body => 'hello')"
|