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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 667850ec264cb8e61ca94ac90542f91e9b89fde3
4
- data.tar.gz: a9a1d8492183806b5cf2101afb99be5f0d4b7c5a
3
+ metadata.gz: e2c9541e5d4f8adeef91dd5da53d336039c996a3
4
+ data.tar.gz: d3c8f66cfb1533374f9e200e83c7cab22d3056d2
5
5
  SHA512:
6
- metadata.gz: dc1a17482d6b752abce7f1a07cb46887130f5535179d1927e173e8bc6a1e615b318429b6d78752cd89a7902902a56078f8da55771fc70e3f7f006c07e0f15819
7
- data.tar.gz: 5e2926882440b278c3bc1f5c8e5060830541e968eeee9c1323e0eda9737fe2d2711ab3d4e3a327d3423befce37027fe26d729edd6febdb06b3a4df9b75131608
6
+ metadata.gz: 4645bbf04262c6edc4d83d2e42face5f625bb0bd218c8206552b4474ea7fad232418234ecb2760db13894ab5ab4e4bfc8a347ef47f2d3f4fc811ac0af004bca4
7
+ data.tar.gz: 22e5305893e60297097d222b79824170cb18e001cbfec04a21a85791c84adc964957419b6fdc29da8e500b6fbd152e14b014c97dff64c248b949e528299b07e6
data/README.md CHANGED
@@ -45,7 +45,7 @@ Requirements
45
45
 
46
46
  ### Ruby ###
47
47
 
48
- * 2.1, 2.2, 2.3
48
+ * 2.2, 2.3, 2.4
49
49
 
50
50
  ### Gems ###
51
51
 
@@ -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.5
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: 2016-08-01 00:00:00.000000000 Z
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.4.5.1
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.