vmail 2.5.5 → 2.5.6

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.
@@ -84,6 +84,14 @@ You can also add an `always_cc:` key-value pair. This will pre-insert whatever
84
84
  email address you specify in the `cc:` line of any email you start composing in
85
85
  Vmail. You can also add an `always_bcc:` option that works in the same way.
86
86
 
87
+ If you want to use a shell script to print the signature, use the
88
+ `signature_script:` option instead; e.g.,
89
+
90
+ username: dhchoi@gmail.com
91
+ password: password
92
+ name: Daniel Choi
93
+ signature_script: /home/choi/bin/vmail_signature.sh
94
+
87
95
  You can add a `vim_opts:` key-value pair to run arbitrary Vim commands when Vmail starts up.
88
96
  For example, to turn on the cursorline, add this to `.vmailrc`:
89
97
 
@@ -30,7 +30,8 @@ module Vmail
30
30
  def initialize(config)
31
31
  @username, @password = config['username'], config['password']
32
32
  @name = config['name']
33
- @signature = config['signature']
33
+ @signature = config['signature']
34
+ @signature_script = config['signature_script']
34
35
  @always_cc = config['always_cc']
35
36
  @always_bcc = config['always_bcc']
36
37
  @mailbox = nil
@@ -310,8 +311,17 @@ module Vmail
310
311
 
311
312
 
312
313
  def signature
313
- return '' unless @signature
314
- "\n\n#@signature"
314
+ return signature_script if @signature_script
315
+ if (script = @signature[/\$\(([^)]+)\)/, 1])
316
+ %x{script}
317
+ else
318
+ "\n\n#@signature"
319
+ end
320
+ end
321
+
322
+ def signature_script
323
+ return unless @signature_script
324
+ %x{ #{@signature_script.strip} }
315
325
  end
316
326
 
317
327
  def forward_template
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.5.5'
2
+ VERSION = '2.5.6'
3
3
  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.5.5
4
+ version: 2.5.6
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-08-05 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mail
@@ -157,20 +157,4 @@ rubygems_version: 1.8.23
157
157
  signing_key:
158
158
  specification_version: 3
159
159
  summary: A Vim interface to Gmail
160
- test_files:
161
- - test/address_quoter_test.rb
162
- - test/base64_test.rb
163
- - test/fixtures/euc-kr-header.eml
164
- - test/fixtures/euc-kr-html.eml
165
- - test/fixtures/google-affiliate.eml
166
- - test/fixtures/htmlbody.eml
167
- - test/fixtures/moleskine-html.eml
168
- - test/fixtures/reply-template-encoding-test.eml
169
- - test/fixtures/reply_all.eml
170
- - test/fixtures/rfc_part.eml
171
- - test/fixtures/textbody-nocontenttype.eml
172
- - test/fixtures/with-attachments.eml
173
- - test/message_formatter_test.rb
174
- - test/reply_template_test.rb
175
- - test/test_helper.rb
176
- - test/time_format_test.rb
160
+ test_files: []