mail-iso-2022-jp 1.0.0 → 1.0.1

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.
Files changed (3) hide show
  1. data/README.md +19 -13
  2. data/lib/mail-iso-2022-jp/patches.rb +4 -0
  3. metadata +3 -3
data/README.md CHANGED
@@ -20,25 +20,28 @@ Feature
20
20
 
21
21
  * (en)
22
22
 
23
- If you set the `charset` header to `ISO-2022-JP`, the values of `From`, `To`, and `Subject` headers
23
+ If you set the `charset` header to `ISO-2022-JP`, the values of `From`, `To`, `Cc`, and `Subject` headers
24
24
  and the text of body will be automatically converted to `ISO-2022-JP` by `NKF` module.
25
25
 
26
26
  When the `charset` header has other values, this patch has no effect.
27
27
 
28
28
  * (ja)
29
29
 
30
- chasetヘッダの値が `ISO-2022-JP` である場合、送信者(From)、宛先(To)、件名(Subject)の各ヘッダの値および
30
+ chasetヘッダの値が `ISO-2022-JP` である場合、送信者(From)、宛先(To)、Cc、件名(Subject)の各ヘッダの値および
31
31
  本文(Body)が`NKF`モジュールによって自動的に `ISO-2022-JP` に変換されます。
32
32
 
33
- charsetヘッダの値が `ISO-2022-JP` でない場合、このパッチは何の効果もありません。
33
+ charsetヘッダの値が `ISO-2022-JP` でない場合、このパッチには何の効果もありません。
34
34
 
35
35
 
36
- Environments
36
+ Requirements
37
37
  ------------
38
38
 
39
- ### Requirements ###
39
+ ### Ruby ###
40
+
41
+ * 1.8.7 or higher
42
+
43
+ ### Gems ###
40
44
 
41
- * `ruby` 1.8.7 or higher
42
45
  * `mail` 2.2.5 or higher
43
46
 
44
47
 
@@ -58,13 +61,14 @@ or run this command:
58
61
  ### Install as a Rails plugin ###
59
62
 
60
63
  $ cd RAILS_ROOT
61
- $ rails plugin install http://github.com/kuroda/mail-iso-2022-jp.git
64
+ $ rails plugin install git://github.com/kuroda/mail-iso-2022-jp.git
62
65
 
63
- ### Example ###
66
+ ### Usage ###
64
67
 
65
68
  mail = Mail.new(:charset => 'ISO-2022-JP') do
66
69
  from '山田太郎 <taro@example.com>'
67
70
  to '佐藤花子 <hanako@example.com>'
71
+ cc '事務局 <info@example.com>'
68
72
  subject '日本語件名'
69
73
  body '日本語本文'
70
74
  end
@@ -82,10 +86,13 @@ or run this command:
82
86
  NKF.nkf('-w', mail.body.encoded)
83
87
  => "日本語本文"
84
88
 
85
- ### Example for ActionMailer ###
89
+ ### Usage with ActionMailer ###
86
90
 
87
91
  class UserMailer < ActionMailer::Base
88
- default :from => "山田太郎 <bar@example.com>", :charset => 'ISO-2022-JP'
92
+ default :charset => 'ISO-2022-JP',
93
+ :from => "山田太郎 <bar@example.com>",
94
+ :cc => '事務局 <info@example.com>'
95
+
89
96
  def notice
90
97
  mail(:to => '佐藤花子 <foo@example.com>', :subject => '日本語件名') do |format|
91
98
  format.text { render :inline => '日本語本文' }
@@ -94,13 +101,12 @@ or run this command:
94
101
  end
95
102
 
96
103
 
97
-
98
104
  License
99
105
  -------
100
106
 
101
- (en) "mail-iso-2022-jp" released under the MIT license (MIT-LICENSE.txt)
107
+ (en) `mail-iso-2022-jp` is distributed under the MIT license. ([MIT-LICENSE](https://github.com/kuroda/mail-iso-2022-jp/blob/master/MIT-LICENSE))
102
108
 
103
- (ja) "mail-iso-2022-jp" MITライセンスで配布しています。 (MIT-LICENSE.txt)
109
+ (ja) `mail-iso-2022-jp` はMITライセンスで配布されています。 ([MIT-LICENSE](https://github.com/kuroda/mail-iso-2022-jp/blob/master/MIT-LICENSE))
104
110
 
105
111
 
106
112
  Special thanks
@@ -46,4 +46,8 @@ module Mail
46
46
  class ToField < StructuredField
47
47
  include FieldWithIso2022JpEncoding
48
48
  end
49
+
50
+ class CcField < StructuredField
51
+ include FieldWithIso2022JpEncoding
52
+ end
49
53
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail-iso-2022-jp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kohei MATSUHITA