Closed ghost closed 9 years ago
Hey @tba, I'm really sorry it took so long to get back to you on this. It's been a busy year for me! If you're at all interested, I'd love to add you to the project as a collaborator and let you merge this yourself.
Your code change seems great. It'd be perfect if it also included a test. Would a test for this fix look something like this?
it "allows non-ASCII sender names" do
email = [
"Date: Fri, 30 Nov 2012 17:09:33 +0000",
"From: Александр <test@example.org>",
"Message-ID: <qwertyuioasdfghjk@mail.example.org>",
"Subject: Test Email",
"To: henry@henrysmith.org",
"",
"Hey,",
"This is a test email.",
"Bye!",
].join("\n")
@storage.should_receive(:load_contact).and_return(nil)
contacts = @adapter.scrape_contacts(email)
contacts.first.name.full.should eq "Александр"
end
Argh, sorry again for being so pathetically slow to reply. For what it's worth, I'm taking steps to prevent myself from blocking important fixes like these.
Hello!
Of course you are right. I forgot about tests. Sorry about that. I've added test you suggested. But probably in email header not Александр <test@example.com>
, but encoded =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGA?= <test@example.org>
.
Righty then, that's merged and should be fine as of version 2.3.3.
Thank you so much for being so patient with me :smile: