vmail 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -453,6 +453,9 @@ EOF
453
453
  end
454
454
 
455
455
  def log(string)
456
+ if string.is_a?(::Net::IMAP::TaggedResponse)
457
+ string = string.raw_data
458
+ end
456
459
  @logger.debug string
457
460
  end
458
461
 
@@ -32,7 +32,7 @@ module Vmail
32
32
  log "- Query got #{@ids.size} results; max seqno: #{self.max_seqno}"
33
33
  clear_cached_message
34
34
 
35
- select_ids = search_query? ? @ids[-@limit,@limit] : @ids
35
+ select_ids = (search_query? ? @ids[[-@limit, 0].max, @limit] : @ids)
36
36
 
37
37
  if select_ids.size > @limit
38
38
  raise "Too many messages to fetch headers for"
@@ -49,6 +49,7 @@ module Vmail
49
49
  end
50
50
  rescue
51
51
  log "ERROR:\n#{$!.inspect}\n#{$!.backtrace.join("\n")}"
52
+ "Sorry there was an error. Please check vmail.log."
52
53
  end
53
54
 
54
55
  def search_query?
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.0.6'
2
+ VERSION = '2.0.7'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vmail
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.6
5
+ version: 2.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi