sup 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sup might be problematic. Click here for more details.
- data/History.txt +11 -0
- data/Manifest.txt +40 -37
- data/README.txt +56 -32
- data/Rakefile +1 -1
- data/bin/sup +43 -65
- data/bin/sup-import +58 -14
- data/bin/sup-recover-sources +100 -0
- data/doc/FAQ.txt +18 -17
- data/doc/Philosophy.txt +33 -26
- data/doc/TODO +7 -0
- data/lib/sup.rb +36 -6
- data/lib/sup/buffer.rb +101 -66
- data/lib/sup/draft.rb +3 -8
- data/lib/sup/imap.rb +120 -36
- data/lib/sup/index.rb +52 -78
- data/lib/sup/label.rb +1 -4
- data/lib/sup/logger.rb +2 -1
- data/lib/sup/mbox.rb +2 -0
- data/lib/sup/mbox/loader.rb +21 -9
- data/lib/sup/mbox/ssh-file.rb +239 -0
- data/lib/sup/mbox/ssh-loader.rb +88 -0
- data/lib/sup/message.rb +70 -46
- data/lib/sup/modes/inbox-mode.rb +1 -1
- data/lib/sup/modes/label-list-mode.rb +1 -1
- data/lib/sup/modes/line-cursor-mode.rb +0 -1
- data/lib/sup/modes/scroll-mode.rb +12 -2
- data/lib/sup/modes/search-results-mode.rb +3 -4
- data/lib/sup/modes/text-mode.rb +1 -1
- data/lib/sup/modes/thread-index-mode.rb +10 -8
- data/lib/sup/modes/thread-view-mode.rb +13 -12
- data/lib/sup/person.rb +43 -40
- data/lib/sup/poll.rb +11 -9
- data/lib/sup/source.rb +44 -18
- data/lib/sup/util.rb +31 -3
- metadata +53 -40
data/lib/sup/util.rb
CHANGED
@@ -7,6 +7,14 @@ class Module
|
|
7
7
|
bool_reader(*args)
|
8
8
|
bool_writer(*args)
|
9
9
|
end
|
10
|
+
|
11
|
+
def attr_reader_cloned *args
|
12
|
+
args.each { |sym| class_eval %{ def #{sym}; @#{sym}.clone; end } }
|
13
|
+
end
|
14
|
+
|
15
|
+
def defer_all_other_method_calls_to obj
|
16
|
+
class_eval %{ def method_missing meth, *a, &b; @#{obj}.send meth, *a, &b; end }
|
17
|
+
end
|
10
18
|
end
|
11
19
|
|
12
20
|
class Object
|
@@ -20,6 +28,21 @@ class Object
|
|
20
28
|
end
|
21
29
|
ret
|
22
30
|
end
|
31
|
+
|
32
|
+
## takes a value which it yields and then returns, so that code
|
33
|
+
## like:
|
34
|
+
##
|
35
|
+
## x = expensive_operation
|
36
|
+
## log "got #{x}"
|
37
|
+
## x
|
38
|
+
##
|
39
|
+
## now becomes:
|
40
|
+
##
|
41
|
+
## with(expensive_operation) { |x| log "got #{x}" }
|
42
|
+
##
|
43
|
+
## i'm sure there's pithy comment i could make here about the
|
44
|
+
## superiority of lisp, but fuck lisp.
|
45
|
+
def returning x; yield x; x; end
|
23
46
|
end
|
24
47
|
|
25
48
|
class String
|
@@ -43,7 +66,8 @@ class String
|
|
43
66
|
self[0 .. 0].upcase + self[1 .. -1]
|
44
67
|
end
|
45
68
|
|
46
|
-
## found on teh internets
|
69
|
+
## a very complicated regex found on teh internets to split on
|
70
|
+
## commas, unless they occurr within double quotes.
|
47
71
|
def split_on_commas
|
48
72
|
split(/,\s*(?=(?:[^"]*"[^"]*")*(?![^"]*"))/)
|
49
73
|
end
|
@@ -54,15 +78,19 @@ class String
|
|
54
78
|
while s.length > len
|
55
79
|
cut = s[0 ... len].rindex(/\s/)
|
56
80
|
if cut
|
57
|
-
ret << s[0 ... cut]
|
81
|
+
ret << s[0 ... cut]
|
58
82
|
s = s[(cut + 1) .. -1]
|
59
83
|
else
|
60
|
-
ret << s[0 ... len]
|
84
|
+
ret << s[0 ... len]
|
61
85
|
s = s[len .. -1]
|
62
86
|
end
|
63
87
|
end
|
64
88
|
ret << s
|
65
89
|
end
|
90
|
+
|
91
|
+
def normalize_whitespace
|
92
|
+
gsub(/\t/, " ").gsub(/\r/, "")
|
93
|
+
end
|
66
94
|
end
|
67
95
|
|
68
96
|
class Numeric
|
metadata
CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: sup
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date:
|
6
|
+
version: 0.0.3
|
7
|
+
date: 2007-01-02 00:00:00 -08:00
|
8
8
|
summary: A console-based email client with the best features of GMail, mutt, and emacs. Features full text search, labels, tagged operations, multiple buffers, recent contacts, and more.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: wmorgan-sup@masanjin.net
|
12
12
|
homepage: http://sup.rubyforge.org
|
13
13
|
rubyforge_project: sup
|
14
|
-
description: Sup is
|
14
|
+
description: "Sup is a console-based email client that combines the best features of GMail, mutt, and emacs. Sup matches the power of GMail with the speed and simplicity of a console interface. Sup makes it easy to: - Handle massive amounts of email. - Mix email from different sources: mbox files (even across different machines), IMAP folders, POP accounts, and GMail accounts."
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
@@ -29,59 +29,62 @@ authors:
|
|
29
29
|
- William Morgan
|
30
30
|
files:
|
31
31
|
- History.txt
|
32
|
+
- LICENSE
|
32
33
|
- Manifest.txt
|
33
34
|
- README.txt
|
34
|
-
- LICENSE
|
35
35
|
- Rakefile
|
36
|
+
- bin/sup
|
37
|
+
- bin/sup-import
|
38
|
+
- bin/sup-recover-sources
|
36
39
|
- doc/FAQ.txt
|
37
40
|
- doc/Philosophy.txt
|
38
41
|
- doc/TODO
|
39
|
-
-
|
40
|
-
-
|
42
|
+
- lib/sup.rb
|
43
|
+
- lib/sup/account.rb
|
44
|
+
- lib/sup/buffer.rb
|
45
|
+
- lib/sup/colormap.rb
|
46
|
+
- lib/sup/contact.rb
|
47
|
+
- lib/sup/draft.rb
|
48
|
+
- lib/sup/imap.rb
|
49
|
+
- lib/sup/index.rb
|
50
|
+
- lib/sup/keymap.rb
|
51
|
+
- lib/sup/label.rb
|
52
|
+
- lib/sup/logger.rb
|
53
|
+
- lib/sup/mbox.rb
|
41
54
|
- lib/sup/mbox/loader.rb
|
42
|
-
- lib/sup/
|
43
|
-
- lib/sup/
|
44
|
-
- lib/sup/
|
45
|
-
- lib/sup/
|
55
|
+
- lib/sup/mbox/ssh-file.rb
|
56
|
+
- lib/sup/mbox/ssh-loader.rb
|
57
|
+
- lib/sup/message.rb
|
58
|
+
- lib/sup/mode.rb
|
59
|
+
- lib/sup/modes/buffer-list-mode.rb
|
60
|
+
- lib/sup/modes/compose-mode.rb
|
46
61
|
- lib/sup/modes/contact-list-mode.rb
|
62
|
+
- lib/sup/modes/edit-message-mode.rb
|
47
63
|
- lib/sup/modes/forward-mode.rb
|
64
|
+
- lib/sup/modes/help-mode.rb
|
65
|
+
- lib/sup/modes/inbox-mode.rb
|
66
|
+
- lib/sup/modes/label-list-mode.rb
|
48
67
|
- lib/sup/modes/label-search-results-mode.rb
|
49
|
-
- lib/sup/modes/
|
50
|
-
- lib/sup/modes/
|
68
|
+
- lib/sup/modes/line-cursor-mode.rb
|
69
|
+
- lib/sup/modes/log-mode.rb
|
70
|
+
- lib/sup/modes/person-search-results-mode.rb
|
51
71
|
- lib/sup/modes/poll-mode.rb
|
52
|
-
- lib/sup/modes/
|
72
|
+
- lib/sup/modes/reply-mode.rb
|
73
|
+
- lib/sup/modes/resume-mode.rb
|
74
|
+
- lib/sup/modes/scroll-mode.rb
|
75
|
+
- lib/sup/modes/search-results-mode.rb
|
76
|
+
- lib/sup/modes/text-mode.rb
|
53
77
|
- lib/sup/modes/thread-index-mode.rb
|
54
|
-
- lib/sup/modes/person-search-results-mode.rb
|
55
|
-
- lib/sup/modes/inbox-mode.rb
|
56
78
|
- lib/sup/modes/thread-view-mode.rb
|
57
|
-
- lib/sup/modes/log-mode.rb
|
58
|
-
- lib/sup/modes/buffer-list-mode.rb
|
59
|
-
- lib/sup/modes/text-mode.rb
|
60
|
-
- lib/sup/modes/label-list-mode.rb
|
61
|
-
- lib/sup/modes/help-mode.rb
|
62
|
-
- lib/sup/logger.rb
|
63
|
-
- lib/sup/util.rb
|
64
|
-
- lib/sup/update.rb
|
65
|
-
- lib/sup/label.rb
|
66
|
-
- lib/sup/message.rb
|
67
|
-
- lib/sup/mode.rb
|
68
|
-
- lib/sup/keymap.rb
|
69
|
-
- lib/sup/textfield.rb
|
70
|
-
- lib/sup/contact.rb
|
71
|
-
- lib/sup/account.rb
|
72
|
-
- lib/sup/draft.rb
|
73
|
-
- lib/sup/mbox.rb
|
74
|
-
- lib/sup/poll.rb
|
75
79
|
- lib/sup/person.rb
|
76
|
-
- lib/sup/
|
77
|
-
- lib/sup/thread.rb
|
78
|
-
- lib/sup/buffer.rb
|
80
|
+
- lib/sup/poll.rb
|
79
81
|
- lib/sup/sent.rb
|
80
|
-
- lib/sup/tagger.rb
|
81
|
-
- lib/sup/colormap.rb
|
82
82
|
- lib/sup/source.rb
|
83
|
-
- lib/sup/
|
84
|
-
- lib/sup.rb
|
83
|
+
- lib/sup/tagger.rb
|
84
|
+
- lib/sup/textfield.rb
|
85
|
+
- lib/sup/thread.rb
|
86
|
+
- lib/sup/update.rb
|
87
|
+
- lib/sup/util.rb
|
85
88
|
test_files: []
|
86
89
|
|
87
90
|
rdoc_options: []
|
@@ -91,6 +94,7 @@ extra_rdoc_files: []
|
|
91
94
|
executables:
|
92
95
|
- sup
|
93
96
|
- sup-import
|
97
|
+
- sup-recover-sources
|
94
98
|
extensions: []
|
95
99
|
|
96
100
|
requirements: []
|
@@ -123,3 +127,12 @@ dependencies:
|
|
123
127
|
- !ruby/object:Gem::Version
|
124
128
|
version: "0.17"
|
125
129
|
version:
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
name: highline
|
132
|
+
version_requirement:
|
133
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.0.0
|
138
|
+
version:
|