You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/02/11 22:29:36 UTC

[whimsy] branch master updated: Input is the raw email from file or stdin

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 <se...@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
 
   #