sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit c09945efe3d4599c904883a455318e4b7b5d3298
parent f599d5cbb86972d0267b928cc6362a04b14b7b0c
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Thu, 25 Mar 2010 23:22:27 -0700

s/MBox::Loader/MBox/

Diffstat:
M bin/sup-add | 2 +-
M bin/sup-config | 2 +-
M bin/sup-recover-sources | 2 +-
M bin/sup-sync-back | 4 ++--
M lib/sup/sent.rb | 2 +-
M test/test_header_parsing.rb | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bin/sup-add b/bin/sup-add
@@ -99,7 +99,7 @@ begin
       when "maildir"
         Redwood::Maildir.new uri, !$opts[:unusual], $opts[:archive], nil, labels
       when "mbox"
-        Redwood::MBox::Loader.new uri, !$opts[:unusual], $opts[:archive], nil, labels
+        Redwood::MBox.new uri, !$opts[:unusual], $opts[:archive], nil, labels
       when nil
         Trollop::die "Sources must be specified with an URI"
       else
diff --git a/bin/sup-config b/bin/sup-config
@@ -57,7 +57,7 @@ def add_source
       return if fn.nil? || fn.empty?
 
       $last_fn = fn
-      [Redwood::MBox::Loader.suggest_labels_for(fn),
+      [Redwood::MBox.suggest_labels_for(fn),
        { :scheme => "mbox", :path => fn }]
     when :maildir
       $last_fn ||= ENV["MAIL"]
diff --git a/bin/sup-recover-sources b/bin/sup-recover-sources
@@ -58,7 +58,7 @@ ARGV.each do |fn|
   next if Redwood::SourceManager.source_for fn
 
   ## TODO: merge this code with the same snippet in import
-  source = Redwood::MBox::Loader.new(fn, nil, !$opts[:unusual], $opts[:archive])
+  source = Redwood::MBox.new(fn, nil, !$opts[:unusual], $opts[:archive])
 
   source_ids = Hash.new 0
   count = 0
diff --git a/bin/sup-sync-back b/bin/sup-sync-back
@@ -82,12 +82,12 @@ begin
 
   sources = ARGV.map do |uri|
     s = Redwood::SourceManager.source_for(uri) or die "unknown source: #{uri}. Did you add it with sup-add first?"
-    s.is_a?(Redwood::MBox::Loader) or die "#{uri} is not an mbox source."
+    s.is_a?(Redwood::MBox) or die "#{uri} is not an mbox source."
     s
   end
 
   if sources.empty?
-    sources = Redwood::SourceManager.usual_sources.select { |s| s.is_a? Redwood::MBox::Loader }
+    sources = Redwood::SourceManager.usual_sources.select { |s| s.is_a? Redwood::MBox }
   end
 
   unless sources.all? { |s| s.file_path.nil? } || File.executable?(dotlockfile) || opts[:dont_use_dotlockfile]
diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb
@@ -35,7 +35,7 @@ class SentManager
   end
 end
 
-class SentLoader < MBox::Loader
+class SentLoader < MBox
   yaml_properties
 
   def initialize
diff --git a/test/test_header_parsing.rb b/test/test_header_parsing.rb
@@ -106,7 +106,7 @@ EOS
   end
 
   def test_from_line_splitting
-    l = MBox::Loader.new StringIO.new(<<EOS)
+    l = MBox.new StringIO.new(<<EOS)
 From sup-talk-bounces@rubyforge.org Mon Apr 27 12:56:18 2009
 From: Bob <bob@bob.com>
 To: a dear friend
@@ -132,7 +132,7 @@ EOS
   end
 
   def test_more_from_line_splitting
-    l = MBox::Loader.new StringIO.new(<<EOS)
+    l = MBox.new StringIO.new(<<EOS)
 From sup-talk-bounces@rubyforge.org Mon Apr 27 12:56:18 2009
 From: Bob <bob@bob.com>
 To: a dear friend