mail-iso-2022-jp 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -4
- data/README.md +1 -1
- data/lib/mail-iso-2022-jp/common_methods_for_field.rb +5 -1
- data/lib/mail-iso-2022-jp/field.rb +1 -0
- metadata +3 -3
data/Gemfile
CHANGED
@@ -13,12 +13,11 @@ group :development, :test do
|
|
13
13
|
gem "bundler"
|
14
14
|
if mail_gem_version
|
15
15
|
gem "activesupport"
|
16
|
-
|
16
|
+
end
|
17
|
+
if rails_version == "edge"
|
17
18
|
gem "actionmailer", :git => "git://github.com/rails/rails.git"
|
18
19
|
elsif rails_version && rails_version.strip != ""
|
19
20
|
gem "actionmailer", rails_version
|
20
|
-
else
|
21
|
-
gem "actionmailer", ">= 3.0.0"
|
22
21
|
end
|
23
22
|
gem "rdoc", ">= 3.12"
|
24
|
-
end
|
23
|
+
end
|
data/README.md
CHANGED
@@ -28,7 +28,11 @@ module Mail
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def encode64(string)
|
31
|
-
|
31
|
+
if string.length > 0
|
32
|
+
"=?ISO-2022-JP?B?#{Base64.encode64(string).gsub("\n", "")}?="
|
33
|
+
else
|
34
|
+
string
|
35
|
+
end
|
32
36
|
end
|
33
37
|
|
34
38
|
def preprocess(value)
|
@@ -10,6 +10,7 @@ module Mail
|
|
10
10
|
raise ::Mail::InvalidEncodingError.new(
|
11
11
|
"The '#{name}' field is not encoded in UTF-8 nor in US-ASCII but in #{value.encoding}")
|
12
12
|
end
|
13
|
+
charset = 'utf-8' if value.ascii_only?
|
13
14
|
end
|
14
15
|
initialize_without_iso_2022_jp_encoding(name, value, charset)
|
15
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-iso-2022-jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-04-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mail
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 1.8.
|
115
|
+
rubygems_version: 1.8.23
|
116
116
|
signing_key:
|
117
117
|
specification_version: 3
|
118
118
|
summary: A set of patches that provides 'mail' gem with iso-2022-jp conversion capability.
|