mail-jenc 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mail/jenc/attachments_list_patch.rb +1 -1
- data/lib/mail/jenc/fields/address_field_patch.rb +1 -1
- data/lib/mail/jenc/fields/unstructured_field_patch.rb +1 -1
- data/lib/mail/jenc/message_patch.rb +1 -1
- data/lib/mail/jenc/version.rb +1 -1
- data/lib/mail/jenc.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32da2bde725e3d20eab75a686cc14d111d9be8c01f5ab2b54fbd2fa57e8b9ad0
|
4
|
+
data.tar.gz: 65503198ba6b1e3ddcfd27c495614e003c1e368ae6ec2b2935da219e9e3d6d2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd7a383c86ccfbccd98f10f7ad2b0c517afa1b2588bdbe5cf3401d3dd24c633847f11d2c5cbd2e9461d163a565aa28911e21d9de58018a4e685b03bc2042e3e8
|
7
|
+
data.tar.gz: 142b1c5a9ed24ed17f0f1ee3b0ab6a141d61156f1b824130d93a3ed8e19d6643e17c75929a235389d957993a7127e959ace8a97b7b1013f7f5400a8b87b4953f
|
@@ -6,7 +6,7 @@ module Mail
|
|
6
6
|
if name && !name.ascii_only? && name.encoding == Encoding::UTF_8 && value.is_a?(Hash) && (charset = value.delete(:header_charset))
|
7
7
|
mime_type = set_mime_type(name)
|
8
8
|
transcoded = Mail::Encodings.transcode_charset(name, name.encoding, charset)
|
9
|
-
if Jenc.rfc2231
|
9
|
+
if value.key?(:rfc2231) ? value[:rfc2231] : Jenc.rfc2231
|
10
10
|
encoded = RFC2231Encoder.encode(transcoded, charset: charset)
|
11
11
|
value[:content_disposition] ||= %Q|#{@content_disposition_type}; #{encoded}|
|
12
12
|
encoded = Mail::Encodings.b_value_encode(transcoded)
|
@@ -3,7 +3,7 @@ module Mail
|
|
3
3
|
module AddressFieldPatch
|
4
4
|
def initialize(value, charset = nil)
|
5
5
|
if Jenc.enabled?
|
6
|
-
if value.is_a?(String) && !value.ascii_only? && value.encoding == Encoding::UTF_8 && charset && charset != 'utf-8'
|
6
|
+
if value.is_a?(String) && !value.ascii_only? && value.encoding == Encoding::UTF_8 && charset && charset.downcase != 'utf-8'
|
7
7
|
list = Mail::AddressList.new(value)
|
8
8
|
list.addresses.each do |addr|
|
9
9
|
if addr.display_name && !addr.display_name.ascii_only?
|
@@ -3,7 +3,7 @@ module Mail
|
|
3
3
|
module UnstructuredFieldPatch
|
4
4
|
def initialize(name, value, charset = nil)
|
5
5
|
if Jenc.enabled?
|
6
|
-
if value.is_a?(String) && value.encoding == Encoding::UTF_8 && charset && charset != 'utf-8'
|
6
|
+
if value.is_a?(String) && value.encoding == Encoding::UTF_8 && charset && charset.downcase != 'utf-8'
|
7
7
|
if !value.ascii_only?
|
8
8
|
value = Mail::Encodings.b_value_encode(
|
9
9
|
Mail::Encodings.transcode_charset(value, value.encoding, charset)
|
@@ -3,7 +3,7 @@ module Mail
|
|
3
3
|
module MessagePatch
|
4
4
|
def body=(value)
|
5
5
|
if Jenc.enabled?
|
6
|
-
if value.is_a?(String) && !value.ascii_only? && value.encoding == Encoding::UTF_8 && charset && charset != 'utf-8' && @transport_encoding.to_s != '8bit'
|
6
|
+
if value.is_a?(String) && !value.ascii_only? && value.encoding == Encoding::UTF_8 && charset && charset.downcase != 'utf-8' && @transport_encoding.to_s != '8bit'
|
7
7
|
value = Mail::Encodings.transcode_charset(value, value.encoding, charset)
|
8
8
|
value.force_encoding('us-ascii') if @transport_encoding.to_s == '7bit'
|
9
9
|
value = @transport_encoding.encode(value)
|
data/lib/mail/jenc/version.rb
CHANGED
data/lib/mail/jenc.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-jenc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|