[DRE-commits] [ruby-mail] 05/07: restore upstream source
Antonio Terceiro
terceiro at moszumanska.debian.org
Tue Sep 22 18:13:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-mail.
commit e428b1cdbf61d92db69978a548f8d67c5038babc
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Sep 22 15:04:00 2015 -0300
restore upstream source
I have no idea how these changes crept in :-(
---
VERSION | 4 ----
lib/mail/message.rb | 2 --
spec/mail/body_spec.rb | 6 ------
spec/mail/elements/address_spec.rb | 7 -------
spec/mail/encodings_spec.rb | 23 ---------------------
spec/mail/fields/content_type_field_spec.rb | 1 -
spec/mail/header_spec.rb | 17 ----------------
spec/mail/message_spec.rb | 21 -------------------
spec/mail/network/retriever_methods/imap_spec.rb | 5 -----
spec/mail/parsers/address_lists_parser_spec.rb | 18 ----------------
spec/matchers_spec.rb | 26 ------------------------
11 files changed, 130 deletions(-)
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 8923560..0000000
--- a/VERSION
+++ /dev/null
@@ -1,4 +0,0 @@
-major:2
-minor:6
-patch:1
-build:
diff --git a/lib/mail/message.rb b/lib/mail/message.rb
index f7db708..5a4ece0 100644
--- a/lib/mail/message.rb
+++ b/lib/mail/message.rb
@@ -1988,8 +1988,6 @@ module Mail
def raw_source=(value)
value = value.dup.force_encoding(Encoding::BINARY) if RUBY_VERSION >= "1.9.1"
@raw_source = value.to_crlf
- @raw_source.force_encoding("binary") if RUBY_VERSION >= "1.9.1"
- @raw_source
end
# see comments to body=. We take data and process it lazily
diff --git a/spec/mail/body_spec.rb b/spec/mail/body_spec.rb
index e1c59e8..3fc1261 100644
--- a/spec/mail/body_spec.rb
+++ b/spec/mail/body_spec.rb
@@ -234,12 +234,6 @@ describe Mail::Body do
expect { body.split!(nil) }.not_to raise_error
end
- it "should split if boundary is not set" do
- multipart_body = "\n\n--\nDate: Thu, 01 Aug 2013 15:14:20 +0100\nMime-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment;\n filename=\"\"\nContent-ID: <51fa6d3cac796_d84e3fe5a58349e025683 at local.mail>\n\n\n\n----"
- body = Mail::Body.new(multipart_body)
- doing { body.split!(nil) }.should_not raise_error
- end
-
end
describe "detecting non ascii" do
diff --git a/spec/mail/elements/address_spec.rb b/spec/mail/elements/address_spec.rb
index 9673e20..fcd4b9e 100644
--- a/spec/mail/elements/address_spec.rb
+++ b/spec/mail/elements/address_spec.rb
@@ -131,13 +131,6 @@ describe Mail::Address do
expect(a.comments).to eq result
end
- it "should handle nested comments" do
- parse_text = "bob at example.com (hello (nested) yeah)"
- result = ["hello \(nested\) yeah"]
- a = Mail::Address.new(parse_text)
- a.comments.should eq result
- end
-
it "should give back the raw value" do
parse_text = "Mikel (first name) Lindsaar (author) <test at lindsaar.net>"
result = "Mikel (first name) Lindsaar (author) <test at lindsaar.net>"
diff --git a/spec/mail/encodings_spec.rb b/spec/mail/encodings_spec.rb
index 5bd061b..cbdf070 100644
--- a/spec/mail/encodings_spec.rb
+++ b/spec/mail/encodings_spec.rb
@@ -170,18 +170,6 @@ describe Mail::Encodings do
expect(Mail::Encodings.value_decode("=?utf-8?B??=")).to eq ""
end
- it "should collapse adjacent words" do
- string = "=?utf-8?B?0L3QvtCy0YvQuSDRgdC+0YLRgNGD0LTQvdC40Log4oCUINC00L7RgNC+0YQ=?=\n =?utf-8?B?0LXQtdCy?="
- result = "новый сотрудник — дорофеев"
- Mail::Encodings.value_decode(string).should == result
- end
-
- it "should parse adjacent words with no space" do
- string = "=?utf-8?B?0L3QvtCy0YvQuSDRgdC+0YLRgNGD0LTQvdC40Log4oCUINC00L7RgNC+0YQ=?==?utf-8?B?0LXQtdCy?="
- result = "новый сотрудник — дорофеев"
- Mail::Encodings.value_decode(string).should == result
- end
-
if '1.9'.respond_to?(:force_encoding)
it "should decode 8bit encoded string" do
string = "=?8bit?Q?ALPH=C3=89E?="
@@ -665,11 +653,6 @@ describe Mail::Encodings do
expect(decoded).to eq("[kj] Re: [kj] [KJ] Money is not our god should be played on US Tour...+ Elys?e Montmartre")
end
- it "should recognize iso646-us" do
- decoded = Mail::Encodings.value_decode "[kj] =?ISO646-US?Q?Re:_[kj]_[KJ]_Money_is_not_our_god_should_?=\r\n =?ISO646-US?Q?be_played_on_US_Tour...+_Elys=3Fe_Montmartre?="
- decoded.should == "[kj] Re: [kj] [KJ] Money is not our god should be played on US Tour...+ Elys?e Montmartre"
- end
-
it "should unquote multiple strings in the middle of the text" do
a = "=?Shift_JIS?Q?=93=FA=96{=8C=EA=?= <a at example.com>, =?Shift_JIS?Q?=93=FA=96{=8C=EA=?= <b at example.com>"
b = Mail::Encodings.unquote_and_convert_to(a, 'utf-8')
@@ -694,12 +677,6 @@ describe Mail::Encodings do
expect(b).to eq "Der Kunde ist König"
end
- it "should handle utf_8" do
- a = 'Der Kunde ist K=?utf_8?B?w7Y=?=nig'
- b = Mail::Encodings.unquote_and_convert_to(a, 'utf-8')
- b.should eq "Der Kunde ist König"
- end
-
end
end
diff --git a/spec/mail/fields/content_type_field_spec.rb b/spec/mail/fields/content_type_field_spec.rb
index 0a86abc..35e9fcb 100644
--- a/spec/mail/fields/content_type_field_spec.rb
+++ b/spec/mail/fields/content_type_field_spec.rb
@@ -738,7 +738,6 @@ describe Mail::ContentTypeField do
end
it "should just ignore illegal params like audio/x-midi;\r\n\sname=Part .exe" do
- pending "fixed in pr #481"
c = Mail::ContentTypeField.new("audio/x-midi;\r\n\sname=Part .exe")
expect(c.string).to eq 'audio/x-midi'
expect(c.parameters['name']).to eq nil
diff --git a/spec/mail/header_spec.rb b/spec/mail/header_spec.rb
index c331c51..6ef7b00 100644
--- a/spec/mail/header_spec.rb
+++ b/spec/mail/header_spec.rb
@@ -26,17 +26,6 @@ describe Mail::Header do
end
- describe "copying" do
-
- it "should instantiate with a string passed in" do
- header = Mail::Header.new("To: Mikel\r\nFrom: bob\r\n")
- copy = header.dup
- copy.to_a.should == header.to_a
- copy[:to].should == header[:to]
- end
-
- end
-
describe "instance methods" do
it "should save away the raw source of the header that it is passed" do
@@ -80,12 +69,6 @@ describe Mail::Header do
header['content-type'] = 'text/plain'
expect(header.charset).to eq 'utf-8'
end
-
- it "should not unset previously set charset if content-type is set without charset" do
- header = Mail::Header.new(nil, 'utf-8')
- header['content-type'] = 'text/plain'
- header.charset.should eq 'utf-8'
- end
it "shouldn't die when queried for a charset and the content-type header is invalid" do
header = Mail::Header.new
diff --git a/spec/mail/message_spec.rb b/spec/mail/message_spec.rb
index 6d9b709..53d8c15 100644
--- a/spec/mail/message_spec.rb
+++ b/spec/mail/message_spec.rb
@@ -1697,15 +1697,6 @@ describe Mail::Message do
mail.deliver
end
- it "should allow observers to be unregistered" do
- mail = Mail.new(:from => 'bob at example.com', :to => 'bobette at example.com')
- mail.delivery_method :test
- Mail.register_observer(ObserverAgent)
- Mail.unregister_observer(ObserverAgent)
- ObserverAgent.should_not_receive(:delivered_email).with(mail)
- mail.deliver
- end
-
it "should inform observers that the mail was sent, even if a delivery agent is used" do
mail = Mail.new
mail.delivery_handler = DeliveryAgent
@@ -1759,18 +1750,6 @@ describe Mail::Message do
expect(mail.to).to eq ['fred at example.com']
end
- it "should allow interceptors to be unregistered" do
- mail = Mail.new(:from => 'bob at example.com', :to => 'bobette at example.com')
- mail.to = 'fred at example.com'
- mail.delivery_method :test
- Mail.register_interceptor(InterceptorAgent)
- InterceptorAgent.intercept = true
- Mail.unregister_interceptor(InterceptorAgent)
- mail.deliver
- InterceptorAgent.intercept = false
- mail.to.should eq ['fred at example.com']
- end
-
end
describe "error handling" do
diff --git a/spec/mail/network/retriever_methods/imap_spec.rb b/spec/mail/network/retriever_methods/imap_spec.rb
index f6b93d2..720264d 100644
--- a/spec/mail/network/retriever_methods/imap_spec.rb
+++ b/spec/mail/network/retriever_methods/imap_spec.rb
@@ -85,11 +85,6 @@ describe "IMAP Retriever" do
expect(messages[0].raw_source).to eq MockIMAP.examples.map { |m| m.attr['RFC822'] }[1]
end
- it "should handle the :uid option" do
- messages = Mail.find(:uid => 1)
-
- messages[0].raw_source.should eq MockIMAP.examples.map { |m| m.attr['RFC822'] }[1]
- end
it "should find the last 10 messages by default" do
messages = Mail.find
diff --git a/spec/mail/parsers/address_lists_parser_spec.rb b/spec/mail/parsers/address_lists_parser_spec.rb
index 802dd56..8693da1 100644
--- a/spec/mail/parsers/address_lists_parser_spec.rb
+++ b/spec/mail/parsers/address_lists_parser_spec.rb
@@ -31,22 +31,4 @@ describe "AddressListsParser" do
expect(a.parse(text).addresses.first.local).to eq 'ababab'
end
end
-
- context "parsing an address with a space at the end" do
- it "only finds a single address" do
- text = 'Mikel Lindsaar <test at lindsaar.net> '
- a = Mail::Parsers::AddressListsParser.new
- a.parse(text).addresses.size.should eq 1
- end
- end
-
- context "parsing an address which begins with a comment" do
- it "extracts local string correctly" do
- text = '(xxxx xxxxxx xxxx)ababab at example.com'
-
- a = Mail::Parsers::AddressListsParser.new
- a.parse(text).addresses.size.should eq 1
- a.parse(text).addresses.first.local.should eq 'ababab'
- end
- end
end
diff --git a/spec/matchers_spec.rb b/spec/matchers_spec.rb
index 10a9871..bbff4a1 100644
--- a/spec/matchers_spec.rb
+++ b/spec/matchers_spec.rb
@@ -103,32 +103,6 @@ describe "have_sent_email" do
end
end
- context "with #cc" do
- context "and a matching recipient" do
- it { should have_sent_email.cc('mom at example.com') }
- it { should have_sent_email.cc('dad at example.com') }
- it { should have_sent_email.cc('mom at example.com').cc('dad at example.com') }
- it { should have_sent_email.cc(['mom at example.com', 'dad at example.com']) }
- end
-
- context "and a non-matching recipient" do
- it { should_not have_sent_email.cc('granny at example.com') }
- end
- end
-
- context "with #bcc" do
- context "and a matching recipient" do
- it { should have_sent_email.bcc('alice at example.com') }
- it { should have_sent_email.bcc('sue at example.com') }
- it { should have_sent_email.bcc('alice at example.com').bcc('sue at example.com') }
- it { should have_sent_email.bcc(['alice at example.com', 'sue at example.com']) }
- end
-
- context "and a non-matching recipient" do
- it { should_not have_sent_email.bcc('mario at example.com') }
- end
- end
-
context "with #subject" do
context "and a matching subject" do
it { is_expected.to have_sent_email.with_subject('The facts you requested') }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mail.git
More information about the Pkg-ruby-extras-commits
mailing list