tmail 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +50 -5
- data/MANIFEST +188 -0
- data/NOTES +1 -1
- data/README +10 -4
- data/Rakefile +1 -10
- data/lib/tmail.rb +1 -0
- data/lib/tmail/Makefile +0 -1
- data/lib/tmail/address.rb +190 -17
- data/lib/tmail/attachments.rb +1 -1
- data/lib/tmail/base64.rb +4 -10
- data/lib/tmail/compat.rb +8 -6
- data/lib/tmail/config.rb +2 -6
- data/lib/tmail/core_extensions.rb +14 -18
- data/lib/tmail/encode.rb +47 -12
- data/lib/tmail/header.rb +7 -10
- data/lib/tmail/index.rb +2 -1
- data/lib/tmail/interface.rb +14 -12
- data/lib/tmail/loader.rb +2 -0
- data/lib/tmail/mail.rb +83 -24
- data/lib/tmail/mailbox.rb +70 -10
- data/lib/tmail/main.rb +2 -0
- data/lib/tmail/mbox.rb +2 -0
- data/lib/tmail/net.rb +16 -15
- data/lib/tmail/obsolete.rb +7 -12
- data/lib/tmail/parser.rb +1 -0
- data/lib/tmail/require_arch.rb +2 -0
- data/lib/tmail/scanner.rb +2 -1
- data/lib/tmail/scanner_r.rb +11 -10
- data/lib/tmail/utils.rb +83 -26
- data/lib/tmail/version.rb +3 -2
- data/log/BugTrackingLog.txt +1208 -0
- data/log/{ChangeLog.txt → Changelog-0.txt} +36 -0
- data/log/Changelog.txt +534 -0
- data/log/Testlog.txt +114 -0
- data/log/Todo.txt +0 -2
- data/meta/VERSION +1 -0
- data/meta/project.yaml +8 -5
- data/meta/unixname +1 -0
- data/setup.rb +1481 -0
- data/site/contributing/index.html +183 -0
- data/site/css/clean.css +27 -0
- data/site/css/layout.css +31 -0
- data/site/css/style.css +60 -0
- data/site/download/index.html +61 -0
- data/site/img/envelope.jpg +0 -0
- data/site/img/mailman.gif +0 -0
- data/site/img/stamp-sm.jpg +0 -0
- data/site/img/stamp.jpg +0 -0
- data/site/img/stampborder.jpg +0 -0
- data/site/img/tfire.jpg +0 -0
- data/site/img/tmail.png +0 -0
- data/site/index.html +270 -0
- data/site/js/jquery.js +31 -0
- data/site/log/Changelog.xsl +33 -0
- data/site/log/changelog.xml +1677 -0
- data/site/outdated/BUGS +3 -0
- data/site/outdated/DEPENDS +1 -0
- data/site/outdated/Incompatibilities +89 -0
- data/site/outdated/Incompatibilities.ja +102 -0
- data/site/outdated/NEWS +9 -0
- data/site/outdated/README.ja +73 -0
- data/site/outdated/doc.ja/address.html +275 -0
- data/site/outdated/doc.ja/basics.html +405 -0
- data/site/outdated/doc.ja/config.html +49 -0
- data/site/outdated/doc.ja/details.html +146 -0
- data/site/outdated/doc.ja/index.html +39 -0
- data/site/outdated/doc.ja/mail.html +793 -0
- data/site/outdated/doc.ja/mailbox.html +265 -0
- data/site/outdated/doc.ja/port.html +95 -0
- data/site/outdated/doc.ja/tmail.html +58 -0
- data/site/outdated/doc.ja/usage.html +202 -0
- data/site/outdated/rdd/address.rrd.m +229 -0
- data/site/outdated/rdd/basics.rd.m +275 -0
- data/site/outdated/rdd/config.rrd.m +26 -0
- data/site/outdated/rdd/details.rd.m +117 -0
- data/site/outdated/rdd/index.rhtml.m +54 -0
- data/site/outdated/rdd/mail.rrd.m +701 -0
- data/site/outdated/rdd/mailbox.rrd.m +228 -0
- data/site/outdated/rdd/port.rrd.m +69 -0
- data/site/outdated/rdd/tmail.rrd.m +33 -0
- data/site/outdated/rdd/usage.rd.m +247 -0
- data/site/quickstart/index.html +69 -0
- data/site/quickstart/quickstart.html +52 -0
- data/site/quickstart/usage.html +193 -0
- data/site/reference/address.html +247 -0
- data/site/reference/config.html +30 -0
- data/site/reference/index.html +101 -0
- data/site/reference/mail.html +726 -0
- data/site/reference/mailbox.html +245 -0
- data/site/reference/port.html +75 -0
- data/site/reference/tmail.html +35 -0
- data/test/fixtures/mailbox +405 -4
- data/test/fixtures/raw_email_multiple_from +30 -0
- data/test/kcode.rb +2 -2
- data/test/temp_test_one.rb +46 -0
- data/test/test_address.rb +77 -38
- data/test/test_encode.rb +0 -2
- data/test/test_header.rb +47 -24
- data/test/test_mail.rb +52 -9
- data/test/test_mbox.rb +28 -0
- data/test/test_port.rb +33 -27
- data/test/test_quote.rb +35 -8
- data/work/script/make +26 -0
- data/work/script/rdoc +39 -0
- data/{script → work/script}/setup +0 -0
- data/work/script/test +30 -0
- metadata +249 -184
- data/log/History.txt +0 -40
- data/meta/config.yaml +0 -8
- data/meta/icli.yaml +0 -16
- data/meta/tmail.roll +0 -3
- data/script/changelog +0 -19
- data/script/clobber/distclean +0 -8
- data/script/clobber/package +0 -10
- data/script/compile +0 -32
- data/script/pack/gem +0 -93
- data/script/pack/tgz +0 -41
- data/script/pack/zip +0 -41
- data/script/prepare +0 -15
- data/script/publish +0 -51
- data/script/rdoc +0 -42
- data/script/release +0 -10
- data/script/stamp +0 -33
- data/script/stats +0 -138
- data/script/tag +0 -25
- data/script/test +0 -36
data/log/History.txt
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
=== 1.2.0 / 2007-11-29
|
2
|
-
|
3
|
-
* 5 major enhancements:
|
4
|
-
* Extensive documentation work. (mikel)
|
5
|
-
* Removed base64 c extension. It's speed benefit was negligable (only 0.2 sec over 10000 sizable encode/decode runs) (trans)
|
6
|
-
* 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)
|
7
|
-
* 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)
|
8
|
-
* Closed 16025 - TMail scanner.rb would not parse ATOM chars correctly making it fail tests where the C version passed them. Fixed this by updating the Scanner.rb version to be in step with the C version (there was an extra @ symbol in the ATOM CHARS definition that was not in the C version.) (mikel)
|
9
|
-
* 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
|
10
|
-
* 3 minor enhancements:
|
11
|
-
* Renamed scanner_c.c to tmailscanner.c (trans)
|
12
|
-
* Changed TMail::Mail#sender to have a default "default" value of nil to be in alignment with all the other interface methods (mikel)
|
13
|
-
* 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)
|
14
|
-
|
15
|
-
=== 1.1.1 / 2007-11-05
|
16
|
-
|
17
|
-
* 3 major enhancement:
|
18
|
-
* Created unified package, for installation in any platform.
|
19
|
-
* Added require_arch.rb to facilitate multi-platform support.
|
20
|
-
* If compilation fails, set NORUBYEXT="true" and reinstall.
|
21
|
-
* 3 minor enhancement:
|
22
|
-
* Fixed line wrapping of long header fields so that they wrap at the correct whitespace points.
|
23
|
-
* Fixed bug where re-assigning the mail.body to existing mail object that already had a parsed body would not re-parse the body.
|
24
|
-
* Started documenting the source code... lots more to do.
|
25
|
-
|
26
|
-
=== 1.1.0 / 2007-10-28
|
27
|
-
|
28
|
-
* 1 minor enhancements:
|
29
|
-
* Changed the quoting of paramaters in the header fields to wrap double quotes around fields that are needed to be quoted.
|
30
|
-
* Removed keeping double quotes around a filename that does not need double quotes per RFC 1521
|
31
|
-
* More clean up and getting tests passing. Now standing at 2 failures out of 3366 assertions. One is the incorrect handling of "@"@test.com (returns @@test.com) and the other is a japanese encoding issue.
|
32
|
-
|
33
|
-
=== 1.0.0 / 2007-10-28
|
34
|
-
|
35
|
-
* 1 major enhancement:
|
36
|
-
* TMail is now released as a GEM!
|
37
|
-
* 2 minor enhancements:
|
38
|
-
* Fixed bug 15077 - TMail now recognizes attachments as soon as they are added to the body.
|
39
|
-
* Refactored handling of quotations in header fields - now cleaner
|
40
|
-
|
data/meta/config.yaml
DELETED
data/meta/icli.yaml
DELETED
data/meta/tmail.roll
DELETED
data/script/changelog
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# generate changelogs
|
4
|
-
|
5
|
-
file = 'log/History.txt'
|
6
|
-
out = 'log/Release.txt'
|
7
|
-
|
8
|
-
name, version = *File.basename(glob("meta/*.roll").first).chomp('.roll').split('-')
|
9
|
-
|
10
|
-
main :changelog => [:recent] do
|
11
|
-
mkdir_p "doc/log"
|
12
|
-
svn "log --xml > doc/log/changelog.xml"
|
13
|
-
end
|
14
|
-
|
15
|
-
task :recent do
|
16
|
-
changes = /^===\s*#{version}(.*?)\n===/m.match(File.read(file))[0]
|
17
|
-
changes = changes.chomp('===').strip.sub(/^===\s+/, 'TAG ')
|
18
|
-
File.open(out, 'w'){ |f| f << changes }
|
19
|
-
end
|
data/script/clobber/distclean
DELETED
data/script/clobber/package
DELETED
data/script/compile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# compile extensions
|
4
|
-
|
5
|
-
main :compile => [:compile_scanner] do
|
6
|
-
puts "Compile complete."
|
7
|
-
end
|
8
|
-
|
9
|
-
task :compile_scanner do
|
10
|
-
file = nil
|
11
|
-
cd("ext/tmailscanner/tmail") do
|
12
|
-
ruby "extconf.rb"
|
13
|
-
make
|
14
|
-
|
15
|
-
#file = glob("tmailscanner.#{dlext}").first
|
16
|
-
#file = File.expand_path(file) if file
|
17
|
-
end
|
18
|
-
|
19
|
-
#if file
|
20
|
-
# mkdir_p("lib/tmail/#{arch}")
|
21
|
-
# mv(file, "lib/tmail/#{arch}/")
|
22
|
-
#end
|
23
|
-
end
|
24
|
-
|
25
|
-
def dlext
|
26
|
-
Config::CONFIG['DLEXT']
|
27
|
-
end
|
28
|
-
|
29
|
-
def arch
|
30
|
-
Config::CONFIG['arch']
|
31
|
-
end
|
32
|
-
|
data/script/pack/gem
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# generate gem package
|
4
|
-
|
5
|
-
# TODO: Should this use staging too, like zip/tgz?
|
6
|
-
|
7
|
-
begin
|
8
|
-
require 'rubygems/specification'
|
9
|
-
Gem::manage_gems
|
10
|
-
rescue LoadError
|
11
|
-
raise LoadError, "RubyGems is not installed?"
|
12
|
-
end
|
13
|
-
|
14
|
-
# Create a Gem package.
|
15
|
-
|
16
|
-
main 'pack/gem' do
|
17
|
-
status "Creating .gem package"
|
18
|
-
|
19
|
-
config = configuration['pack'] || {}
|
20
|
-
config = config['gem'] || {}
|
21
|
-
|
22
|
-
package = package().clone
|
23
|
-
package.update(config)
|
24
|
-
|
25
|
-
store = config[:store] || 'pkg'
|
26
|
-
|
27
|
-
#dir = Dir.pwd
|
28
|
-
|
29
|
-
file = nil
|
30
|
-
#cd(dir) do
|
31
|
-
#status "vi #{metadata.name}.gemspec"
|
32
|
-
builder = ::Gem::Builder.new(gemspec(package))
|
33
|
-
status "gem build #{package.name}"
|
34
|
-
unless dryrun?
|
35
|
-
file = builder.build
|
36
|
-
file = File.expand_path(file)
|
37
|
-
end
|
38
|
-
#end
|
39
|
-
|
40
|
-
transfer(file, store)
|
41
|
-
end
|
42
|
-
|
43
|
-
# Transfer package file to storage location.
|
44
|
-
|
45
|
-
def transfer(file, store)
|
46
|
-
dest = File.join(store, File.basename(file)) # move to store, unless already there
|
47
|
-
dest = File.expand_path(dest)
|
48
|
-
mv(file, store) unless file == dest
|
49
|
-
end
|
50
|
-
|
51
|
-
# Create Gem::Specification.
|
52
|
-
|
53
|
-
def gemspec(package)
|
54
|
-
distribute = package.filelist
|
55
|
-
#distribute = Dir.multiglob_with_default( '**/*', distribute )
|
56
|
-
|
57
|
-
::Gem::Specification.new do |spec|
|
58
|
-
spec.name = package.name
|
59
|
-
spec.version = package.version
|
60
|
-
spec.summary = package.brief
|
61
|
-
spec.description = package.description
|
62
|
-
spec.author = [package.author].flatten
|
63
|
-
spec.email = package.email
|
64
|
-
spec.rubyforge_project = package.development if /rubyforge.org/ =~ package.development
|
65
|
-
spec.homepage = package.homepage
|
66
|
-
|
67
|
-
# Platform: ruby, mswin32, i586-linux, powerpc-darwin, current
|
68
|
-
spec.platform = 'ruby' # TODO current support!
|
69
|
-
|
70
|
-
spec.require_paths = [package.gem_path].flatten.reverse
|
71
|
-
|
72
|
-
#if package.platform != 'ruby'
|
73
|
-
# spec.require_paths.concat(spec.require_paths.collect{ |d| File.join(d, platform) })
|
74
|
-
#end
|
75
|
-
|
76
|
-
spec.bindir = "bin"
|
77
|
-
spec.executables = package.executables
|
78
|
-
spec.requirements = package.requirements
|
79
|
-
spec.has_rdoc = package.document
|
80
|
-
|
81
|
-
if package.dependencies
|
82
|
-
package.dependencies.each do |d,v|
|
83
|
-
spec.add_dependency(*[d,v].compact)
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
spec.extensions = package.compile
|
88
|
-
|
89
|
-
spec.files = distribute
|
90
|
-
|
91
|
-
spec.test_files = distribute.select{ |f| f =~ /^test\// } # TODO make test_files configurable
|
92
|
-
end
|
93
|
-
end
|
data/script/pack/tgz
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# generate tar gzip package
|
4
|
-
|
5
|
-
main 'pack/tgz' do
|
6
|
-
status "Creating .tgz package"
|
7
|
-
|
8
|
-
config = configuration['pack'] || {}
|
9
|
-
config = config['tgz'] || {}
|
10
|
-
|
11
|
-
package = package().clone
|
12
|
-
package.update(config)
|
13
|
-
|
14
|
-
store = config[:store] || 'pkg'
|
15
|
-
templ = config[:template]
|
16
|
-
|
17
|
-
name = package.stage_name(templ)
|
18
|
-
stage = File.join(store, name)
|
19
|
-
files = package.filelist
|
20
|
-
|
21
|
-
stage(stage, files)
|
22
|
-
|
23
|
-
if dryrun?
|
24
|
-
status "tar -cxf #{name}.tgz"
|
25
|
-
else
|
26
|
-
file = nil
|
27
|
-
cd(store) do
|
28
|
-
file = tgz(name)
|
29
|
-
end
|
30
|
-
transfer(file, store)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# Transfer package file to storage location.
|
35
|
-
|
36
|
-
def transfer(file, store)
|
37
|
-
# move to store, unless already there
|
38
|
-
dest = File.join(store, File.basename(file))
|
39
|
-
dest = File.expand_path(dest)
|
40
|
-
mv(file, store) unless file == dest
|
41
|
-
end
|
data/script/pack/zip
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# generate zip package
|
4
|
-
|
5
|
-
main 'pack/zip' do
|
6
|
-
status "Creating .zip package"
|
7
|
-
|
8
|
-
config = configuration['pack'] || {}
|
9
|
-
config = config['zip'] || {}
|
10
|
-
|
11
|
-
package = package().clone
|
12
|
-
package.update(config)
|
13
|
-
|
14
|
-
store = config[:store] || 'pkg'
|
15
|
-
templ = config[:template]
|
16
|
-
|
17
|
-
name = package.stage_name(templ)
|
18
|
-
stage = File.join(store, name)
|
19
|
-
files = package.filelist
|
20
|
-
|
21
|
-
stage(stage, files)
|
22
|
-
|
23
|
-
if dryrun?
|
24
|
-
status "tar -cxf #{name}.zip"
|
25
|
-
else
|
26
|
-
file = nil
|
27
|
-
cd(store) do
|
28
|
-
file = zip(name)
|
29
|
-
end
|
30
|
-
transfer(file, store)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# Transfer package file to storage location.
|
35
|
-
|
36
|
-
def transfer(file, store)
|
37
|
-
# move to store, unless already there
|
38
|
-
dest = File.join(store, File.basename(file))
|
39
|
-
dest = File.expand_path(dest)
|
40
|
-
mv(file, store) unless file == dest
|
41
|
-
end
|
data/script/prepare
DELETED
data/script/publish
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# Publish website to rubyforge
|
4
|
-
#
|
5
|
-
# This task publishes the source dir (deafult 'doc')
|
6
|
-
# to a rubyforge website.
|
7
|
-
|
8
|
-
main :publish do
|
9
|
-
config = configuration['publish']
|
10
|
-
|
11
|
-
project = config['project']
|
12
|
-
subdir = config['subdir']
|
13
|
-
source = config['source'] || "doc"
|
14
|
-
username = config['username'] || ENV['RUBYFORGE_USERNAME']
|
15
|
-
protect = %w{usage statcvs statsvn robot.txt wiki}
|
16
|
-
exclude = %w{.svn}
|
17
|
-
|
18
|
-
abort "no project" unless project
|
19
|
-
abort "no username (you can also set RUBYFORGE_USERNAME evironament variable)" unless username
|
20
|
-
|
21
|
-
if subdir
|
22
|
-
destination = File.join(project, subdir)
|
23
|
-
else
|
24
|
-
destination = project
|
25
|
-
end
|
26
|
-
|
27
|
-
dir = source.chomp('/') + '/'
|
28
|
-
url = "#{username}@rubyforge.org:/var/www/gforge-projects/#{destination}"
|
29
|
-
|
30
|
-
op = ['-rLvz', '--delete-after'] # maybe -p ?
|
31
|
-
|
32
|
-
# add filter options. The commandline version didn't seem
|
33
|
-
# to work, so I opted for creating an .rsync_filter file for
|
34
|
-
# all cases.
|
35
|
-
|
36
|
-
filter_file = File.join(source,'.rsync-filter')
|
37
|
-
|
38
|
-
unless file?(filter_file)
|
39
|
-
File.open(filter_file, 'w') do |f|
|
40
|
-
exclude.map{|e| f << "- #{e}\n"}
|
41
|
-
protect.map{|e| f << "P #{e}\n"}
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
op << "--filter='dir-merge #{filter_file}'"
|
46
|
-
|
47
|
-
args = op + [dir, url]
|
48
|
-
|
49
|
-
rsync(*args.to_params)
|
50
|
-
end
|
51
|
-
|
data/script/rdoc
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# generate rdocs
|
4
|
-
#
|
5
|
-
# Generate Rdoc documentation. Settings are
|
6
|
-
# the same as the rdoc command's options.
|
7
|
-
|
8
|
-
main :rdoc do
|
9
|
-
# Load rdoc configuration.
|
10
|
-
|
11
|
-
config = configuration['rdoc']
|
12
|
-
|
13
|
-
config['op'] = config.delete('output') if config['output']
|
14
|
-
|
15
|
-
config = {
|
16
|
-
'template' => 'html',
|
17
|
-
'op' => 'doc/rdoc',
|
18
|
-
'merge' => true,
|
19
|
-
'inline-source' => true,
|
20
|
-
'exclude' => %w{MANIFEST, Manifest.txt},
|
21
|
-
'include' => %w{[A-Z]* lib ext}
|
22
|
-
}.update(config)
|
23
|
-
|
24
|
-
output = config['op']
|
25
|
-
|
26
|
-
# Check for parent directory.
|
27
|
-
# (Helps to ensure we're in the right place.)
|
28
|
-
|
29
|
-
dir!(File.dirname(output))
|
30
|
-
|
31
|
-
# Prepare command arguments.
|
32
|
-
|
33
|
-
vector = config.command_vector('include')
|
34
|
-
|
35
|
-
# Remove old rdocs, if any.
|
36
|
-
|
37
|
-
rm_r(output) if File.exist?(output)
|
38
|
-
|
39
|
-
# Document.
|
40
|
-
|
41
|
-
rdoc(*vector)
|
42
|
-
end
|