FIX: update mail gem to fix UTF-8 parsing issue

This commit is contained in:
Régis Hanol 2018-04-25 21:52:54 +02:00
parent 416c79daa5
commit ddb092f397
5 changed files with 9 additions and 9 deletions

View File

@ -24,7 +24,7 @@ else
gem 'seed-fu'
end
gem 'mail', require: false
gem 'mail', '2.7.1.rc1', require: false
gem 'mini_mime'
gem 'mini_suffix'

View File

@ -161,14 +161,14 @@ GEM
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lru_redux (1.1.0)
mail (2.7.0)
mail (2.7.1.rc1)
mini_mime (>= 0.1.1)
memory_profiler (0.9.10)
message_bus (2.1.4)
rack (>= 1.1.3)
metaclass (0.0.4)
method_source (0.8.2)
mini_mime (0.1.3)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
mini_racer (0.1.15)
libv8 (~> 6.3)
@ -436,7 +436,7 @@ DEPENDENCIES
logstash-logger
logster
lru_redux
mail
mail (= 2.7.1.rc1)
memory_profiler
message_bus
mini_mime

View File

@ -183,7 +183,7 @@ describe Email::Receiver do
it "works" do
expect { process(:text_reply) }.to change { topic.posts.count }
expect(topic.posts.last.raw).to eq("This is a text reply :)")
expect(topic.posts.last.raw).to eq("This is a text reply :)\n\nEmail parsing should not break because of a UTF-8 character: ")
expect(topic.posts.last.via_email).to eq(true)
expect(topic.posts.last.cooked).not_to match(/<br/)
@ -233,7 +233,7 @@ describe Email::Receiver do
it "uses text when prefer_html site setting is enabled but no html is available" do
SiteSetting.incoming_email_prefer_html = true
expect { process(:text_reply) }.to change { topic.posts.count }
expect(topic.posts.last.raw).to eq("This is a text reply :)")
expect(topic.posts.last.raw).to eq("This is a text reply :)\n\nEmail parsing should not break because of a UTF-8 character: ")
end
it "removes the 'on <date>, <contact> wrote' quoting line" do

View File

@ -9,7 +9,7 @@ Subject: Fwd: Ça Discourse ?
Objet: Ça Discourse ?
Date: 2017-01-04 11:27
De: Un Français <un@francais.fr>
À: ba@bar.com
A: ba@bar.com
Bonjour,

View File

@ -3,8 +3,8 @@ From: Foo Bar <discourse@bar.com>
To: reply+4f97315cc828096c9cb34c6f1a0d6fe8@bar.com
Date: Fri, 15 Jan 2016 00:12:43 +0100
Message-ID: <15@foo.bar.mail>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
This is a text reply :)
Email parsing should not break because of a UTF-8 character: