mailcvt 0.1.34 → 0.1.35

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.
Files changed (3) hide show
  1. data/lib/grep_mail.rb +10 -2
  2. data/lib/mailcvt/version.rb +1 -1
  3. metadata +3 -3
@@ -14,6 +14,8 @@ class GrepMail
14
14
  lines.each do |line|
15
15
  dlm = line[@pcontent-1]
16
16
  if dlm == ':'
17
+ finish_multiline_value
18
+
17
19
  valend = false
18
20
  k,v = keyvalue(line)
19
21
  @groups << {key: k, value: v}
@@ -21,18 +23,24 @@ class GrepMail
21
23
  next if valend
22
24
 
23
25
  v = valueonly(line)
24
- curgrp = @groups[-1]
25
26
  if v
27
+ curgrp = @groups[-1]
26
28
  curgrp[:afterlines] = [] unless curgrp[:afterlines]
27
29
  curgrp[:afterlines] << v
28
30
  else
29
31
  valend = true
30
- curgrp[:valend] = true if curgrp[:afterlines]
32
+ finish_multiline_value
31
33
  end
32
34
  end
33
35
  end
34
36
  end
35
37
 
38
+ def finish_multiline_value
39
+ return if @groups.length == 0
40
+ curgrp = @groups[-1]
41
+ curgrp[:valend] = true if curgrp[:afterlines] and curgrp[:afterlines].length < 9
42
+ end
43
+
36
44
  def keyvalue(line)
37
45
  if line[@pcontent] == 'C' and line[@pcontent] == 'o'
38
46
  dlm = ';'
@@ -1,3 +1,3 @@
1
1
  module Mailcvt
2
- VERSION = '0.1.34'
2
+ VERSION = '0.1.35'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailcvt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.34
4
+ version: 0.1.35
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -120,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  segments:
122
122
  - 0
123
- hash: -3607739446620840704
123
+ hash: -1991795484564193771
124
124
  required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  none: false
126
126
  requirements:
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  segments:
131
131
  - 0
132
- hash: -3607739446620840704
132
+ hash: -1991795484564193771
133
133
  requirements: []
134
134
  rubyforge_project:
135
135
  rubygems_version: 1.8.25