From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by bl2.djc.id.au (Postfix, from userid 1000) id 4132D29C474; Sun, 18 Oct 2026 12:52:23 +1100 (AEDT) Date: Sun, 18 Oct 2026 12:52:26 +1100 To: sup-commits@supmua.dev Subject: [sup.git] 04/06: delete unused load_header method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Reply-To: Dan Callaghan In-Reply-To: <179228834279.389402.1183876010618010579@bl2.djc.id.au> References: <179228834279.389402.1183876010618010579@bl2.djc.id.au> Thread-Index: AQAAEjRWNCbjvxiESNeReEpYhFO1Gg== X-Git-Host: bl2.djc.id.au X-Git-Repo: sup.git X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Rev: d37b2c2965c5e164207e2021eee9e83ea08079d5 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.7.dev Auto-Submitted: auto-generated Message-Id: <20261018015223.4132D29C474@bl2.djc.id.au> From: Dan Callaghan List-Id: New commit on branch develop: https://supmua.dev/git/sup/commit/d37b2c2965c5e164207e2021eee9e83ea08079d5.html commit d37b2c2965c5e164207e2021eee9e83ea08079d5 Author: Dan Callaghan AuthorDate: Sat Oct 17 13:09:39 2026 +1100 delete unused load_header method --- lib/sup/draft.rb | 4 ---- lib/sup/maildir.rb | 4 ---- lib/sup/mbox.rb | 10 ---------- lib/sup/message.rb | 4 ---- lib/sup/source.rb | 1 - test/dummy_source.rb | 4 ---- 6 files changed, 27 deletions(-) diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb index 775f796a..2428f113 100644 --- a/lib/sup/draft.rb +++ b/lib/sup/draft.rb @@ -70,10 +70,6 @@ class DraftLoader < Source def fn_for_offset o; File.join(@dir, o.to_s); end - def load_header offset - File.open(fn_for_offset(offset)) { |f| parse_raw_email_header f } - end - def load_message offset raise SourceError, "Draft not found" unless File.exist? fn_for_offset(offset) File.open(fn_for_offset(offset)) do |f| diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index 1c3aecd1..488698f1 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -84,10 +84,6 @@ class Maildir < Source end end - def load_header id - with_file_for(id) { |f| parse_raw_email_header f } - end - def load_message id with_file_for(id) { |f| RMail::Parser.read f } end diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb index 04dc47b0..471b89a6 100644 --- a/lib/sup/mbox.rb +++ b/lib/sup/mbox.rb @@ -69,16 +69,6 @@ class MBox < Source end end - def load_header offset - header = nil - @mutex.synchronize do - ensure_open - @f.seek offset - header = parse_raw_email_header @f - end - header - end - def load_message offset @mutex.synchronize do ensure_open diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 24e5464c..ce5e1757 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -48,8 +48,6 @@ class Message attr_accessor :locations - ## if you specify a :header, will use values from that. otherwise, - ## will try and load the header from the source. def initialize opts @locations = opts[:locations] or raise ArgumentError, "locations can't be nil" @snippet = opts[:snippet] @@ -64,8 +62,6 @@ class Message ## we need to initialize this. see comments in parse_header as to ## why. @refs = [] - - #parse_header(opts[:header] || @source.load_header(@source_info)) end def decode_header_field v diff --git a/lib/sup/source.rb b/lib/sup/source.rb index 4d672cae..29120c18 100644 --- a/lib/sup/source.rb +++ b/lib/sup/source.rb @@ -33,7 +33,6 @@ class Source ## To write a new source, subclass this class, and implement: ## ## - initialize - ## - load_header offset ## - load_message offset ## - raw_header offset ## - raw_message offset diff --git a/test/dummy_source.rb b/test/dummy_source.rb index 1e2492a0..0389db2c 100644 --- a/test/dummy_source.rb +++ b/test/dummy_source.rb @@ -32,10 +32,6 @@ class DummySource < Source File.open(fn, 'rb') { |f| yield f } end - def load_header id - with_file_for(id) { |f| parse_raw_email_header f } - end - def load_message id with_file_for(id) { |f| RMail::Parser.read f } end