mail-iso-2022-jp 2.0.5 → 2.0.6
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/mail-iso-2022-jp/common_methods_for_field.rb +9 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2c9541e5d4f8adeef91dd5da53d336039c996a3
|
4
|
+
data.tar.gz: d3c8f66cfb1533374f9e200e83c7cab22d3056d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4645bbf04262c6edc4d83d2e42face5f625bb0bd218c8206552b4474ea7fad232418234ecb2760db13894ab5ab4e4bfc8a347ef47f2d3f4fc811ac0af004bca4
|
7
|
+
data.tar.gz: 22e5305893e60297097d222b79824170cb18e001cbfec04a21a85791c84adc964957419b6fdc29da8e500b6fbd152e14b014c97dff64c248b949e528299b07e6
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ module Mail
|
|
11
11
|
|
12
12
|
def b_value_encode(string)
|
13
13
|
string.split(' ').map do |s|
|
14
|
-
if s =~ /\e/
|
14
|
+
if s =~ /\e/ || s == "\"" || start_with_specials?(s) || end_with_specials?(s)
|
15
15
|
encode64(s)
|
16
16
|
else
|
17
17
|
s
|
@@ -42,5 +42,13 @@ module Mail
|
|
42
42
|
value = value.to_s.gsub(/#{DOUBLE_VERTICAL_LINE}/, PARALLEL_TO)
|
43
43
|
value
|
44
44
|
end
|
45
|
+
|
46
|
+
def start_with_specials?(string)
|
47
|
+
string =~ /\A[\(\)<>\[\]:;@\\,\."]+[a-zA-Z]+\Z/
|
48
|
+
end
|
49
|
+
|
50
|
+
def end_with_specials?(string)
|
51
|
+
string =~ /\A[a-zA-Z]+[\(\)<>\[\]:;@\\,\."]+\Z/
|
52
|
+
end
|
45
53
|
end
|
46
54
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei MATSUSHITA
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: A set of patches that provides 'mail' gem with iso-2022-jp conversion capability.
|