vmail 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,15 +56,21 @@ module Vmail
56
56
  puts "query: #{query.inspect}"
57
57
 
58
58
  buffer_file = "vmailbuffer"
59
+ # invoke vim
60
+ vimscript = File.expand_path("../vmail.vim", __FILE__)
61
+ vim_command = "DRB_URI=#{drb_uri} VMAIL_CONTACTS_FILE=#{contacts_file} VMAIL_MAILBOX=#{String.shellescape(mailbox)} VMAIL_QUERY=#{String.shellescape(query.join(' '))} #{vim} -S #{vimscript} #{buffer_file}"
62
+ puts vim_command
63
+
59
64
  puts "using buffer file: #{buffer_file}"
60
65
  File.open(buffer_file, "w") do |file|
66
+ file.puts "vmail starting with values:"
67
+ file.puts "- drb uri: #{drb_uri}"
68
+ file.puts "- mailbox: #{mailbox}"
69
+ file.puts "- query: #{query.join(' ')}"
70
+ file.puts
61
71
  file.puts "fetching messages. please wait..."
62
72
  end
63
73
 
64
- # invoke vim
65
- vimscript = File.expand_path("../vmail.vim", __FILE__)
66
- vim_command = "DRB_URI=#{drb_uri} VMAIL_CONTACTS_FILE=#{contacts_file} VMAIL_MAILBOX=#{String.shellescape(mailbox)} VMAIL_QUERY=#{String.shellescape(query.join(' '))} #{vim} -S #{vimscript} #{buffer_file}"
67
- puts vim_command
68
74
  system(vim_command)
69
75
 
70
76
  if vim == 'mvim'
@@ -75,7 +81,7 @@ module Vmail
75
81
 
76
82
  puts "closing imap connection"
77
83
  begin
78
- Timeout::timeout(5) do
84
+ Timeout::timeout(10) do
79
85
  $gmail.close
80
86
  end
81
87
  rescue Timeout::Error
@@ -56,8 +56,11 @@ module Vmail
56
56
  reconnect_if_necessary do
57
57
  log @imap.select(mailbox)
58
58
  end
59
+ log "done"
59
60
  @mailbox = mailbox
61
+ log "getting mailbox status"
60
62
  get_mailbox_status
63
+ log "getting highest message id"
61
64
  get_highest_message_id
62
65
  return "OK"
63
66
  end
@@ -746,7 +749,7 @@ trap("INT") {
746
749
  require 'timeout'
747
750
  puts "closing imap connection"
748
751
  begin
749
- Timeout::timeout(5) do
752
+ Timeout::timeout(10) do
750
753
  $gmail.close
751
754
  end
752
755
  rescue Timeout::Error
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.7.7"
2
+ VERSION = "0.7.8"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 7
9
- version: 0.7.7
8
+ - 8
9
+ version: 0.7.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi