sup 0.22.1 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/checks.yml +70 -0
  3. data/.gitignore +1 -3
  4. data/.rubocop.yml +5 -0
  5. data/CONTRIBUTORS +14 -5
  6. data/Gemfile +6 -1
  7. data/History.txt +76 -0
  8. data/Manifest.txt +149 -0
  9. data/README.md +32 -5
  10. data/Rakefile +40 -1
  11. data/bin/sup +7 -5
  12. data/bin/sup-add +16 -20
  13. data/bin/sup-config +30 -44
  14. data/bin/sup-dump +2 -2
  15. data/bin/sup-import-dump +4 -4
  16. data/bin/sup-sync +3 -3
  17. data/bin/sup-sync-back-maildir +2 -2
  18. data/bin/sup-tweak-labels +5 -5
  19. data/ext/mkrf_conf_xapian.rb +10 -4
  20. data/lib/sup/colormap.rb +1 -1
  21. data/lib/sup/crypto.rb +17 -8
  22. data/lib/sup/hook.rb +9 -9
  23. data/lib/sup/index.rb +20 -7
  24. data/lib/sup/keymap.rb +1 -1
  25. data/lib/sup/logger.rb +1 -1
  26. data/lib/sup/maildir.rb +4 -4
  27. data/lib/sup/mbox.rb +4 -4
  28. data/lib/sup/message.rb +26 -15
  29. data/lib/sup/message_chunks.rb +29 -20
  30. data/lib/sup/mode.rb +1 -0
  31. data/lib/sup/modes/completion_mode.rb +0 -1
  32. data/lib/sup/modes/contact_list_mode.rb +1 -0
  33. data/lib/sup/modes/file_browser_mode.rb +2 -2
  34. data/lib/sup/modes/label_list_mode.rb +1 -1
  35. data/lib/sup/modes/reply_mode.rb +3 -1
  36. data/lib/sup/modes/search_list_mode.rb +2 -2
  37. data/lib/sup/modes/thread_index_mode.rb +1 -1
  38. data/lib/sup/modes/thread_view_mode.rb +15 -13
  39. data/lib/sup/rfc2047.rb +21 -6
  40. data/lib/sup/source.rb +9 -3
  41. data/lib/sup/textfield.rb +0 -1
  42. data/lib/sup/thread.rb +0 -1
  43. data/lib/sup/util/axe.rb +17 -0
  44. data/lib/sup/util/ncurses.rb +3 -3
  45. data/lib/sup/util.rb +42 -67
  46. data/lib/sup/version.rb +10 -1
  47. data/lib/sup.rb +13 -8
  48. data/man/sup-add.1 +34 -55
  49. data/man/sup-config.1 +23 -36
  50. data/man/sup-dump.1 +25 -35
  51. data/man/sup-import-dump.1 +33 -54
  52. data/man/sup-psych-ify-config-files.1 +25 -34
  53. data/man/sup-recover-sources.1 +34 -49
  54. data/man/sup-sync-back-maildir.1 +39 -60
  55. data/man/sup-sync.1 +49 -79
  56. data/man/sup-tweak-labels.1 +35 -58
  57. data/man/sup.1 +50 -62
  58. data/sup.gemspec +12 -9
  59. data/test/dummy_source.rb +21 -15
  60. data/test/fixtures/embedded-message.eml +34 -0
  61. data/test/fixtures/mailing-list-header.eml +80 -0
  62. data/test/fixtures/non-ascii-header-in-nested-message.eml +36 -0
  63. data/test/fixtures/non-ascii-header.eml +8 -0
  64. data/test/fixtures/rfc2047-header-encoding.eml +15 -0
  65. data/test/fixtures/text-attachments-with-charset.eml +60 -0
  66. data/test/fixtures/utf8-header.eml +17 -0
  67. data/test/fixtures/zimbra-quote-with-bottom-post.eml +27 -0
  68. data/test/gnupg_test_home/gpg.conf +2 -1
  69. data/test/gnupg_test_home/private-keys-v1.d/306D2EE90FF0014B5B9FD07E265C751791674140.key +0 -0
  70. data/test/gnupg_test_home/pubring.gpg +0 -0
  71. data/test/gnupg_test_home/receiver_pubring.gpg +0 -0
  72. data/test/gnupg_test_home/receiver_secring.gpg +0 -0
  73. data/test/gnupg_test_home/regen_keys.sh +69 -18
  74. data/test/gnupg_test_home/secring.gpg +0 -0
  75. data/test/gnupg_test_home/sup-test-2@foo.bar.asc +20 -22
  76. data/test/integration/test_mbox.rb +1 -1
  77. data/test/integration/test_sup-add.rb +83 -0
  78. data/test/test_crypto.rb +46 -0
  79. data/test/test_header_parsing.rb +9 -1
  80. data/test/test_helper.rb +7 -4
  81. data/test/test_message.rb +188 -22
  82. data/test/test_messages_dir.rb +13 -15
  83. data/test/unit/test_horizontal_selector.rb +4 -4
  84. data/test/unit/test_locale_fiddler.rb +1 -1
  85. data/test/unit/util/test_query.rb +10 -4
  86. data/test/unit/util/test_string.rb +9 -3
  87. data/test/unit/util/test_uri.rb +2 -2
  88. metadata +93 -51
  89. data/.travis.yml +0 -13
  90. data/bin/sup-psych-ify-config-files +0 -21
  91. data/test/gnupg_test_home/key1.gen +0 -15
  92. data/test/gnupg_test_home/key2.gen +0 -15
  93. data/test/gnupg_test_home/key_ecc.gen +0 -13
  94. data/test/gnupg_test_home/private-keys-v1.d/719C7455A7169C6EE8819C6E91002E4F9DD00A65.key +0 -1
  95. data/test/gnupg_test_home/private-keys-v1.d/8A130806A754AA29D59487D76BD355040D9F26C0.key +0 -0
  96. data/test/gnupg_test_home/private-keys-v1.d/B7AA46B22BD8A6AD1B4F266C19A3B124A32DDD71.key +0 -0
  97. data/test/gnupg_test_home/private-keys-v1.d/FA64ACD7CC871371BDF57285A6CDF0E618827783.key +0 -0
  98. data/test/integration/test_label_service.rb +0 -18
  99. data/test/test_yaml_migration.rb +0 -85
data/man/sup-sync.1 CHANGED
@@ -1,106 +1,84 @@
1
- .TH "SUP\-SYNC" "1" "April 9, 2012" "Sup User Manual" ""
1
+ .\" Automatically generated by Pandoc 2.9.2.1
2
+ .\"
3
+ .TH "SUP-SYNC" "1" "April 9, 2012" "Sup User Manual" ""
4
+ .hy
2
5
  .SH NAME
3
6
  .PP
4
- sup\-sync \- sychronize the Sup index with message sources
7
+ sup-sync - sychronize the Sup index with message sources
5
8
  .SH SYNOPSIS
6
9
  .PP
7
- sup\-sync [\f[I]options\f[]] source ...
10
+ sup-sync [\f[I]options\f[R]] source \&...
8
11
  .SH DESCRIPTION
9
12
  .PP
10
13
  Synchronizes the Sup index with one or more message sources by adding
11
14
  messages, deleting messages, or changing message state in the index as
12
15
  appropriate.
13
16
  .PP
14
- "Message state" means read/unread, archived/inbox, starred/unstarred,
15
- and all user\-defined labels on each message.
17
+ \[lq]Message state\[rq] means read/unread, archived/inbox,
18
+ starred/unstarred, and all user-defined labels on each message.
16
19
  .PP
17
- "Default source state" refers to any state that a source itself has
18
- keeps about a message.
19
- Sup\-sync uses this information when adding a new message to the index.
20
+ \[lq]Default source state\[rq] refers to any state that a source itself
21
+ has keeps about a message.
22
+ Sup-sync uses this information when adding a new message to the index.
20
23
  The source state is typically limited to read/unread, archived/inbox
21
24
  status and a single label based on the source name.
22
- Messages using the default source state are placed in the inbox (i.e.
23
- not archived) and unstarred.
25
+ Messages using the default source state are placed in the inbox
26
+ (i.e.\ not archived) and unstarred.
24
27
  .PP
25
28
  If no sources are given, sync from all usual sources.
26
- Supported source URI schemes can be seen by running "sup\-add \-\-help".
29
+ Supported source URI schemes can be seen by running \[lq]sup-add
30
+ --help\[rq].
27
31
  .SH MESSAGE STATE OPTIONS
28
32
  .TP
29
- .B \-\-asis
33
+ --asis
30
34
  If the message is already in the index, preserve its state.
31
35
  Otherwise, use default source state (default)
32
- .RS
33
- .RE
34
36
  .TP
35
- .B \-\-restore dumpfile
36
- Restore message state from a dump file created with sup\-dump.
37
- If a message is not in this dumpfile, act as \-\-asis
38
- .RS
39
- .RE
37
+ --restore dumpfile
38
+ Restore message state from a dump file created with sup-dump.
39
+ If a message is not in this dumpfile, act as --asis
40
40
  .TP
41
- .B \-\-discard
41
+ --discard
42
42
  Discard any message state in the index and use the default source state.
43
- \f[B]Dangerous!\f[]
44
- .RS
45
- .RE
43
+ \f[B]Dangerous!\f[R]
46
44
  .TP
47
- .B \-x, \-
45
+ -x, -
48
46
  When using the default source state, mark messages as archived.
49
- .RS
50
- .RE
51
47
  .TP
52
- .B \-r, \-\-read
48
+ -r, --read
53
49
  When using the default source state, mark messages as read.
54
- .RS
55
- .RE
56
50
  .TP
57
- .B \-\-extra\-labels \f[I]STRING\f[]
58
- When using the default source state, also apply these user\-defined
59
- labels (a comma\-separated list) (default)
60
- .RS
61
- .RE
51
+ --extra-labels \f[I]STRING\f[R]
52
+ When using the default source state, also apply these user-defined
53
+ labels (a comma-separated list) (default)
62
54
  .SH OTHER OPTIONS
63
55
  .TP
64
- .B \-v, \-\-verbose
65
- Print message ids as they\[aq]re processed.
66
- .RS
67
- .RE
56
+ -v, --verbose
57
+ Print message ids as they\[cq]re processed.
68
58
  .TP
69
- .B \-o, \-\-optimize
59
+ -o, --optimize
70
60
  As the final operation, optimize the index.
71
- .RS
72
- .RE
73
61
  .TP
74
- .B \-\-all\-sources
62
+ --all-sources
75
63
  Scan over all sources.
76
- .RS
77
- .RE
78
64
  .TP
79
- .B \-n, \-\-dry\-run
80
- Don\[aq]t actually modify the index.
81
- Probably only useful with \-\-verbose.
82
- .RS
83
- .RE
65
+ -n, --dry-run
66
+ Don\[cq]t actually modify the index.
67
+ Probably only useful with --verbose.
84
68
  .TP
85
- .B \-\-version
69
+ --version
86
70
  Show version information
87
- .RS
88
- .RE
89
71
  .TP
90
- .B \-h, \-\-help
72
+ -h, --help
91
73
  Show help message
92
- .RS
93
- .RE
94
74
  .SH FILES
95
75
  .TP
96
- .B $HOME/.sup/sources.yaml
76
+ $HOME/.sup/sources.yaml
97
77
  Configuration file for Sup mail sources
98
- .RS
99
- .RE
100
78
  .SH SEE ALSO
101
79
  .PP
102
- sup(1), sup\-add(1), sup\-config(1), sup\-dump(1),
103
- sup\-sync\-back\-maildir(1), sup\-tweak\-labels(1)
80
+ sup(1), sup-add(1), sup-config(1), sup-dump(1),
81
+ sup-sync-back-maildir(1), sup-tweak-labels(1)
104
82
  .SH REPORTING BUGS
105
83
  .PP
106
84
  You are welcome to submit bug reports to the Sup issue tracker, located
@@ -109,39 +87,31 @@ at
109
87
  <https://github.com/sup-heliotrope/sup/issues>
110
88
  .SH CONTACT INFORMATION
111
89
  .TP
112
- .B The Sup web page:
113
- <http://supmua.org/>
114
- .RS
115
- .RE
90
+ The Sup web page:
91
+ <https://sup-heliotrope.github.io/>
116
92
  .TP
117
- .B Code repository:
93
+ Code repository:
118
94
  <https://github.com/sup-heliotrope/sup/>
119
- .RS
120
- .RE
121
95
  .TP
122
- .B Sup Wiki:
96
+ Sup Wiki:
123
97
  <https://github.com/sup-heliotrope/sup/wiki/>
124
- .RS
125
- .RE
126
98
  .TP
127
- .B Sup IRC channel:
128
- #sup \@ freenode.net
129
- .RS
130
- .RE
99
+ Sup IRC channel:
100
+ #sup \[at] freenode.net
131
101
  .TP
132
- .B Mailing list:
133
- supmua\@googlegroups.com
102
+ Mailing list:
103
+ supmua\[at]googlegroups.com
134
104
  .RS
135
105
  .PP
136
- supmua+subscribe\@googlegroups.com
106
+ supmua+subscribe\[at]googlegroups.com
137
107
  .PP
138
108
  Archives: <https://groups.google.com/d/forum/supmua/>
139
109
  .RE
140
110
  .SH COPYRIGHT
141
111
  .PP
142
- Copyright © 2006\-2009 William Morgan <mworgan-sup@masanjin.net>
112
+ Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
143
113
  .PP
144
- Copyright \@ 2013\-2014 Sup developers
114
+ Copyright \[at] 2013-2014 Sup developers
145
115
  .PP
146
116
  Permission is granted to copy and distribute this manual under the terms
147
117
  of the GNU General Public License; either version 2 or (at your option)
@@ -1,69 +1,54 @@
1
- .TH "SUP\-TWEAK\-LABELS" "1" "April 9, 2012" "Sup User Manuel" ""
1
+ .\" Automatically generated by Pandoc 2.9.2.1
2
+ .\"
3
+ .TH "SUP-TWEAK-LABELS" "1" "April 9, 2012" "Sup User Manuel" ""
4
+ .hy
2
5
  .SH NAME
3
6
  .PP
4
- sup\-tweak\-labels \- batch modification of message state already in
5
- index
7
+ sup-tweak-labels - batch modification of message state already in index
6
8
  .SH SYNOPSIS
7
9
  .PP
8
- sup\-tweak\-labels [\f[I]options\f[]] source ...
10
+ sup-tweak-labels [\f[I]options\f[R]] source \&...
9
11
  .SH DESCRIPTION
10
12
  .PP
11
13
  Batch modification of message state for messages already in the index.
12
14
  .PP
13
- Supported source URI schemes can be seen by running "sup\-add \-\-help".
15
+ Supported source URI schemes can be seen by running \[lq]sup-add
16
+ --help\[rq].
14
17
  .SH OPTIONS
15
18
  .TP
16
- .B \-a \f[I]STRING\f[], \-\-add \f[I]STRING\f[]
17
- One or more labels (comma\-separated) to add to every message from the
19
+ -a \f[I]STRING\f[R], --add \f[I]STRING\f[R]
20
+ One or more labels (comma-separated) to add to every message from the
18
21
  specified sources (default: )
19
- .RS
20
- .RE
21
22
  .TP
22
- .B \-r \f[I]STRING\f[], \-\-remove \f[I]STRING\f[]
23
- One or more labels (comma\-separated) to remove from every message from
23
+ -r \f[I]STRING\f[R], --remove \f[I]STRING\f[R]
24
+ One or more labels (comma-separated) to remove from every message from
24
25
  the specified sources, if those labels are present (default: )
25
- .RS
26
- .RE
27
26
  .TP
28
- .B \-q \f[I]QUERY\f[], \-\-query \f[I]QUERY\f[]
27
+ -q \f[I]QUERY\f[R], --query \f[I]QUERY\f[R]
29
28
  A Sup search query
30
- .RS
31
- .RE
32
29
  .SH OTHER OPTIONS
33
30
  .TP
34
- .B \-v, \-\-verbose
35
- Print message ids as they\[aq]re processed
36
- .RS
37
- .RE
31
+ -v, --verbose
32
+ Print message ids as they\[cq]re processed
38
33
  .TP
39
- .B \-e, \-\-very\-verbose
40
- Print message names and subjects as they\[aq]re processed
41
- .RS
42
- .RE
34
+ -e, --very-verbose
35
+ Print message names and subjects as they\[cq]re processed
43
36
  .TP
44
- .B \-\-all\-sources
37
+ --all-sources
45
38
  Scan over all sources
46
- .RS
47
- .RE
48
39
  .TP
49
- .B \-n, \-\-dry\-run
50
- Don\[aq]t actually modify the index.
51
- Probably only useful with \-\-verbose
52
- .RS
53
- .RE
40
+ -n, --dry-run
41
+ Don\[cq]t actually modify the index.
42
+ Probably only useful with --verbose
54
43
  .TP
55
- .B \-\-version
44
+ --version
56
45
  Show version information
57
- .RS
58
- .RE
59
46
  .TP
60
- .B \-h, \-\-help
47
+ -h, --help
61
48
  Show help message
62
- .RS
63
- .RE
64
49
  .SH SEE ALSO
65
50
  .PP
66
- sup(1), sup\-add(1)
51
+ sup(1), sup-add(1)
67
52
  .SH REPORTING BUGS
68
53
  .PP
69
54
  You are welcome to submit bug reports to the Sup issue tracker, located
@@ -72,39 +57,31 @@ at
72
57
  <https://github.com/sup-heliotrope/sup/issues>
73
58
  .SH CONTACT INFORMATION
74
59
  .TP
75
- .B The Sup web page:
76
- <http://supmua.org/>
77
- .RS
78
- .RE
60
+ The Sup web page:
61
+ <https://sup-heliotrope.github.io/>
79
62
  .TP
80
- .B Code repository:
63
+ Code repository:
81
64
  <https://github.com/sup-heliotrope/sup/>
82
- .RS
83
- .RE
84
65
  .TP
85
- .B Sup Wiki:
66
+ Sup Wiki:
86
67
  <https://github.com/sup-heliotrope/sup/wiki/>
87
- .RS
88
- .RE
89
68
  .TP
90
- .B Sup IRC channel:
91
- #sup \@ freenode.net
92
- .RS
93
- .RE
69
+ Sup IRC channel:
70
+ #sup \[at] freenode.net
94
71
  .TP
95
- .B Mailing list:
96
- supmua\@googlegroups.com
72
+ Mailing list:
73
+ supmua\[at]googlegroups.com
97
74
  .RS
98
75
  .PP
99
- supmua+subscribe\@googlegroups.com
76
+ supmua+subscribe\[at]googlegroups.com
100
77
  .PP
101
78
  Archives: <https://groups.google.com/d/forum/supmua/>
102
79
  .RE
103
80
  .SH COPYRIGHT
104
81
  .PP
105
- Copyright © 2006\-2009 William Morgan <mworgan-sup@masanjin.net>
82
+ Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
106
83
  .PP
107
- Copyright \@ 2013\-2014 Sup developers
84
+ Copyright \[at] 2013-2014 Sup developers
108
85
  .PP
109
86
  Permission is granted to copy and distribute this manual under the terms
110
87
  of the GNU General Public License; either version 2 or (at your option)
data/man/sup.1 CHANGED
@@ -1,85 +1,81 @@
1
+ .\" Automatically generated by Pandoc 2.9.2.1
2
+ .\"
1
3
  .TH "SUP" "1" "April 8, 2014" "Sup User Manual" ""
4
+ .hy
2
5
  .SH NAME
3
6
  .PP
4
- sup \- a curses\-based email client
7
+ sup - a curses-based email client
5
8
  .SH SYNOPSIS
6
9
  .PP
7
- sup [\f[I]options\f[]]
10
+ sup [\f[I]options\f[R]]
8
11
  .SH DESCRIPTION
9
12
  .PP
10
- Sup is a console\-based email client for people with a lot of email.
13
+ Sup is a console-based email client for people with a lot of email.
11
14
  .PP
12
15
  It presents an interface of a list of threads, which are each
13
16
  hierarchical collections email messages.
14
17
  Threads can have multiple tags applied to them.
15
- It supports a very fast full\-text search, automatic contact\-list
18
+ It supports a very fast full-text search, automatic contact-list
16
19
  management, custom code insertion via a Ruby hook system, and more.
17
- If you're the type of person who treats email as an extension of your
18
- long\-term memory, Sup is for you.
20
+ If you\[cq]re the type of person who treats email as an extension of
21
+ your long-term memory, Sup is for you.
19
22
  .SH OPTIONS
20
23
  .TP
21
- .B \-l, \-\-list\-hooks
24
+ -l, --list-hooks
22
25
  List all hooks and descriptions, and quit.
23
- .RS
24
- .RE
26
+ Use \[en]hooks-matching to filter
27
+ .TP
28
+ -m, --hooks-matching=<s>
29
+ If given, list all hooks and descriptions matching the given pattern.
30
+ Needs the \[en]list-hooks option (default: )
25
31
  .TP
26
- .B \-n, \-\-no\-threads
32
+ -n, --no-threads
27
33
  Turn off threading.
28
34
  Helps with debugging.
29
35
  (Necessarily disables background polling for new messages.)
30
- .RS
31
- .RE
32
36
  .TP
33
- .B \-o, \-\-no\-initial\-poll
34
- Don\[aq]t poll for new messages when starting.
35
- .RS
36
- .RE
37
+ -o, --no-initial-poll
38
+ Don\[cq]t poll for new messages when starting.
37
39
  .TP
38
- .B \-s \f[I]QUERY\f[], \-\-search \f[I]QUERY\f[]
40
+ -s \f[I]QUERY\f[R], --search \f[I]QUERY\f[R]
39
41
  Search for this query upon startup
40
- .RS
41
- .RE
42
42
  .TP
43
- .B \-c \f[I]STRING\f[], \-\-compose \f[I]STRING\f[]
43
+ -c \f[I]STRING\f[R], --compose \f[I]STRING\f[R]
44
44
  Compose message to this recipient upon startup
45
- .RS
46
- .RE
47
45
  .TP
48
- .B \-j \f[I]STRING\f[], \-\-subject \f[I]STRING\f[]
46
+ -j \f[I]STRING\f[R], --subject \f[I]STRING\f[R]
49
47
  When composing, use this subject
50
- .RS
51
- .RE
52
48
  .TP
53
- .B \-v, \-\-version
49
+ -v, --version
54
50
  Print version and exit
55
- .RS
56
- .RE
57
51
  .TP
58
- .B \-h, \-\-help
52
+ -h, --help
59
53
  Show brief help message
60
- .RS
61
- .RE
54
+ .SH ENVIRONMENT
55
+ .TP
56
+ SUP_LOG_LEVEL
57
+ Set log level verbosity.
58
+ Valid values ordered by decresing verbosity: debug info warn error.
59
+ Default log level is info.
60
+ .TP
61
+ SUP_BASE\[rs]
62
+ Specify home directory for configuration files and xapian index,
63
+ defaults to: $HOME/.sup.
62
64
  .SH FILES
63
65
  .TP
64
- .B $HOME/.sup/config.yaml
66
+ $HOME/.sup/config.yaml
65
67
  Configuration file for Sup
66
- .RS
67
- .RE
68
68
  .TP
69
- .B $HOME/.sup/sources.yaml
69
+ $HOME/.sup/sources.yaml
70
70
  Configuration file for Sup mail sources
71
- .RS
72
- .RE
73
71
  .TP
74
- .B $HOME/.sup/colors.yaml
72
+ $HOME/.sup/colors.yaml
75
73
  Color theme for Sup
76
- .RS
77
- .RE
78
74
  .SH SEE ALSO
79
75
  .PP
80
- mail(1), sup\-add(1), sup\-config(1), sup\-dump(1),
81
- sup\-import\-dump(1), sup\-recover\-sources(1), sup\-sync(1),
82
- sup\-sync\-back\-maildir(1), sup\-tweak\-labels(1)
76
+ mail(1), sup-add(1), sup-config(1), sup-dump(1), sup-import-dump(1),
77
+ sup-recover-sources(1), sup-sync(1), sup-sync-back-maildir(1),
78
+ sup-tweak-labels(1)
83
79
  .SH REPORTING BUGS
84
80
  .PP
85
81
  You are welcome to submit bug reports to the Sup issue tracker, located
@@ -88,39 +84,31 @@ at
88
84
  <https://github.com/sup-heliotrope/sup/issues>
89
85
  .SH CONTACT INFORMATION
90
86
  .TP
91
- .B The Sup web page:
92
- <http://supmua.org/>
93
- .RS
94
- .RE
87
+ The Sup web page:
88
+ <https://sup-heliotrope.github.io/>
95
89
  .TP
96
- .B Code repository:
90
+ Code repository:
97
91
  <https://github.com/sup-heliotrope/sup/>
98
- .RS
99
- .RE
100
92
  .TP
101
- .B Sup Wiki:
93
+ Sup Wiki:
102
94
  <https://github.com/sup-heliotrope/sup/wiki/>
103
- .RS
104
- .RE
105
95
  .TP
106
- .B Sup IRC channel:
107
- #sup \@ freenode.net
108
- .RS
109
- .RE
96
+ Sup IRC channel:
97
+ #sup \[at] freenode.net
110
98
  .TP
111
- .B Mailing list:
112
- supmua\@googlegroups.com
99
+ Mailing list:
100
+ supmua\[at]googlegroups.com
113
101
  .RS
114
102
  .PP
115
- supmua+subscribe\@googlegroups.com
103
+ supmua+subscribe\[at]googlegroups.com
116
104
  .PP
117
105
  Archives: <https://groups.google.com/d/forum/supmua/>
118
106
  .RE
119
107
  .SH COPYRIGHT
120
108
  .PP
121
- Copyright © 2006\-2009 William Morgan <mworgan-sup@masanjin.net>
109
+ Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
122
110
  .PP
123
- Copyright \@ 2013\-2014 Sup developers
111
+ Copyright \[at] 2013-2014 Sup developers
124
112
  .PP
125
113
  Permission is granted to copy and distribute this manual under the terms
126
114
  of the GNU General Public License; either version 2 or (at your option)
data/sup.gemspec CHANGED
@@ -4,13 +4,13 @@ require 'sup/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "sup"
7
- s.version = ENV["REL"] || (::Redwood::VERSION == "git" ? "999" : ::Redwood::VERSION)
7
+ s.version = ENV["REL"] || (/-git-/ =~ ::Redwood::VERSION ? "999" : ::Redwood::VERSION)
8
8
  s.date = Time.now.strftime "%Y-%m-%d"
9
9
  s.authors = ["William Morgan", "Gaute Hope", "Hamish Downer", "Matthieu Rakotojaona"]
10
10
  s.email = "supmua@googlegroups.com"
11
11
  s.summary = "A console-based email client with the best features of GMail, mutt and Emacs"
12
- s.homepage = "http://supmua.org"
13
- s.license = 'GPL-2'
12
+ s.homepage = "https://sup-heliotrope.github.io/"
13
+ s.license = 'GPL-2.0'
14
14
  s.description = <<-DESC
15
15
  Sup is a console-based email client for people with a lot of email.
16
16
 
@@ -32,7 +32,7 @@ SUP: please note that our old mailing lists have been shut down,
32
32
  https://github.com/sup-heliotrope/sup/wiki/Installation%3A-OpenBSD.
33
33
  EOF
34
34
 
35
- s.files = `git ls-files -z`.split("\x0")
35
+ s.files = File.read("Manifest.txt").split
36
36
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
37
37
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
38
38
  s.require_paths = ["lib"]
@@ -51,20 +51,23 @@ SUP: please note that our old mailing lists have been shut down,
51
51
  ## ext/mkrf_conf_xapian.rb and Gemfile.
52
52
 
53
53
  s.add_runtime_dependency "ncursesw", "~> 1.4.0"
54
- s.add_runtime_dependency "rmail-sup", "~> 1.0.1"
54
+ s.add_runtime_dependency "rmail", ">= 1.1.2", "< 2"
55
55
  s.add_runtime_dependency "highline"
56
- s.add_runtime_dependency "trollop", ">= 1.12"
56
+ s.add_runtime_dependency "optimist"
57
57
  s.add_runtime_dependency "lockfile"
58
58
  s.add_runtime_dependency "mime-types", "> 2.0"
59
59
  s.add_runtime_dependency "locale", "~> 2.0"
60
- s.add_runtime_dependency "chronic", "~> 0.9.1"
60
+ s.add_runtime_dependency "chronic"
61
61
  s.add_runtime_dependency "unicode", "~> 0.4.4"
62
+ s.add_runtime_dependency "unicode-display_width"
63
+ s.add_runtime_dependency "string-scrub" if /^2\.0\./ =~ RUBY_VERSION
62
64
 
63
- s.add_development_dependency "bundler", "~> 1.3"
65
+ s.add_development_dependency "bundler", ">= 1.3", "< 3"
64
66
  s.add_development_dependency "rake"
65
- s.add_development_dependency 'minitest', '~> 5.5.1'
67
+ s.add_development_dependency 'minitest', '~> 5.5'
66
68
  s.add_development_dependency "rr", "~> 1.1"
67
69
  s.add_development_dependency "gpgme", ">= 2.0.2"
68
70
  s.add_development_dependency "pry"
71
+ s.add_development_dependency "rubocop-packaging" unless /^2\.[012]\./ =~ RUBY_VERSION
69
72
 
70
73
  end
data/test/dummy_source.rb CHANGED
@@ -25,32 +25,38 @@ class DummySource < Source
25
25
  return @messages ? @messages.length - 1 : 0
26
26
  end
27
27
 
28
- def load_header offset
29
- Source.parse_raw_email_header StringIO.new(raw_header(offset))
28
+ def with_file_for id
29
+ fn = @messages[id]
30
+ File.open(fn, 'rb') { |f| yield f }
30
31
  end
31
32
 
32
- def load_message offset
33
- RMail::Parser.read raw_message(offset)
33
+ def load_header id
34
+ with_file_for(id) { |f| parse_raw_email_header f }
34
35
  end
35
36
 
36
- def raw_header offset
37
+ def load_message id
38
+ with_file_for(id) { |f| RMail::Parser.read f }
39
+ end
40
+
41
+ def raw_header id
37
42
  ret = ""
38
- f = StringIO.new(@messages[offset])
39
- until f.eof? || (l = f.gets) =~ /^$/
40
- ret += l
43
+ with_file_for(id) do |f|
44
+ until f.eof? || (l = f.gets) =~ /^$/
45
+ ret += l
46
+ end
41
47
  end
42
48
  ret
43
49
  end
44
50
 
45
- def raw_message offset
46
- @messages[offset]
51
+ def raw_message id
52
+ with_file_for(id) { |f| f.read }
47
53
  end
48
54
 
49
- def each_raw_message_line offset
50
- ret = ""
51
- f = StringIO.new(@messages[offset])
52
- until f.eof?
53
- yield f.gets
55
+ def each_raw_message_line id
56
+ with_file_for(id) do |f|
57
+ until f.eof?
58
+ yield f.gets
59
+ end
54
60
  end
55
61
  end
56
62
  end
@@ -0,0 +1,34 @@
1
+ Return-Path: <return@example.com>
2
+ From: Sender <sender@example.com>
3
+ To: <recipient@example.invalid>
4
+ Subject: Email with embedded message
5
+ MIME-Version: 1.0
6
+ Content-Type: multipart/mixed; boundary="----------=_4F506AC2.EE281DC4"
7
+ Message-Id: <9181f493-df49-4af5-8ad2-e1a8eb692a98>
8
+ Date: Wed, 15 Jul 2020 19:48:41 +0100
9
+
10
+ This is a multi-part message in MIME format.
11
+
12
+ ------------=_4F506AC2.EE281DC4
13
+ Content-Type: text/plain; charset=iso-8859-1
14
+ Content-Disposition: inline
15
+ Content-Transfer-Encoding: 8bit
16
+
17
+ Example outer message.
18
+ Example second line.
19
+
20
+
21
+ ------------=_4F506AC2.EE281DC4
22
+ Content-Type: message/rfc822; x-spam-type=original
23
+ Content-Transfer-Encoding: 8bit
24
+
25
+ From: "Embed sender" <embed@example.com>
26
+ To: <rcpt2@example.invalid>
27
+ Subject: Embedded subject line
28
+ Date: Wed, 15 Jul 2020 12:34:56 +0000
29
+
30
+ Example embedded message.
31
+ Second line.
32
+
33
+ ------------=_4F506AC2.EE281DC4--
34
+