vmail 2.6.6 → 2.6.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,13 +4,16 @@ require 'vmail/query'
4
4
  require 'vmail/message_formatter'
5
5
 
6
6
  require 'iconv'
7
+ require 'versionomy'
7
8
 
8
9
  module Vmail
9
10
  extend self
10
11
 
11
12
  def start
12
13
  puts "Starting vmail #{Vmail::VERSION}"
13
- if "1.9.0" > RUBY_VERSION
14
+ required_version = Versionomy::create(:major => 1, :minor => 9, :tiny => 0)
15
+ ruby_version = Versionomy::parse(RUBY_VERSION)
16
+ if required_version > ruby_version
14
17
  puts "This version of vmail requires Ruby version 1.9.0 or higher (1.9.2 is recommended)"
15
18
  exit
16
19
  end
@@ -36,11 +39,13 @@ module Vmail
36
39
  working_dir = ENV['VMAIL_HOME'] || "#{ENV['HOME']}/.vmail/default"
37
40
  `mkdir -p #{working_dir}`
38
41
  # legacy migration: move files into VMAIL_HOME
39
- ['.vmailrc', 'vmail.log', 'vmail.db', 'vmail-contacts.txt', 'compose_message.txt', 'attachments'].each do |x|
40
- if File.size?(x)
41
- c = "mv #{x} #{working_dir}"
42
- puts c
43
- %x{#{c}}
42
+ if Dir.pwd != working_dir
43
+ ['.vmailrc', 'vmail.log', 'vmail.db', 'vmail-contacts.txt', 'compose_message.txt', 'attachments'].each do |x|
44
+ if File.size?(x)
45
+ c = "mv #{x} #{working_dir}"
46
+ puts c
47
+ %x{#{c}}
48
+ end
44
49
  end
45
50
  end
46
51
  puts "Changing working directory to #{working_dir}"
@@ -498,7 +498,7 @@ EOF
498
498
  Timeout::timeout(timeout) do
499
499
  block.call
500
500
  end
501
- rescue IOError, Errno::EADDRNOTAVAIL, Errno::ECONNRESET, Timeout::Error
501
+ rescue IOError, Errno::EADDRNOTAVAIL, Errno::ECONNRESET, Timeout::Error, Errno::ETIMEDOUT
502
502
  log "Error: #{$!}"
503
503
  log "Attempting to reconnect"
504
504
  close
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.6.6'
2
+ VERSION = '2.6.7'
3
3
  end
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency 'highline', '>= 1.6.1'
26
26
  s.add_dependency 'sequel', '>= 3.24.1'
27
27
  s.add_dependency 'sqlite3', '>= 1.3.3'
28
+ s.add_dependency 'versionomy', '>= 0.4.4'
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.6
4
+ version: 2.6.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-16 00:00:00.000000000 Z
12
+ date: 2012-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mail
@@ -75,6 +75,22 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: 1.3.3
78
+ - !ruby/object:Gem::Dependency
79
+ name: versionomy
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 0.4.4
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 0.4.4
78
94
  description: Manage your email with Vim
79
95
  email:
80
96
  - dhchoi@gmail.com