mailcvt 0.2.39 → 0.2.40

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.
data/lib/encoded_word.rb CHANGED
@@ -28,14 +28,19 @@ class EncodedWord
28
28
  date = parts[0]
29
29
  subject = parts[2]
30
30
  from = parts[3]
31
- to = parts[4].gsub("\a", ';')
32
- cc = parts[5].gsub("\a", ';')
33
- attach = parts[6].gsub("\a", ';')
31
+ to = to_csv_column(parts[4])
32
+ cc = to_csv_column(parts[5])
33
+ attach = to_csv_column(parts[6])
34
34
  out.puts %Q("#{key}","","","#{date}","#{from}","#{to}","#{cc}","","#{subject}","#{attach}")
35
35
  end
36
36
  end
37
37
  end
38
38
  end
39
+
40
+ def to_csv_column(str)
41
+ return '' unless str and str.length > 0
42
+ str.gsub("\a", ';')
43
+ end
39
44
 
40
45
  def decode_all_mlog
41
46
  Dir.glob(File.join(@inputdir, File.join('**', '*.mlog'))).select do |f|
@@ -1,3 +1,3 @@
1
1
  module Mailcvt
2
- VERSION = '0.2.39'
2
+ VERSION = '0.2.40'
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.2.39
4
+ version: 0.2.40
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: