vmail 0.6.6 → 0.6.7

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.
@@ -10,6 +10,7 @@ require 'logger'
10
10
 
11
11
  module Vmail
12
12
  class ImapClient
13
+ DIVIDER_WIDTH = 46
13
14
 
14
15
  MailboxAliases = { 'sent' => '[Gmail]/Sent Mail',
15
16
  'all' => '[Gmail]/All Mail',
@@ -370,7 +371,7 @@ module Vmail
370
371
  size = fetch_data.attr["RFC822.SIZE"]
371
372
  @current_message = <<-EOF
372
373
  #{@mailbox} seqno:#{envelope_data[:seqno]} uid:#{uid} #{number_to_human_size size} #{format_parts_info(formatter.list_parts)}
373
- ----------------------------------------------
374
+ #{divider '-'}
374
375
  #{format_headers(formatter.extract_headers)}
375
376
 
376
377
  #{out}
@@ -520,8 +521,7 @@ EOF
520
521
  log "append to file range #{index_range.inspect} to file: #{file}"
521
522
  index_range.each do |idx|
522
523
  message = show_message(idx)
523
- divider = "#{'=' * 39}\n"
524
- File.open(file, 'a') {|f| f.puts(divider + message + "\n\n")}
524
+ File.open(file, 'a') {|f| f.puts(divider('=') + "\n" + message + "\n\n")}
525
525
  subject = (message[/^subject:(.*)/,1] || '').strip
526
526
  log "appended message '#{subject}'"
527
527
  end
@@ -575,6 +575,10 @@ EOF
575
575
  original_body + signature
576
576
  end
577
577
 
578
+ def divider(str)
579
+ str * DIVIDER_WIDTH
580
+ end
581
+
578
582
  def deliver(text)
579
583
  # parse the text. The headers are yaml. The rest is text body.
580
584
  require 'net/smtp'
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 6
9
- version: 0.6.6
8
+ - 7
9
+ version: 0.6.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi