Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed scanner.rb so that it passes the same tests as scanner.c. Also …

…fixed up all the tests to require test_helper.rb so that the load path is correct.
  • Loading branch information...
commit 40d5744bb1121a428e6f84e03671f9c5ac63b4a2 1 parent 24bf4da
@mikel authored
View
85 NOTES
@@ -1,9 +1,84 @@
[ANN] TMail 1.2.0
-TMail is Ruby on Mail!
+TMail is The Mail Handling Library for Ruby!
-New release adds extensive new documentation;
-Removed base64.c since the Ruby version is just
-as fast; and renames the old Scanner_C extension
-to MailScanner.
+TMail is the Ruby Mail handler used in the
+Ruby on Rails and Nitro web frame works as
+well as many others (now including, the Ruby
+Talk mail gateway!).
+TMail is now a gem. You can install it on any
+platform via:
+
+# gem install tmail
+
+Alternatively you can download the source code
+or view extra documentation at the website:
+
+http://tmail.rubyforge.org/
+
+
+Release Summary:
+------------------
+New release handles two tickets in the TMail
+tracker as well as a lot more documentation and
+removes an unnecessary c-library.
+
+
+Release Update Details:
+-------------------------
+
+Closed 15445 - TMail::Mail#create_forward now returns
+a new Mail object that has the original mail as an
+encoded 7 bit multipart attachment. Also moved
+create_forward and create_reply from tmail/net
+into tmail/interface as it makes more sense to have
+it there.
+
+Closed 15643 - TMail::Mail#reply_addresses was
+returning an empty array if reply_to was set to nil
+(ie, the header field existed but was empty) instead
+of returning the from address or default.
+
+Removed base64.c after doing profiling on several
+platforms and finding out that the Ruby inbuilt
+version is just as fast (varies per platform but
+all in all about the same speed.)
+
+Renamed the Scanner_C extension to MailScanner.
+
+New release adds extensive new documentation to
+mainly the TMail::Mail class, approximately 500
+lines of examples have been included in the RDoc.
+
+Added a default value to TMail::Mail#sender method
+to allow arbitrary defaults to be passed into the
+method in alignment with all the other mail interface
+methods.
+
+Made base64_decode and base64_encode into ! versions
+as they are destructive on the mail body (encodes the
+body to base64 or decodes it), made aliases for
+base64_decode and base64_encode to point back to the
+bang versions. Doing this with a view to change
+base64_encode to a non destructive version
+(returns the encoded body) in future versions.
+
+See the changelog for previous changes.
+
+
+Bug Reports / Fixes:
+----------------------
+
+As always, we really welcome any bug reports or code
+for patches you have created. Please submit anything
+you find through our RubyForge tracker project which
+you can get to from our website:
+
+http://tmail.rubyforge.org/
+
+
+We hope you enjoy this release!
+
+
+The TMail Team.
View
3  doc/index.html
@@ -118,6 +118,9 @@
<h2>News</h2>
<ul>
+ <li>19th of November, 2007
+ <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=15445&group_id=4512&atid=17370">
+ Create forward now returns a mail object in trunk</a>
<li>8th of November, 2007
<a href="http://rubyforge.org/forum/forum.php?forum_id=18816">
New Release - 1.1.1 - bug fixes &amp; Windows/Unix in one Gem
View
3  lib/tmail/scanner_r.rb
@@ -43,9 +43,8 @@ class MailScanner
}
alnum = 'a-zA-Z0-9'
- atomsyms = %q[ _#!$%&`'*+-{|}~^@/=? ].strip
+ atomsyms = %q[ _#!$%&`'*+-{|}~^/=? ].strip
tokensyms = %q[ _#!$%&`'*+-{|}~^@. ].strip
-
atomchars = alnum + Regexp.quote(atomsyms)
tokenchars = alnum + Regexp.quote(tokensyms)
iso2022str = '\e(?!\(B)..(?:[^\e]+|\e(?!\(B)..)*\e\(B'
View
17 log/History.txt
@@ -1,16 +1,23 @@
=== 1.2.0 / 2007-11-29
-* Extensive documentation work. (mikel)
-* Renamed scanner_c.c to mailscanner.c.
-* Removed base64 c extension. It's speed benefit was negligable (only 0.2 sec over 10000 sizable encode/decode runs).
+* 5 major enhancements:
+ * Extensive documentation work. (mikel)
+ * Removed base64 c extension. It's speed benefit was negligable (only 0.2 sec over 10000 sizable encode/decode runs) (trans)
+ * Closed 15445 - TMail::Mail#create_forward now returns a new Mail object that has the original mail as an encoded 7 bit multipart attachment. Also moved create_forward and create_reply from tmail/net into tmail/interface as it makes more sense to have it there. (mikel)
+ * Closed 15643 - TMail::Mail#reply_addresses was returning an empty array if reply_to was set to nil (ie, the header field existed but was empty) instead of returning the from address or default. (mikel)
+ * Fixed scanner.rb so that it would pass the same tests that the C version does - had a sundry @ symbol inside of the ATOM CHARS
+* 3 minor enhancements:
+ * Renamed scanner_c.c to mailscanner.c (trans)
+ * Changed TMail::Mail#sender to have a default "default" value of nil to be in alignment with all the other interface methods (mikel)
+ * Made base64_decode and base64_encode into ! versions as they are destructive on the mail body (encodes the body to base64 or decodes it), made aliases for base64_decode and base64_encode to point back to the bang versions. Doing this with a view to change base64_encode to a non destructive version (returns the encoded body) in future versions. (mikel)
=== 1.1.1 / 2007-11-05
-* 1 major enhancement:
+* 3 major enhancement:
* Created unified package, for installation in any platform.
* Added require_arch.rb to facilitate multi-platform support.
* If compilation fails, set NORUBYEXT="true" and reinstall.
-* 1 minor enhancement:
+* 3 minor enhancement:
* Fixed line wrapping of long header fields so that they wrap at the correct whitespace points.
* Fixed bug where re-assigning the mail.body to existing mail object that already had a parsed body would not re-parse the body.
* Started documenting the source code... lots more to do.
View
6 sample/bench_base64.rb
@@ -11,7 +11,7 @@ module Base64
$lib = ARGV[0]
$count = 10000
-$size = 500
+$size = 5000
def make_random_string(len)
buf = ''
@@ -27,10 +27,10 @@ def encode_and_decode(orig)
if $lib == "c"
$lib = " c"
- require 'tmail/base64_c.so'
+ require 'ext/base64_c/tmail/base64_c.bundle'
else
$lib = "ruby"
- require 'tmail/base64_r.rb'
+ require 'lib/tmail/base64_r.rb'
end
def benchmark!
View
4 test/test_address.rb
@@ -1,8 +1,6 @@
$:.unshift File.dirname(__FILE__)
-require 'tmail/address'
-require 'extctrl'
-require 'test/unit'
require 'test_helper'
+require 'tmail/address'
class TestAddress < Test::Unit::TestCase
View
3  test/test_attachments.rb
@@ -1,6 +1,5 @@
-require 'tmail'
-require 'test/unit'
require 'test_helper'
+require 'tmail'
class TestAttachments < Test::Unit::TestCase
View
1  test/test_base64.rb
@@ -1,3 +1,4 @@
+require 'test_helper'
require 'tmail/base64'
require 'test/unit'
View
1  test/test_encode.rb
@@ -1,3 +1,4 @@
+require 'test_helper'
require 'tmail/port'
require 'tmail/encode'
require 'nkf'
View
5 test/test_header.rb
@@ -1,11 +1,9 @@
$:.unshift File.dirname(__FILE__)
+require 'test_helper'
require 'tmail'
require 'tmail/header'
require 'kcode'
-require 'extctrl'
-require 'test/unit'
require 'time'
-require 'test_helper'
class UnstructuredHeaderTester < Test::Unit::TestCase
def test_s_new
@@ -420,6 +418,7 @@ def test_ATTRS
=end
# word + domain-literal in FROM
+
h = TMail::HeaderField.new('Received',
'from localhost [192.168.1.1]; Sat, 19 Dec 1998 22:19:50 PST')
assert_equal 'localhost', h.from
View
8 test/test_helper.rb
@@ -0,0 +1,8 @@
+# Add in the local library for the load path so we get that before any possible
+# gem that is already installed.
+$:.unshift File.dirname(__FILE__) + "/../lib"
+$:.unshift File.dirname(__FILE__) + "/../lib/tmail"
+require 'test/unit'
+require 'extctrl'
+require 'test/unit'
+require 'tmail'
View
4 test/test_mail.rb
@@ -1,10 +1,8 @@
$:.unshift File.dirname(__FILE__)
+require 'test_helper'
require 'tmail'
require 'kcode'
-require 'extctrl'
-require 'test/unit'
require 'time'
-require 'test_helper'
class TestMail < Test::Unit::TestCase
include TMail::TextUtils
View
2  test/test_mbox.rb
@@ -1,6 +1,6 @@
+require 'test_helper'
require 'tmail/mailbox'
require 'fileutils'
-require 'test/unit'
class MailboxTester < Test::Unit::TestCase
include FileUtils
View
2  test/test_port.rb
@@ -1,7 +1,7 @@
+require 'test_helper'
require 'tmail/loader'
require 'tmail/port'
require 'fileutils'
-require 'test/unit'
class FilePortTester < Test::Unit::TestCase
include FileUtils
View
2  test/test_scanner.rb
@@ -1,7 +1,7 @@
$:.unshift File.dirname(__FILE__)
+require 'test_helper'
require 'tmail/scanner'
require 'test/unit'
-require 'extctrl'
class ScannerTester < Test::Unit::TestCase
DEBUG = false
View
3  test/test_utils.rb
@@ -1,7 +1,6 @@
+require 'test_helper'
require 'tmail'
require 'tmail/utils'
-require 'test/unit'
-require 'test_helper'
class TestUtils < Test::Unit::TestCase
Please sign in to comment.
Something went wrong with that request. Please try again.