vmail 2.9.6 → 2.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94e6d7a842e09b291775138ece6f76d02c5a7e42
4
- data.tar.gz: df77cc1a9d7a194eba6fa9f7a159e24114f216c9
3
+ metadata.gz: b47d469a46f5db2f944e7cb33eb0850605ba434d
4
+ data.tar.gz: 2d383fa0e440ffb0a0c84c410a0c2867ac67e431
5
5
  SHA512:
6
- metadata.gz: 0eb456a489adfc50ab56499693245b35e34ced7040a6ef7d96aa4d227c37733392cc11ca10a7ec9622ae97a435299319b673ab0cb3afca63c9ba251a1c210e2d
7
- data.tar.gz: 1a758d8b8694f266e1bb23a3b519dac93c8d579c57c335428623652dd357db401b8117fc3c42d86f566ac8fbac0b37e57fc294959fabb6dd983542cf65c93bb1
6
+ metadata.gz: ea2bca28b5c5ec53ee46005348eab8a7e42e14adb4b139bc4823ed7ba8ff3f686e207d5b8ff0d98484391a8e633f6822c1ee9358c72dfa63c247e920b7cbb37b
7
+ data.tar.gz: 2042a40d3cb8734f908d30f840dc4907e25f12c51f5147f0e000d34019ae105e441f92aa1cc444816f7cc7aac3c10089c8cde35d82e764f8bb04658320a9f963
@@ -234,12 +234,12 @@ To check for new messages in the current mailbox, press `u` in normal
234
234
  mode if you're in the message list window or `,u` if you are in the
235
235
  message window. Watch the status line.
236
236
 
237
- If you have `notify-send` (Linux) or `growlnotify` (OS X) installed on
238
- your system, Vmail can also poll your INBOX every 30 seconds for new
239
- messages. If it detects a new message, it will alert you through your
240
- notification program. **NOTE**: This is an alert mechanism only;
241
- you will still have to manually check for new messages in the Vmail
242
- interface to force the new messages to display.
237
+ If you have `notify-send` (Linux) or `growlnotify` (OS X) installed on your
238
+ system, Vmail can also poll your INBOX every 30 seconds for new messages. If it
239
+ detects a new message, it will alert you through your notification program.
240
+ **NOTE**: If vim is compiled with the `clientserver` flag, the new messages
241
+ will be displayed automatically. Else, one will have to manually check for
242
+ new messages(`u`) to get them displayed.
243
243
 
244
244
  To enable automatic inbox polling put the line `polling: true` in your `.vmailrc`.
245
245
 
@@ -48,6 +48,10 @@ module Vmail
48
48
  @config ||= options.config
49
49
  end
50
50
 
51
+ def has_clientserver?
52
+ @has_clientserver ||= system("#{ vim } --version | grep +clientserver")
53
+ end
54
+
51
55
  def change_directory_to_vmail_home
52
56
  working_dir = ENV['VMAIL_HOME'] || "#{ ENV['HOME'] }/.vmail/default"
53
57
  `mkdir -p #{ working_dir }`
@@ -145,7 +149,6 @@ module Vmail
145
149
  def start_vim(mailbox, query_string)
146
150
  vimscript = File.expand_path("../vmail.vim", __FILE__)
147
151
  vimopts = config['vim_opts']
148
- server_name = "VMAIL:#{ config['username'] }"
149
152
  contacts_file = options.contacts_file
150
153
 
151
154
  vim_options = {
@@ -155,7 +158,7 @@ module Vmail
155
158
  'VMAIL_QUERY' => %("#{ query_string }")
156
159
  }
157
160
 
158
- vim_command = "#{ vim } --servername #{ server_name } -S #{ vimscript } -c '#{ vimopts }' #{ BUFFER_FILE }"
161
+ vim_command = "#{ vim } #{ server_opts } -S #{ vimscript } -c '#{ vimopts }' #{ BUFFER_FILE }"
159
162
 
160
163
  STDERR.puts vim_options
161
164
  STDERR.puts vim_command
@@ -186,6 +189,12 @@ module Vmail
186
189
  def vim
187
190
  ENV['VMAIL_VIM'] || 'vim'
188
191
  end
192
+
193
+ def server_opts
194
+ return unless has_clientserver?
195
+ server_name = "VMAIL:#{ config['username'] }"
196
+ "--servername #{ server_name }"
197
+ end
189
198
  end
190
199
 
191
200
  if __FILE__ == $0
@@ -230,7 +230,7 @@ module Vmail
230
230
  self.max_seqno = ids.max
231
231
  log "- setting max_seqno to #{ self.max_seqno }"
232
232
  log "- new uids found: #{ new_ids.inspect }"
233
- update_message_list(new_ids) unless new_ids.empty?
233
+ update_message_list(new_ids) if new_ids.any? && has_clientserver?
234
234
  new_ids
235
235
  end
236
236
 
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.9.6'
2
+ VERSION = '2.9.7'
3
3
  end
metadata CHANGED
@@ -1,113 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.6
4
+ version: 2.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-16 00:00:00.000000000 Z
11
+ date: 2016-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.2'
20
- - - ">="
20
+ - - '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.2.12
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.2'
30
- - - ">="
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.2.12
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: highline
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: '1.6'
40
- - - ">="
40
+ - - '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 1.6.1
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: '1.6'
50
- - - ">="
50
+ - - '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 1.6.1
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: sequel
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ~>
58
58
  - !ruby/object:Gem::Version
59
59
  version: '3.24'
60
- - - ">="
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: 3.24.1
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '3.24'
70
- - - ">="
70
+ - - '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: 3.24.1
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: sqlite3
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - "~>"
77
+ - - ~>
78
78
  - !ruby/object:Gem::Version
79
79
  version: '1.3'
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.3.3
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.3'
90
- - - ">="
90
+ - - '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: 1.3.3
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: versionomy
95
95
  requirement: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - "~>"
97
+ - - ~>
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0.4'
100
- - - ">="
100
+ - - '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: 0.4.4
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ~>
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0.4'
110
- - - ">="
110
+ - - '>='
111
111
  - !ruby/object:Gem::Version
112
112
  version: 0.4.4
113
113
  description: Manage your email with Vim
@@ -120,7 +120,7 @@ executables:
120
120
  extensions: []
121
121
  extra_rdoc_files: []
122
122
  files:
123
- - ".gitignore"
123
+ - .gitignore
124
124
  - MIT-LICENSE.txt
125
125
  - NOTES
126
126
  - README.markdown
@@ -180,17 +180,17 @@ require_paths:
180
180
  - lib
181
181
  required_ruby_version: !ruby/object:Gem::Requirement
182
182
  requirements:
183
- - - ">="
183
+ - - '>='
184
184
  - !ruby/object:Gem::Version
185
185
  version: 1.9.0
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  requirements:
188
- - - ">="
188
+ - - '>='
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project: vmail
193
- rubygems_version: 2.5.1
193
+ rubygems_version: 2.4.8
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: A Vim interface to Gmail