IMAPCleanse 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/imap_client.rb +13 -12
- metadata +2 -2
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ $VERBOSE = nil
|
|
9
9
|
|
10
10
|
spec = Gem::Specification.new do |s|
|
11
11
|
s.name = 'IMAPCleanse'
|
12
|
-
s.version = '1.1.
|
12
|
+
s.version = '1.1.1'
|
13
13
|
s.summary = 'Removes mailbox oldness, finds mailbox interestingness!'
|
14
14
|
s.description = 'IMAPCleanse removes old, read, unflagged messages from your IMAP mailboxes so you don\'t have to!
|
15
15
|
|
data/lib/imap_client.rb
CHANGED
@@ -14,20 +14,21 @@ class IMAPClient
|
|
14
14
|
|
15
15
|
def self.process_args(args, extra_options)
|
16
16
|
opts_file = File.expand_path '~/.imap_cleanse'
|
17
|
-
|
18
|
-
unless File.stat(opts_file).mode & 077 == 0 then
|
19
|
-
$stderr.puts "WARNING! #{opts_file} is group/other readable or writable!"
|
20
|
-
$stderr.puts "WARNING! I'm not doing a thing until you fix it!"
|
21
|
-
exit 1
|
22
|
-
end
|
23
|
-
|
24
17
|
options = {}
|
25
18
|
|
26
|
-
File.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
19
|
+
if File.exist? opts_file then
|
20
|
+
unless File.stat(opts_file).mode & 077 == 0 then
|
21
|
+
$stderr.puts "WARNING! #{opts_file} is group/other readable or writable!"
|
22
|
+
$stderr.puts "WARNING! I'm not doing a thing until you fix it!"
|
23
|
+
exit 1
|
24
|
+
end
|
25
|
+
|
26
|
+
File.readlines(opts_file).map { |l| l.chomp.split '=', 2 }.each do |k,v|
|
27
|
+
v = true if v == 'true'
|
28
|
+
v = false if v == 'false'
|
29
|
+
v = Integer(v) rescue v
|
30
|
+
(options[k.intern] = v) rescue nil
|
31
|
+
end
|
31
32
|
end
|
32
33
|
|
33
34
|
options[:SSL] ||= true
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11.15
|
|
3
3
|
specification_version: 1
|
4
4
|
name: IMAPCleanse
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2006-05-
|
6
|
+
version: 1.1.1
|
7
|
+
date: 2006-05-08 00:00:00 -07:00
|
8
8
|
summary: Removes mailbox oldness, finds mailbox interestingness!
|
9
9
|
require_paths:
|
10
10
|
- lib
|