mail-iso-2022-jp 2.0.0 → 2.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.
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
- elsif rails_version == "edge"
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
@@ -45,7 +45,7 @@ Requirements
45
45
 
46
46
  ### Ruby ###
47
47
 
48
- * 1.8.7, 1.9.x, 2.0.0-preview2
48
+ * 1.8.7, 1.9.3, 2.0.0
49
49
 
50
50
  ### Gems ###
51
51
 
@@ -28,7 +28,11 @@ module Mail
28
28
  end
29
29
 
30
30
  def encode64(string)
31
- "=?ISO-2022-JP?B?#{Base64.encode64(string).gsub("\n", "")}?="
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.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-01-06 00:00:00.000000000 Z
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.24
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.