mail-jdec 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mail/jdec/detector.rb +1 -1
- data/lib/mail/jdec/message_patch.rb +3 -1
- data/lib/mail/jdec/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7600ea968171f557f4e467372e10a7a6535d990e4623ce89fe9fe2b31a2b2e
|
4
|
+
data.tar.gz: cd62273ede16c68c13b2fa9edcb58391d76fa0cf8e8944f61837e3f83b6f00f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '098f579097cffa49a382a7678e7bb9e7321946bc791919a021528c841f6b9bbcbfdefa43fec420bd882ee5e1e2873e2bf4ab4de1034a1ccc26f310c2e787ee7c'
|
7
|
+
data.tar.gz: 35be3c8675a4accb64b7552c9aaaa604e8b3d27fa609e1e53a1fe44909368f0615ab28c0d31fc878f64b801182fdc65a12193059adf03a577e9d6060ec24f9bd
|
data/CHANGELOG.md
CHANGED
data/lib/mail/jdec/detector.rb
CHANGED
@@ -20,7 +20,7 @@ module Mail
|
|
20
20
|
def trusty?(detected)
|
21
21
|
detected.key?(:type) &&
|
22
22
|
detected.key?(:encoding) &&
|
23
|
-
detected[:confidence].to_i
|
23
|
+
detected[:confidence].to_i >= Jdec.autodetect_confidence &&
|
24
24
|
!Jdec.autodetect_skip_charsets.include?(detected[:encoding].downcase)
|
25
25
|
end
|
26
26
|
end
|
@@ -8,9 +8,11 @@ module Mail
|
|
8
8
|
detected = Detector.detect(decoded)
|
9
9
|
if detected && detected[:type] == :text
|
10
10
|
charset = detected[:encoding].downcase
|
11
|
-
decoded = Mail::Encodings.transcode_charset(decoded.dup.force_encoding(charset), charset)
|
11
|
+
decoded = Mail::Encodings.transcode_charset(decoded.dup.force_encoding(charset), charset, 'utf-8')
|
12
12
|
header[:content_type] = 'text/plain'
|
13
13
|
header[:content_type].parameters[:charset] = charset
|
14
|
+
else
|
15
|
+
decoded = Mail::Encodings.transcode_charset(decoded, decoded.encoding, 'utf-8')
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
data/lib/mail/jdec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-jdec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
|
-
rubygems_version: 3.0.
|
136
|
+
rubygems_version: 3.0.3
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: A mail patch for decoding some inproper mails
|