sugoi-mail 0.1.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,4 +3,6 @@
3
3
  RAILS_ENV=coverage
4
4
  export RAILS_ENV
5
5
  rake db:fixtures:load
6
- rcov --rails --sort coverage "$@"
6
+ rcov --rails "$@"
7
+ rm -rf public/coverage
8
+ mv coverage public
@@ -0,0 +1,5 @@
1
+ #!/bin/sh
2
+
3
+ mkdir -p /tmp/maildumps
4
+ echo "$@" > /tmp/maildumps/dumptofile.$$
5
+ cat >> /tmp/maildumps/dumptofile.$$
@@ -10,7 +10,10 @@ message_1:
10
10
 
11
11
  subject: Message 1
12
12
  mailinglist_id: 1
13
- parent_id:
13
+ parent_id:
14
+ envelope_from: addressmessage1@foo.test
15
+ envelope_to:
16
+ - testuser@test.domain
14
17
  headers: |
15
18
  To: testuser@test.domain
16
19
  From: addressmessage1@foo.test
@@ -61,7 +64,8 @@ message_4:
61
64
  timestamp: 2006-10-26 18:35:00 +09:00
62
65
  messageid: <testmessage-3@foo.test>
63
66
  envelope_from: address1@foo.test
64
- envelope_to: root@test.domain
67
+ envelope_to:
68
+ - root@test.domain
65
69
  mailinglist_id: 1
66
70
  address_id: 2
67
71
  parent_id: 0
@@ -80,7 +84,8 @@ message_5:
80
84
  timestamp: 2006-11-11 19:13:00 +09:00
81
85
  messageid: <testmessage-4@foo.test>
82
86
  envelope_from: address1@foo.test
83
- envelope_to: virtml@test.domain
87
+ envelope_to:
88
+ - virtml@test.domain
84
89
  mailinglist_id: 5
85
90
  address_id: 2
86
91
  parent_id: 0
@@ -100,7 +105,8 @@ message_6:
100
105
  timestamp: 2006-11-11 19:13:00 +09:00
101
106
  messageid: <testmessage-6@foo.test>
102
107
  envelope_from: external@foo.test
103
- envelope_to: proxuser@test.domain
108
+ envelope_to:
109
+ - proxuser@test.domain
104
110
  mailinglist_id: 7
105
111
  address_id: 10
106
112
  parent_id:
@@ -119,7 +125,8 @@ message_7:
119
125
  timestamp: 2006-11-11 19:13:00 +09:00
120
126
  messageid: <testmessage-7@foo.test>
121
127
  envelope_from: testuser@test.domain
122
- envelope_to: plainrewrite#foo.test@test.domain
128
+ envelope_to:
129
+ - plainrewrite#foo.test@test.domain
123
130
  mailinglist_id: 1
124
131
  address_id: 1
125
132
  parent_id:
@@ -138,7 +145,8 @@ message_8:
138
145
  timestamp: 2006-11-11 19:13:00 +09:00
139
146
  messageid: <testmessage-8@foo.test>
140
147
  envelope_from: address1@foo.test
141
- envelope_to: nodescml@test.domain
148
+ envelope_to:
149
+ - nodescml@test.domain
142
150
  mailinglist_id: 8
143
151
  address_id: 2
144
152
  parent_id: 0
@@ -152,23 +160,3 @@ message_8:
152
160
 
153
161
  This one gets rewritten to have a To line of nodesc, right?
154
162
 
155
-
156
- message_9:
157
- id: 9
158
- timestamp: 2006-11-11 19:13:00 +09:00
159
- messageid: <testmessage-9@foo.test>
160
- envelope_from: external@foo.test
161
- envelope_to: proxuser@test.domain
162
- mailinglist_id: 7
163
- address_id: 10
164
- parent_id: 6
165
- headers: |
166
- To: proxuser@test.domain
167
- From: external@foo.test
168
- Subject: Test response
169
- Date: Thu, 11 Nov 2006 19:13:00 +0900 (JST)
170
- Message-ID: <testmessage-9@foo.test>
171
- In-Reply-To: <testmessage-7@foo.test>
172
- body: |
173
-
174
- This is a reply.
@@ -9,7 +9,10 @@ class HelpTest < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  def test_help_coverage_sugoi_admin
12
- methods = SugoiAdminController.action_methods - "wsdl" - "perform_action"
12
+ methods = SugoiAdminController.action_methods \
13
+ - "wsdl" \
14
+ - "perform_action" \
15
+ - "method_missing"
13
16
  commands = Help.find_all_by_facility("SugoiAdminController").map do
14
17
  |h| h.command
15
18
  end
@@ -9,6 +9,7 @@ class MailinglistTest < Test::Unit::TestCase
9
9
 
10
10
  def setup
11
11
  @ml=Mailinglist.find 1
12
+ @fwd2=Mailinglist.find 2
12
13
  @nonconfirm_ml = Mailinglist.find 5
13
14
  @addr1=Address.find 1
14
15
  @addr2=Address.find 2
@@ -31,6 +32,16 @@ class MailinglistTest < Test::Unit::TestCase
31
32
  assert !@ml.confirmed_addresses.member?(addr)
32
33
  end
33
34
 
35
+ def test_forwarding_already_subscribed
36
+ test_subscribing
37
+ assert addr=Address.find_by_address("brandnewuser@foo.test")
38
+ assert_equal @fwd2.mailinglist_class.id, 1
39
+ assert !@fwd2.addresses.member?(addr)
40
+ assert !@fwd2.subscribe("brandnewuser@foo.test")
41
+ assert !@fwd2.subscribe(addr)
42
+ assert !@fwd2.addresses.member?(addr)
43
+ end
44
+
34
45
  def test_confirming
35
46
  assert_equal [@addr1],@ml.confirmed_addresses
36
47
  assert_equal [@addr2],@ml.pending_addresses
@@ -22,6 +22,9 @@ class MessageTest < Test::Unit::TestCase
22
22
  assert_equal m.headers, @message_1["headers"]
23
23
  assert_equal m.body, @message_1["body"]
24
24
  assert_equal m.timestamp, @message_1["timestamp"]
25
+ assert_equal m.envelope_to, @message_1["envelope_to"]
26
+ assert_equal m.envelope_from, @message_1["envelope_from"]
27
+
25
28
  end
26
29
 
27
30
  def test_first_message_children
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: sugoi-mail
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.5
7
- date: 2007-04-16 00:00:00 +09:00
6
+ version: 0.3.0
7
+ date: 2007-04-20 00:00:00 +09:00
8
8
  summary: Powerful mailing list manager.
9
9
  require_paths:
10
10
  - .
@@ -239,6 +239,7 @@ files:
239
239
  - app/helpers/account_helper.rb
240
240
  - app/helpers/sugoi_admin_helper.rb
241
241
  - app/apis/mailservice_api.rb
242
+ - script/boot
242
243
  - script/destroy
243
244
  - script/process
244
245
  - script/fakedeliver
@@ -250,13 +251,14 @@ files:
250
251
  - script/generate
251
252
  - script/cover
252
253
  - script/plugin
254
+ - script/dumpintofile
253
255
  - script/server
256
+ - script/boot/sugoi-mail.EDIT_ME
254
257
  - script/process/spawner
255
258
  - script/process/reaper
256
259
  - script/process/inspector
257
260
  - script/performance/benchmarker
258
261
  - script/performance/profiler
259
- - db/schema.rb
260
262
  - db/schema.mysql.sql
261
263
  - db/schema.sqlserver.sql
262
264
  - db/schema.postgresql.sql
@@ -1,108 +0,0 @@
1
- # This file is autogenerated. Instead of editing this file, please use the
2
- # migrations feature of ActiveRecord to incrementally modify your database, and
3
- # then regenerate this schema definition.
4
-
5
- ActiveRecord::Schema.define(:version => 28) do
6
-
7
- create_table "addresses", :force => true do |t|
8
- t.column "address", :text
9
- t.column "active", :boolean, :default => true
10
- t.column "delivery_attempts", :integer, :default => 0
11
- t.column "bounces", :integer, :default => 0
12
- end
13
-
14
- create_table "addresses_mailinglists", :id => false, :force => true do |t|
15
- t.column "address_id", :integer
16
- t.column "mailinglist_id", :integer
17
- end
18
-
19
- create_table "admin_messages", :force => true do |t|
20
- t.column "message", :text, :null => false
21
- end
22
-
23
- create_table "confirmationcodes", :force => true do |t|
24
- t.column "mailinglist_id", :integer
25
- t.column "address_id", :integer
26
- t.column "code", :text, :null => false
27
- t.column "confirmed", :boolean, :default => false
28
- end
29
-
30
- create_table "domains", :force => true do |t|
31
- t.column "name", :string, :null => false
32
- t.column "password", :text, :null => false
33
- end
34
-
35
- create_table "helps", :force => true do |t|
36
- t.column "facility", :string
37
- t.column "command", :string
38
- t.column "parameters", :string
39
- t.column "summary", :string
40
- t.column "explanation", :text
41
- end
42
-
43
- create_table "mailinglist_classes", :force => true do |t|
44
- t.column "name", :text, :null => false
45
- t.column "description", :text
46
- t.column "public", :boolean, :default => false, :null => false
47
- t.column "closed", :boolean, :default => false, :null => false
48
- t.column "moderated", :boolean, :default => false, :null => false
49
- t.column "confirmation", :boolean, :default => true, :null => false
50
- t.column "joinable", :boolean, :default => true, :null => false
51
- t.column "archived", :boolean, :default => false, :null => false
52
- t.column "proxify", :boolean, :default => false
53
- end
54
-
55
- create_table "mailinglists", :force => true do |t|
56
- t.column "user_id", :integer
57
- t.column "name", :text, :null => false
58
- t.column "description", :text
59
- t.column "welcome_admin_message_id", :integer, :default => 1
60
- t.column "confirmed_admin_message_id", :integer, :default => 2
61
- t.column "sayonara_admin_message_id", :integer, :default => 3
62
- t.column "mailinglist_class_id", :integer
63
- end
64
-
65
- create_table "messages", :force => true do |t|
66
- t.column "mailinglist_id", :integer
67
- t.column "address_id", :integer
68
- t.column "parent_id", :integer
69
- t.column "subject", :string
70
- t.column "messageid", :string
71
- t.column "timestamp", :datetime
72
- t.column "headers", :text
73
- t.column "body", :text
74
- t.column "envelope_from", :text
75
- t.column "envelope_to", :text
76
- end
77
-
78
- create_table "proxy_links", :force => true do |t|
79
- t.column "mailinglist_id", :integer, :null => false
80
- t.column "address_id", :integer, :null => false
81
- end
82
-
83
- create_table "sessions", :force => true do |t|
84
- t.column "session_id", :string
85
- t.column "data", :text
86
- t.column "updated_at", :datetime
87
- end
88
-
89
- add_index "sessions", ["session_id"], :name => "sessions_session_id_index"
90
-
91
- create_table "sys_configs", :force => true do |t|
92
- t.column "name", :string
93
- t.column "value", :string
94
- t.column "description", :string
95
- t.column "priority", :integer
96
- end
97
-
98
- create_table "users", :force => true do |t|
99
- t.column "login", :text, :null => false
100
- t.column "password", :text, :null => false
101
- t.column "mailinglist_id", :integer
102
- t.column "domainadmin", :boolean, :default => false
103
- t.column "domain_id", :integer
104
- t.column "mailinglistadmin", :boolean, :default => false
105
- t.column "virtual", :boolean, :default => false
106
- end
107
-
108
- end