whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: More CRLF conversions on mails where attachments aren't an issue
Date Wed, 08 Nov 2017 18:07:58 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 4d73327  More CRLF conversions on mails where attachments aren't an issue
4d73327 is described below

commit 4d73327b80aa173ea70503105e7e7eb3b425921a
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Wed Nov 8 13:07:40 2017 -0500

    More CRLF conversions on mails where attachments aren't an issue
---
 tools/svnupdate.rb          | 2 +-
 tools/travis-relay.rb       | 2 +-
 www/members/nominations.cgi | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/svnupdate.rb b/tools/svnupdate.rb
index cafe3ad..6890089 100644
--- a/tools/svnupdate.rb
+++ b/tools/svnupdate.rb
@@ -7,7 +7,7 @@ require 'mail'
 
 File.umask(0002)
 
-mail = Mail.new(STDIN.read)
+mail = Mail.new(STDIN.read.encode(crlf_newline: true))
 
 LOG = '/srv/whimsy/www/logs/svn-update'
 
diff --git a/tools/travis-relay.rb b/tools/travis-relay.rb
index 9652b9e..1d6ff9f 100644
--- a/tools/travis-relay.rb
+++ b/tools/travis-relay.rb
@@ -16,7 +16,7 @@ require 'whimsy/asf'
 
 ASF::Mail.configure
 
-original = Mail.new(STDIN.read)
+original = Mail.new(STDIN.read.encode(crlf_newline: true))
 exit unless original.from.include? "builds@travis-ci.org"
 
 copy = Mail.new
diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index 8ff4d6b..98108aa 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -25,7 +25,7 @@ archive.each do |email|
   subject = message[/^Subject: .*/]
   next unless subject.upcase.include? "MEMBER"
   next unless subject.upcase =~ /NOMI[NM]ATION/
-  mail = Mail.new(message)
+  mail = Mail.new(message.encode(message.encoding, crlf_newline: true))
   next if mail.subject.downcase == 'member nomination process'
   emails << mail if mail.subject =~ /^\[?MEMBER(SHIP)? NOMI[MN]ATION\]?/i
 end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message