gurgitate-mail 1.10.5 → 1.10.9
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/gurgitate-mail +2 -0
- data/test/gurgitate-test.rb +4 -0
- data/test/runtests.rb +5 -8
- data/test/test_configuration.rb +2 -0
- data/test/test_deliver.rb +4 -0
- data/test/test_delivery.rb +10 -1
- data/test/test_execute_rules.rb +2 -0
- data/test/test_gurgitate_delivery.rb +4 -0
- data/test/test_header.rb +4 -0
- data/test/test_headers.rb +4 -0
- data/test/test_headers_creating_from_hash.rb +2 -0
- data/test/test_headers_meddling_with_headers.rb +4 -0
- data/test/test_mail_headers.rb +4 -0
- data/test/test_mail_headers_meddling_with_headers.rb +4 -0
- data/test/test_process.rb +4 -0
- data/test/test_rules.rb +2 -0
- data/test/test_writing.rb +6 -2
- metadata +26 -28
data/bin/gurgitate-mail
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!BUILD/bin/ruby -w
|
2
2
|
|
3
|
+
# -*- encoding : utf-8 internal_encoding: utf-8 -*-
|
3
4
|
#------------------------------------------------------------------------
|
4
5
|
# Mail filter invocation script
|
5
6
|
#------------------------------------------------------------------------
|
@@ -52,3 +53,4 @@ begin
|
|
52
53
|
rescue CouldNotProcessMailError
|
53
54
|
exit 75
|
54
55
|
end
|
56
|
+
|
data/test/gurgitate-test.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.dirname(File.dirname(__FILE__))
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -58,3 +61,4 @@ class GurgitateTest < Test::Unit::TestCase
|
|
58
61
|
assert true
|
59
62
|
end
|
60
63
|
end
|
64
|
+
|
data/test/runtests.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'rubygems'
|
3
|
+
gem 'test-unit'
|
1
4
|
require 'test/unit'
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'test/unit/ui/console/testrunner'
|
5
|
-
tester = Test::Unit::UI::Console::TestRunner
|
6
|
-
rescue LoadError # ruby 1.9
|
7
|
-
require 'test/unit'
|
8
|
-
tester = Test::Unit
|
9
|
-
end
|
5
|
+
require 'test/unit/ui/console/testrunner'
|
10
6
|
require 'stringio'
|
11
7
|
require 'pathname'
|
12
8
|
|
@@ -37,3 +33,4 @@ if __FILE__ == $0 then
|
|
37
33
|
end
|
38
34
|
runtests testcases
|
39
35
|
end
|
36
|
+
|
data/test/test_configuration.rb
CHANGED
data/test/test_deliver.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.dirname(File.dirname(__FILE__))
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -97,3 +100,4 @@ class TC_Deliver < Test::Unit::TestCase
|
|
97
100
|
assert_equal File.read(seq), "unseen: 1\n"
|
98
101
|
end
|
99
102
|
end
|
103
|
+
|
data/test/test_delivery.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.dirname(File.dirname(__FILE__))
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -148,14 +151,19 @@ class TC_Delivery < GurgitateTest
|
|
148
151
|
end
|
149
152
|
|
150
153
|
def test_cannot_save
|
154
|
+
puts "Making #{@spoolfile} inaccessible"
|
151
155
|
FileUtils.touch @spoolfile
|
152
156
|
FileUtils.chmod 0, @spoolfile
|
153
157
|
|
154
|
-
|
158
|
+
system("ls -ld #{@spoolfile}")
|
159
|
+
|
160
|
+
assert_nothing_raised do
|
155
161
|
@gurgitate.process do
|
156
162
|
nil
|
157
163
|
end
|
164
|
+
system("ls -ld #{@spoolfile}")
|
158
165
|
end
|
166
|
+
|
159
167
|
end
|
160
168
|
|
161
169
|
def test_mailbox_heuristics_mbox
|
@@ -217,3 +225,4 @@ class TC_Delivery < GurgitateTest
|
|
217
225
|
end
|
218
226
|
end
|
219
227
|
|
228
|
+
|
data/test/test_execute_rules.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.dirname(File.dirname(__FILE__))
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -293,3 +296,4 @@ class TC_Gurgitate_delivery < GurgitateTest
|
|
293
296
|
assert_equal("Subject: test", mess.header("Subject"), "Subject header wrong")
|
294
297
|
end
|
295
298
|
end
|
299
|
+
|
data/test/test_header.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.join(File.dirname(__FILE__),"..")
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -166,3 +169,4 @@ class TC_Header < Test::Unit::TestCase
|
|
166
169
|
end
|
167
170
|
end
|
168
171
|
|
172
|
+
|
data/test/test_headers.rb
CHANGED
data/test/test_mail_headers.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'rubygems'
|
3
|
+
gem 'test-unit'
|
1
4
|
require 'test/unit'
|
2
5
|
require 'test/unit/ui/console/testrunner'
|
3
6
|
require 'stringio'
|
@@ -427,3 +430,4 @@ EOF
|
|
427
430
|
"There should be no Lunar Linux mailing list in Cc line")
|
428
431
|
end
|
429
432
|
end
|
433
|
+
|
data/test/test_process.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.dirname(File.dirname(__FILE__))
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -81,3 +84,4 @@ class TC_Process < GurgitateTest
|
|
81
84
|
|
82
85
|
end
|
83
86
|
end
|
87
|
+
|
data/test/test_rules.rb
CHANGED
data/test/test_writing.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
builddir = File.join(File.dirname(__FILE__),"..")
|
2
3
|
|
3
4
|
unless $:[0] == builddir
|
4
5
|
$:.unshift builddir
|
5
6
|
end
|
6
7
|
|
8
|
+
require 'rubygems'
|
9
|
+
gem 'test-unit'
|
7
10
|
require 'test/unit'
|
8
11
|
require 'test/unit/ui/console/testrunner'
|
9
12
|
require 'stringio'
|
@@ -45,7 +48,7 @@ class TC_Writing < Test::Unit::TestCase
|
|
45
48
|
:to => "test2@test"
|
46
49
|
assert_equal "This is a test", mess.body
|
47
50
|
assert_equal [ "From: test@test", "To: test2@test" ],
|
48
|
-
mess.headers.to_s.split(/\n/)
|
51
|
+
mess.headers.to_s.split(/\n/).sort
|
49
52
|
end
|
50
53
|
|
51
54
|
def test_initialization_headers_body_in_initialization_hash
|
@@ -54,7 +57,7 @@ class TC_Writing < Test::Unit::TestCase
|
|
54
57
|
:to => "test2@test"
|
55
58
|
assert_equal "This is a test", mess.body
|
56
59
|
assert_equal [ "From: test@test", "To: test2@test" ],
|
57
|
-
mess.headers.to_s.split(/\n/)
|
60
|
+
mess.headers.to_s.split(/\n/).sort
|
58
61
|
end
|
59
62
|
|
60
63
|
def test_creation_round_trip
|
@@ -114,3 +117,4 @@ class TC_Writing < Test::Unit::TestCase
|
|
114
117
|
assert_equal "To: to@test", (mess.headers["To"]).to_s
|
115
118
|
end
|
116
119
|
end
|
120
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gurgitate-mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 45
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
version: 1.10.
|
9
|
+
- 9
|
10
|
+
version: 1.10.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dave Brown
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable: gurgitate-mail
|
18
|
+
date: 2013-06-04 00:00:00 Z
|
20
19
|
dependencies: []
|
21
20
|
|
22
21
|
description: " gurgitate-mail is a mail filter. It can be used as a module or\n as a standalone application.\n"
|
@@ -28,26 +27,25 @@ extensions: []
|
|
28
27
|
extra_rdoc_files: []
|
29
28
|
|
30
29
|
files:
|
31
|
-
- test/test_header.rb
|
32
30
|
- test/runtests.rb
|
33
|
-
- test/test_delivery.rb
|
34
|
-
- test/test_headers_meddling_with_headers.rb
|
35
|
-
- test/test_rules.rb
|
36
31
|
- test/test_writing.rb
|
37
|
-
- test/
|
38
|
-
- test/
|
39
|
-
- test/test_deliver.rb
|
32
|
+
- test/test_rules.rb
|
33
|
+
- test/test_header.rb
|
40
34
|
- test/test_gurgitate_delivery.rb
|
41
|
-
- test/gurgitate-test.rb
|
42
35
|
- test/test_process.rb
|
43
|
-
- test/
|
44
|
-
- test/test_execute_rules.rb
|
36
|
+
- test/test_deliver.rb
|
45
37
|
- test/test_configuration.rb
|
38
|
+
- test/gurgitate-test.rb
|
39
|
+
- test/test_mail_headers.rb
|
40
|
+
- test/test_delivery.rb
|
41
|
+
- test/test_headers_creating_from_hash.rb
|
42
|
+
- test/test_headers_meddling_with_headers.rb
|
43
|
+
- test/test_execute_rules.rb
|
46
44
|
- test/test_headers.rb
|
45
|
+
- test/test_mail_headers_meddling_with_headers.rb
|
47
46
|
- .gemtest
|
48
47
|
- Rakefile
|
49
48
|
- bin/gurgitate-mail
|
50
|
-
has_rdoc: true
|
51
49
|
homepage: http://www.rubyforge.org/projects/gurgitate-mail/
|
52
50
|
licenses: []
|
53
51
|
|
@@ -77,24 +75,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
75
|
requirements: []
|
78
76
|
|
79
77
|
rubyforge_project: gurgitate-mail
|
80
|
-
rubygems_version: 1.
|
78
|
+
rubygems_version: 1.8.24
|
81
79
|
signing_key:
|
82
80
|
specification_version: 3
|
83
81
|
summary: gurgitate-mail is a mail filter (and a mail-delivery agent)
|
84
82
|
test_files:
|
85
|
-
- test/test_header.rb
|
86
83
|
- test/runtests.rb
|
87
|
-
- test/test_delivery.rb
|
88
|
-
- test/test_headers_meddling_with_headers.rb
|
89
|
-
- test/test_rules.rb
|
90
84
|
- test/test_writing.rb
|
91
|
-
- test/
|
92
|
-
- test/
|
93
|
-
- test/test_deliver.rb
|
85
|
+
- test/test_rules.rb
|
86
|
+
- test/test_header.rb
|
94
87
|
- test/test_gurgitate_delivery.rb
|
95
|
-
- test/gurgitate-test.rb
|
96
88
|
- test/test_process.rb
|
97
|
-
- test/
|
98
|
-
- test/test_execute_rules.rb
|
89
|
+
- test/test_deliver.rb
|
99
90
|
- test/test_configuration.rb
|
91
|
+
- test/gurgitate-test.rb
|
92
|
+
- test/test_mail_headers.rb
|
93
|
+
- test/test_delivery.rb
|
94
|
+
- test/test_headers_creating_from_hash.rb
|
95
|
+
- test/test_headers_meddling_with_headers.rb
|
96
|
+
- test/test_execute_rules.rb
|
100
97
|
- test/test_headers.rb
|
98
|
+
- test/test_mail_headers_meddling_with_headers.rb
|