whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Input is the raw email from file or stdin
Date Mon, 11 Feb 2019 22:29:36 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 94e8a90  Input is the raw email from file or stdin
94e8a90 is described below

commit 94e8a9049142964bb2bf8ec78c3e844ccc676ed0
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Feb 11 22:29:35 2019 +0000

    Input is the raw email from file or stdin
---
 www/secretary/workbench/models/message.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/secretary/workbench/models/message.rb b/www/secretary/workbench/models/message.rb
index 02b6598..09dd0ad 100644
--- a/www/secretary/workbench/models/message.rb
+++ b/www/secretary/workbench/models/message.rb
@@ -16,11 +16,11 @@ class Message
   #
   # create a new message
   #
-  def initialize(mailbox, hash, headers, email)
+  def initialize(mailbox, hash, headers, raw)
     @hash = hash
     @mailbox = mailbox
     @headers = headers
-    @email = email
+    @raw = raw
   end
 
   #
@@ -51,11 +51,11 @@ class Message
   #
 
   def mail
-    @mail ||= Mail.new(@email.gsub(LF_ONLY, CRLF))
+    @mail ||= Mail.new(@raw.gsub(LF_ONLY, CRLF))
   end
 
   def raw
-    @email
+    @raw
   end
 
   def id
@@ -163,7 +163,7 @@ class Message
   def write_email
     dir = @mailbox.dir
     Dir.mkdir dir, 0755 unless Dir.exist? dir
-    File.write File.join(dir, @hash), @email, encoding: Encoding::BINARY
+    File.write File.join(dir, @hash), @raw, encoding: Encoding::BINARY
   end
 
   #


Mime
View raw message