sup 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/checks.yml +70 -0
  3. data/.rubocop.yml +5 -0
  4. data/CONTRIBUTORS +3 -2
  5. data/Gemfile +5 -1
  6. data/History.txt +20 -0
  7. data/Manifest.txt +149 -0
  8. data/README.md +9 -3
  9. data/Rakefile +40 -1
  10. data/bin/sup-add +4 -8
  11. data/ext/mkrf_conf_xapian.rb +10 -4
  12. data/lib/sup/colormap.rb +1 -1
  13. data/lib/sup/hook.rb +1 -1
  14. data/lib/sup/index.rb +2 -2
  15. data/lib/sup/keymap.rb +1 -1
  16. data/lib/sup/maildir.rb +4 -4
  17. data/lib/sup/mbox.rb +4 -4
  18. data/lib/sup/message.rb +6 -5
  19. data/lib/sup/message_chunks.rb +27 -19
  20. data/lib/sup/modes/completion_mode.rb +0 -1
  21. data/lib/sup/modes/file_browser_mode.rb +2 -2
  22. data/lib/sup/modes/label_list_mode.rb +1 -1
  23. data/lib/sup/modes/search_list_mode.rb +2 -2
  24. data/lib/sup/modes/thread_view_mode.rb +1 -2
  25. data/lib/sup/rfc2047.rb +21 -6
  26. data/lib/sup/source.rb +8 -2
  27. data/lib/sup/textfield.rb +0 -1
  28. data/lib/sup/thread.rb +0 -1
  29. data/lib/sup/util.rb +28 -48
  30. data/lib/sup/version.rb +1 -1
  31. data/lib/sup.rb +12 -8
  32. data/man/sup-add.1 +15 -15
  33. data/man/sup-config.1 +11 -11
  34. data/man/sup-dump.1 +9 -9
  35. data/man/sup-import-dump.1 +15 -15
  36. data/man/sup-psych-ify-config-files.1 +9 -9
  37. data/man/sup-recover-sources.1 +12 -12
  38. data/man/sup-sync-back-maildir.1 +14 -14
  39. data/man/sup-sync.1 +20 -20
  40. data/man/sup-tweak-labels.1 +16 -16
  41. data/man/sup.1 +21 -21
  42. data/sup.gemspec +6 -4
  43. data/test/dummy_source.rb +21 -15
  44. data/test/fixtures/embedded-message.eml +34 -0
  45. data/test/fixtures/non-ascii-header-in-nested-message.eml +36 -0
  46. data/test/fixtures/non-ascii-header.eml +8 -0
  47. data/test/fixtures/rfc2047-header-encoding.eml +15 -0
  48. data/test/fixtures/text-attachments-with-charset.eml +15 -1
  49. data/test/fixtures/utf8-header.eml +17 -0
  50. data/test/integration/test_mbox.rb +1 -1
  51. data/test/integration/test_sup-add.rb +83 -0
  52. data/test/test_crypto.rb +44 -0
  53. data/test/test_header_parsing.rb +9 -1
  54. data/test/test_helper.rb +7 -4
  55. data/test/test_message.rb +124 -32
  56. data/test/test_messages_dir.rb +13 -15
  57. data/test/unit/test_horizontal_selector.rb +4 -4
  58. data/test/unit/test_locale_fiddler.rb +1 -1
  59. data/test/unit/util/test_query.rb +1 -1
  60. data/test/unit/util/test_string.rb +3 -3
  61. data/test/unit/util/test_uri.rb +2 -2
  62. metadata +46 -18
  63. data/.travis.yml +0 -18
  64. data/bin/sup-psych-ify-config-files +0 -21
  65. data/test/integration/test_label_service.rb +0 -18
  66. data/test/test_yaml_migration.rb +0 -85
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sup
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Morgan
8
8
  - Gaute Hope
9
9
  - Hamish Downer
10
10
  - Matthieu Rakotojaona
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-07-12 00:00:00.000000000 Z
14
+ date: 2022-05-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: ncursesw
@@ -31,16 +31,22 @@ dependencies:
31
31
  name: rmail
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: '1.1'
36
+ version: 1.1.2
37
+ - - "<"
38
+ - !ruby/object:Gem::Version
39
+ version: '2'
37
40
  type: :runtime
38
41
  prerelease: false
39
42
  version_requirements: !ruby/object:Gem::Requirement
40
43
  requirements:
41
- - - "~>"
44
+ - - ">="
42
45
  - !ruby/object:Gem::Version
43
- version: '1.1'
46
+ version: 1.1.2
47
+ - - "<"
48
+ - !ruby/object:Gem::Version
49
+ version: '2'
44
50
  - !ruby/object:Gem::Dependency
45
51
  name: highline
46
52
  requirement: !ruby/object:Gem::Requirement
@@ -193,14 +199,14 @@ dependencies:
193
199
  requirements:
194
200
  - - "~>"
195
201
  - !ruby/object:Gem::Version
196
- version: 5.5.1
202
+ version: '5.5'
197
203
  type: :development
198
204
  prerelease: false
199
205
  version_requirements: !ruby/object:Gem::Requirement
200
206
  requirements:
201
207
  - - "~>"
202
208
  - !ruby/object:Gem::Version
203
- version: 5.5.1
209
+ version: '5.5'
204
210
  - !ruby/object:Gem::Dependency
205
211
  name: rr
206
212
  requirement: !ruby/object:Gem::Requirement
@@ -243,6 +249,20 @@ dependencies:
243
249
  - - ">="
244
250
  - !ruby/object:Gem::Version
245
251
  version: '0'
252
+ - !ruby/object:Gem::Dependency
253
+ name: rubocop-packaging
254
+ requirement: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - ">="
257
+ - !ruby/object:Gem::Version
258
+ version: '0'
259
+ type: :development
260
+ prerelease: false
261
+ version_requirements: !ruby/object:Gem::Requirement
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: '0'
246
266
  description: |2
247
267
  Sup is a console-based email client for people with a lot of email.
248
268
 
@@ -259,7 +279,6 @@ executables:
259
279
  - sup-config
260
280
  - sup-dump
261
281
  - sup-import-dump
262
- - sup-psych-ify-config-files
263
282
  - sup-recover-sources
264
283
  - sup-sync
265
284
  - sup-sync-back-maildir
@@ -278,14 +297,16 @@ extra_rdoc_files:
278
297
  - man/sup-tweak-labels.1
279
298
  - man/sup.1
280
299
  files:
300
+ - ".github/workflows/checks.yml"
281
301
  - ".gitignore"
282
302
  - ".gitmodules"
283
- - ".travis.yml"
303
+ - ".rubocop.yml"
284
304
  - CONTRIBUTORS
285
305
  - Gemfile
286
306
  - HACKING
287
307
  - History.txt
288
308
  - LICENSE
309
+ - Manifest.txt
289
310
  - README.md
290
311
  - Rakefile
291
312
  - ReleaseNotes
@@ -294,7 +315,6 @@ files:
294
315
  - bin/sup-config
295
316
  - bin/sup-dump
296
317
  - bin/sup-import-dump
297
- - bin/sup-psych-ify-config-files
298
318
  - bin/sup-recover-sources
299
319
  - bin/sup-sync
300
320
  - bin/sup-sync-back-maildir
@@ -394,6 +414,7 @@ files:
394
414
  - test/fixtures/binary-content-transfer-encoding-2.eml
395
415
  - test/fixtures/blank-header-fields.eml
396
416
  - test/fixtures/contacts.txt
417
+ - test/fixtures/embedded-message.eml
397
418
  - test/fixtures/mailing-list-header.eml
398
419
  - test/fixtures/malicious-attachment-names.eml
399
420
  - test/fixtures/missing-from-to.eml
@@ -401,8 +422,12 @@ files:
401
422
  - test/fixtures/multi-part-2.eml
402
423
  - test/fixtures/multi-part.eml
403
424
  - test/fixtures/no-body.eml
425
+ - test/fixtures/non-ascii-header-in-nested-message.eml
426
+ - test/fixtures/non-ascii-header.eml
427
+ - test/fixtures/rfc2047-header-encoding.eml
404
428
  - test/fixtures/simple-message.eml
405
429
  - test/fixtures/text-attachments-with-charset.eml
430
+ - test/fixtures/utf8-header.eml
406
431
  - test/fixtures/zimbra-quote-with-bottom-post.eml
407
432
  - test/gnupg_test_home/.gpg-v21-migrated
408
433
  - test/gnupg_test_home/gpg.conf
@@ -413,15 +438,14 @@ files:
413
438
  - test/gnupg_test_home/regen_keys.sh
414
439
  - test/gnupg_test_home/secring.gpg
415
440
  - test/gnupg_test_home/sup-test-2@foo.bar.asc
416
- - test/integration/test_label_service.rb
417
441
  - test/integration/test_maildir.rb
418
442
  - test/integration/test_mbox.rb
443
+ - test/integration/test_sup-add.rb
419
444
  - test/test_crypto.rb
420
445
  - test/test_header_parsing.rb
421
446
  - test/test_helper.rb
422
447
  - test/test_message.rb
423
448
  - test/test_messages_dir.rb
424
- - test/test_yaml_migration.rb
425
449
  - test/test_yaml_regressions.rb
426
450
  - test/unit/service/test_label_service.rb
427
451
  - test/unit/test_contact.rb
@@ -458,8 +482,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
458
482
  - !ruby/object:Gem::Version
459
483
  version: '0'
460
484
  requirements: []
461
- rubygems_version: 3.1.2
462
- signing_key:
485
+ rubygems_version: 3.2.22
486
+ signing_key:
463
487
  specification_version: 4
464
488
  summary: A console-based email client with the best features of GMail, mutt and Emacs
465
489
  test_files:
@@ -468,6 +492,7 @@ test_files:
468
492
  - test/fixtures/binary-content-transfer-encoding-2.eml
469
493
  - test/fixtures/blank-header-fields.eml
470
494
  - test/fixtures/contacts.txt
495
+ - test/fixtures/embedded-message.eml
471
496
  - test/fixtures/mailing-list-header.eml
472
497
  - test/fixtures/malicious-attachment-names.eml
473
498
  - test/fixtures/missing-from-to.eml
@@ -475,8 +500,12 @@ test_files:
475
500
  - test/fixtures/multi-part-2.eml
476
501
  - test/fixtures/multi-part.eml
477
502
  - test/fixtures/no-body.eml
503
+ - test/fixtures/non-ascii-header-in-nested-message.eml
504
+ - test/fixtures/non-ascii-header.eml
505
+ - test/fixtures/rfc2047-header-encoding.eml
478
506
  - test/fixtures/simple-message.eml
479
507
  - test/fixtures/text-attachments-with-charset.eml
508
+ - test/fixtures/utf8-header.eml
480
509
  - test/fixtures/zimbra-quote-with-bottom-post.eml
481
510
  - test/gnupg_test_home/.gpg-v21-migrated
482
511
  - test/gnupg_test_home/gpg.conf
@@ -487,15 +516,14 @@ test_files:
487
516
  - test/gnupg_test_home/regen_keys.sh
488
517
  - test/gnupg_test_home/secring.gpg
489
518
  - test/gnupg_test_home/sup-test-2@foo.bar.asc
490
- - test/integration/test_label_service.rb
491
519
  - test/integration/test_maildir.rb
492
520
  - test/integration/test_mbox.rb
521
+ - test/integration/test_sup-add.rb
493
522
  - test/test_crypto.rb
494
523
  - test/test_header_parsing.rb
495
524
  - test/test_helper.rb
496
525
  - test/test_message.rb
497
526
  - test/test_messages_dir.rb
498
- - test/test_yaml_migration.rb
499
527
  - test/test_yaml_regressions.rb
500
528
  - test/unit/service/test_label_service.rb
501
529
  - test/unit/test_contact.rb
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- language: ruby
2
-
3
- dist: focal
4
-
5
- rvm:
6
- - 2.5
7
- - 2.6
8
- - 2.7
9
-
10
- before_install:
11
- - sudo apt update -qq
12
- - sudo apt install -qq uuid-dev uuid libncursesw5-dev libncursesw5 gnupg2 pandoc
13
- - git submodule update --init --recursive
14
-
15
- script:
16
- - bundle exec rake travis
17
- - bundle exec gem install pkg/sup-*.gem
18
-
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
4
-
5
- require "sup"
6
- require "fileutils"
7
-
8
- if RUBY_VERSION >= "2.1"
9
- puts "YAML migration is deprecated by Ruby 2.1 and newer."
10
- exit
11
- end
12
-
13
- Redwood.start
14
-
15
- fn = Redwood::SOURCE_FN
16
- FileUtils.cp fn, "#{fn}.syck_bak"
17
-
18
- Redwood::SourceManager.load_sources fn
19
- Redwood::SourceManager.save_sources fn, true
20
-
21
- Redwood.finish
@@ -1,18 +0,0 @@
1
- require "test_helper"
2
-
3
- require "sup/service/label_service"
4
-
5
- require "tmpdir"
6
-
7
- describe Redwood::LabelService do
8
- let(:tmpdir) { Dir.mktmpdir }
9
- after do
10
- require "fileutils"
11
- FileUtils.remove_entry_secure @tmpdir unless @tmpdir.nil?
12
- end
13
-
14
- describe "#add_labels" do
15
- # Integration tests are hard to write at this moment :(
16
- it "add labels to all messages matching the query"
17
- end
18
- end
@@ -1,85 +0,0 @@
1
- require "test_helper"
2
-
3
- require "sup"
4
- require "psych"
5
-
6
- if RUBY_VERSION < "2.1"
7
- describe "Sup's YAML util" do
8
- describe "Module#yaml_properties" do
9
- def build_class_with_name name, &b
10
- Class.new do
11
- meta_cls = class << self; self; end
12
- meta_cls.send(:define_method, :name) { name }
13
- class_exec(&b) unless b.nil?
14
- end
15
- end
16
-
17
- after do
18
- Psych.load_tags = {}
19
- Psych.dump_tags = {}
20
- end
21
-
22
- it "defines YAML tag for class" do
23
- cls = build_class_with_name 'Cls' do
24
- yaml_properties
25
- end
26
-
27
- expected_yaml_tag = "!supmua.org,2006-10-01/Cls"
28
-
29
- Psych.load_tags[expected_yaml_tag].must_equal cls
30
- Psych.dump_tags[cls].must_equal expected_yaml_tag
31
-
32
- end
33
-
34
- it "Loads legacy YAML format as well" do
35
- cls = build_class_with_name 'Cls' do
36
- yaml_properties :id
37
- attr_accessor :id
38
- def initialize id
39
- @id = id
40
- end
41
- end
42
-
43
- Psych.load_tags["!masanjin.net,2006-10-01/Cls"].must_equal cls
44
-
45
- yaml = <<EOF
46
- --- !masanjin.net,2006-10-01/Cls
47
- id: ID
48
- EOF
49
- loaded = YAML.load(yaml)
50
-
51
- loaded.id.must_equal 'ID'
52
- loaded.must_be_kind_of cls
53
- end
54
-
55
- it "Dumps & loads w/ state re-initialized" do
56
- cls = build_class_with_name 'Cls' do
57
- yaml_properties :id
58
- attr_accessor :id
59
- attr_reader :flag
60
-
61
- def initialize id
62
- @id = id
63
- @flag = true
64
- end
65
- end
66
-
67
- instance = cls.new 'ID'
68
-
69
- dumped = YAML.dump(instance)
70
- loaded = YAML.load(dumped)
71
-
72
- dumped.must_equal <<-EOF
73
- --- !supmua.org,2006-10-01/Cls
74
- id: ID
75
- EOF
76
-
77
- loaded.id.must_equal 'ID'
78
- assert loaded.flag
79
- end
80
- end
81
- end
82
-
83
- else
84
- puts "Some YAML tests are skipped on Ruby 2.1.0 and newer."
85
- end