sugoi-mail 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +45 -11
- data/app/controllers/sugoi_admin_controller.rb +7 -20
- data/app/controllers/sugoi_admin_help_controller.rb +51 -0
- data/bin/mailc +5 -2
- data/bin/maild +14 -2
- data/bin/sugoi-mail +36 -3
- data/db/migrate/011_add_active_to_addresses.rb +3 -1
- data/db/migrate/019_add_archived_to_mailinglist_classes.rb +5 -1
- data/db/schema.mysql.sql +9 -1
- data/db/schema.postgresql.sql +9 -1
- data/db/schema.sqlite.sql +9 -1
- data/db/schema.sqlserver.sql +10 -1
- data/db/schema_version +1 -1
- data/lib/tasks/release.rake +41 -0
- data/public/index.html +277 -0
- data/test/functional/sugoi_admin_controller_test.rb +71 -0
- metadata +7 -4
data/README
CHANGED
@@ -8,9 +8,9 @@ site with sugoi-mail.
|
|
8
8
|
|
9
9
|
But it's much more than that. It takes the concept of the mailing list,
|
10
10
|
and stretches it in every direction it can think of. Personal
|
11
|
-
distribution lists? Why, that's just another kind of mailing list.
|
12
|
-
announcement lists? Sure thing. Personal mail forwarding
|
13
|
-
Absolutely.
|
11
|
+
distribution lists? Why, that's just another kind of mailing list.
|
12
|
+
Closed announcement lists? Sure thing. Personal mail forwarding
|
13
|
+
addresses like those on pobox.com (remember those guys)? Absolutely.
|
14
14
|
|
15
15
|
And built using the combined forces of Ruby on Rails and Gurgitate-Mail,
|
16
16
|
you can combine the two in ways never thought of before. Want to build a
|
@@ -20,16 +20,50 @@ stuff yourself? Just call us and we'll be glad to help you out.
|
|
20
20
|
|
21
21
|
Sugoi Mail: Building mailing lists out of webs and toffee.
|
22
22
|
|
23
|
-
And because my boss told me to put this here: Sugoi-Mail is an open
|
24
|
-
source project proudly sponsored by Invio, the makers of the Ichinichi
|
25
|
-
Ichimon line of educational software.
|
26
|
-
|
27
23
|
NOTE FOR FOLKS GOING TO INSTALL IT: Right now, this is in a state that
|
28
|
-
I'd call
|
24
|
+
I'd call ALPHA, which is at least an improvement over the previous
|
25
|
+
condition which was PRE-ALPHA. By this I mean, there's actually
|
26
|
+
something which you can install sanely now! If you say "gem install
|
27
|
+
sugoi-mail", then you can, in the style of typo and other
|
28
|
+
rails-app-installer-using applications, say "sugoi-mail install foobar",
|
29
|
+
and it'll set up a sugoi-mail installation inside the directory
|
30
|
+
"foobar".
|
31
|
+
|
32
|
+
What it will NOT (yet) do is, upon having installed sugoi-mail in foobar
|
33
|
+
and having fired up mongrel, start maild. Yes, this is unfortunate.
|
34
|
+
Especially since this is probably the first that you've ever heard about
|
35
|
+
having to run something called "maild".
|
36
|
+
|
37
|
+
Basically maild is the secret sauce that makes sugoi mail work as well
|
38
|
+
as it does. It is to sugoi-mail as fastcgi is to a Rails app. Or maybe
|
39
|
+
you like mongrel and mod_proxy better. But the idea is to start up a
|
40
|
+
daemon that has everything you need pre-loaded and cached and ready to
|
41
|
+
go, so that you don't have to waste valuable processing time loading the
|
42
|
+
approximately five thousand files that Rails wants to load up, to say
|
43
|
+
nothing of connecting to the database.
|
44
|
+
|
45
|
+
Anyway, make sure you run "bin/maild". Oh, and mailc? You set that up
|
46
|
+
as a local delivery agent. Think of it kind of like gurgitate-mail.
|
47
|
+
What I do is I set it up in Postfix as a transport in the file
|
48
|
+
/etc/postfix/master.cf, kind of like this:
|
29
49
|
|
30
|
-
|
50
|
+
sugoi unix - n n - - pipe
|
51
|
+
flags=DRhu user=sugoi-user argv=/path/to/mailc -d ${recipient} --sender ${sender}
|
52
|
+
|
53
|
+
(IMPORTANT NOTE TO SELF: Check my facts on this before posting nonsensse
|
54
|
+
to Rubyforge. Say, by looking at one of the sites where this thing is
|
55
|
+
already installed. Also, remove this note before unleashing the gem on
|
56
|
+
the world. If you see this note, be sure to send me email laughing
|
57
|
+
about it!)
|
58
|
+
|
59
|
+
Parts of this have actually been in service for months, but there's
|
31
60
|
still no real interface, the SOAP interface is underdocumented and
|
32
61
|
probably incorrect at this point anyway, and everythings
|
33
62
|
overcomplicated. In other words: FOR ADVENTUROUS PEOPLE ONLY. That
|
34
|
-
said, if you do decide to install it, I greet you!
|
35
|
-
|
63
|
+
said, if you do decide to install it, I greet you! Let me know how it
|
64
|
+
works out.
|
65
|
+
|
66
|
+
And finally, because my boss told me to put this here and he is, after
|
67
|
+
all, kind enough to pay me good money to work on this: Sugoi-Mail is an
|
68
|
+
open source project proudly sponsored by Invio, the makers of the
|
69
|
+
Ichinichi Ichimon line of educational software.
|
@@ -44,11 +44,14 @@ class SugoiAdminController < CommandlineController
|
|
44
44
|
"fixtures",
|
45
45
|
table.name.tableize +
|
46
46
|
".yml")))
|
47
|
-
fixture.
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
fixture.values.sort_by do |values| values["id"].to_i end .
|
48
|
+
each do |values|
|
49
|
+
begin
|
50
|
+
table.find values["id"]
|
51
|
+
@alreadythere << "%s[%s]" % [ table.name, values["id"] ]
|
52
|
+
rescue ActiveRecord::RecordNotFound
|
51
53
|
configvar = table.new values
|
54
|
+
configvar.id = values["id"].to_i # hohoho
|
52
55
|
configvar.save
|
53
56
|
end
|
54
57
|
end
|
@@ -168,13 +171,6 @@ class SugoiAdminController < CommandlineController
|
|
168
171
|
render "sugoi_admin/list_mailinglist_classes"
|
169
172
|
end
|
170
173
|
|
171
|
-
def help_list_mailinglist_classes
|
172
|
-
usage "list_mailinglist_classes",
|
173
|
-
"Outputs a list of mailing list classes defined"
|
174
|
-
end
|
175
|
-
|
176
|
-
alias help_list_mlclasses help_list_mailinglist_classes
|
177
|
-
|
178
174
|
def create_list mailinglist_name,
|
179
175
|
domain_name, user_name, description = nil, mailinglist_class_id = 2
|
180
176
|
|
@@ -220,15 +216,6 @@ class SugoiAdminController < CommandlineController
|
|
220
216
|
message "Subscribed \"#{new_address}\" to \"#{mailinglist_address}\""
|
221
217
|
end
|
222
218
|
|
223
|
-
def help_create_mailing_list
|
224
|
-
usage "create_mailing_list <mailinglist_class_id> <mailinglist_name> " +
|
225
|
-
"<domain_name> <user_name> [<description>]",
|
226
|
-
"Creates a mailing list of class <mailinglist_class_id> ("
|
227
|
-
"use list_mailinglist_classes to see the available mailing "+
|
228
|
-
"list classes) named <mailinglist_name> in domain "+
|
229
|
-
"<domain_name> owned by the user named <user_name>"
|
230
|
-
end
|
231
|
-
|
232
219
|
def unsubscribe(mailinglist_address, address_to_remove)
|
233
220
|
address = Address.find_by_address address_to_remove
|
234
221
|
unless address
|
@@ -0,0 +1,51 @@
|
|
1
|
+
class SugoiAdminHelpController < CommandlineController
|
2
|
+
def init
|
3
|
+
end
|
4
|
+
|
5
|
+
def show_config
|
6
|
+
end
|
7
|
+
|
8
|
+
def set_config
|
9
|
+
end
|
10
|
+
|
11
|
+
def list_domains
|
12
|
+
end
|
13
|
+
def list_mailinglists
|
14
|
+
|
15
|
+
end
|
16
|
+
def list_addresses
|
17
|
+
|
18
|
+
end
|
19
|
+
def create_domain
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_user domain_name, username,
|
23
|
+
end
|
24
|
+
|
25
|
+
def list_users domain_name
|
26
|
+
end
|
27
|
+
|
28
|
+
def list_mailinglist_classes
|
29
|
+
usage "list_mailinglist_classes",
|
30
|
+
"Outputs a list of mailing list classes defined"
|
31
|
+
end
|
32
|
+
alias list_mlclasses list_mailinglist_classes
|
33
|
+
|
34
|
+
def list_mailinglist_classes
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_list mailinglist_name,
|
38
|
+
usage "create_mailing_list <mailinglist_class_id> <mailinglist_name> " +
|
39
|
+
"<domain_name> <user_name> [<description>]",
|
40
|
+
"Creates a mailing list of class <mailinglist_class_id> ("
|
41
|
+
"use list_mailinglist_classes to see the available mailing "+
|
42
|
+
"list classes) named <mailinglist_name> in domain "+
|
43
|
+
"<domain_name> owned by the user named <user_name>"
|
44
|
+
end
|
45
|
+
|
46
|
+
def subscribe(mailinglist_address, new_address)
|
47
|
+
end
|
48
|
+
|
49
|
+
def unsubscribe(mailinglist_address, address_to_remove)
|
50
|
+
end
|
51
|
+
end
|
data/bin/mailc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'socket'
|
4
4
|
require 'optparse'
|
@@ -27,6 +27,9 @@ serverinfo = {
|
|
27
27
|
:message => $stdin.read
|
28
28
|
}
|
29
29
|
|
30
|
-
|
30
|
+
RAILS_BASE=File.join(File.dirname(__FILE__),"..")
|
31
|
+
SOCKETFILE=File.join(RAILS_BASE,"tmp","sockets","maild.socket")
|
32
|
+
|
33
|
+
s=UNIXSocket.new(SOCKETFILE)
|
31
34
|
Marshal.dump serverinfo, s
|
32
35
|
s.close
|
data/bin/maild
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
RAILS_BASE=File.join(File.dirname(__FILE__),"..")
|
4
4
|
CONFIGDIR=File.join(RAILS_BASE,"config")
|
5
|
+
TMPDIR=File.join(RAILS_BASE,"tmp")
|
6
|
+
PIDFILE=File.join(TMPDIR, "maild.pid")
|
7
|
+
SOCKETFILE=File.join(RAILS_BASE,"tmp","sockets","maild.socket")
|
5
8
|
|
6
9
|
require File.join(CONFIGDIR,"boot")
|
7
10
|
require File.join(CONFIGDIR,"environment")
|
@@ -34,7 +37,7 @@ class MailDaemon
|
|
34
37
|
include Daemonize
|
35
38
|
|
36
39
|
def initialize(options={})
|
37
|
-
@SOCK_PATH=
|
40
|
+
@SOCK_PATH=SOCKETFILE
|
38
41
|
@gurgitate_cache=Hash.new
|
39
42
|
if options[:max_processes]
|
40
43
|
@max_processes = options[:max_processes]
|
@@ -51,9 +54,18 @@ class MailDaemon
|
|
51
54
|
def start
|
52
55
|
@server=UNIXServer.new(@SOCK_PATH)
|
53
56
|
|
57
|
+
if File.exists? PIDFILE
|
58
|
+
$logger.error "PID file exists--already running?"
|
59
|
+
end
|
60
|
+
|
61
|
+
File.open(PIDFILE,"w") do |f|
|
62
|
+
f.puts Process.pid
|
63
|
+
end
|
64
|
+
|
54
65
|
trap("INT") do
|
55
66
|
@server.close
|
56
67
|
File.unlink(@SOCK_PATH)
|
68
|
+
File.unlink(PIDFILE)
|
57
69
|
end
|
58
70
|
|
59
71
|
$logger.info "Ready to accept mail"
|
data/bin/sugoi-mail
CHANGED
@@ -2,11 +2,45 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'rails-installer'
|
5
|
-
|
5
|
+
|
6
|
+
class MailDaemon < RailsInstaller::WebServer::Mongrel
|
7
|
+
def self.start
|
8
|
+
super
|
9
|
+
|
10
|
+
maild=File.join(install_directory,"bin", "maild")
|
11
|
+
puts "Running #{maild}"
|
12
|
+
system(maild)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.stop
|
16
|
+
super
|
17
|
+
maild_pidfile=File.join(install_directory, "tmp", "maild.pid")
|
18
|
+
if File.exists? maild_pidfile
|
19
|
+
maild_pid = File.read(maild_pidfile).chomp.to_i
|
20
|
+
Process.kill 2,maild_pid
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
class SugoiInstaller < RailsInstaller
|
6
27
|
application_name 'sugoi-mail'
|
7
28
|
support_location 'http://invio.co.jp/'
|
8
29
|
rails_version '1.1.6'
|
9
30
|
|
31
|
+
def start
|
32
|
+
super
|
33
|
+
|
34
|
+
maild=File.join(install_directory,"bin", "maild")
|
35
|
+
puts "Running #{maild}"
|
36
|
+
system(maild)
|
37
|
+
end
|
38
|
+
|
39
|
+
def stop
|
40
|
+
super
|
41
|
+
system("killall","maild") # XXX VERY BAD ON A SYSV SYSTEM! XXX
|
42
|
+
end
|
43
|
+
|
10
44
|
def install_post_hook
|
11
45
|
File.chmod(0755, File.join(install_directory,"bin","sugoi-admin"))
|
12
46
|
File.chmod(0755, File.join(install_directory,"bin","mailc"))
|
@@ -18,8 +52,7 @@ end
|
|
18
52
|
# Installer program
|
19
53
|
directory = ARGV[1]
|
20
54
|
|
21
|
-
app =
|
22
|
-
|
55
|
+
app = SugoiInstaller.new(directory)
|
23
56
|
app.message_proc = Proc.new do |msg|
|
24
57
|
STDERR.puts " #{msg}"
|
25
58
|
end
|
@@ -3,9 +3,11 @@
|
|
3
3
|
#------------------------------------------------------------------------
|
4
4
|
|
5
5
|
class AddActiveToAddresses < ActiveRecord::Migration
|
6
|
+
class Address < ActiveRecord::Base; end
|
7
|
+
|
6
8
|
def self.up
|
7
9
|
add_column :addresses, :active, :boolean, :default => true
|
8
|
-
Address.update_all "active = true"
|
10
|
+
Address.update_all "active = 'true'"
|
9
11
|
end
|
10
12
|
|
11
13
|
def self.down
|
@@ -11,7 +11,11 @@ class AddArchivedToMailinglistClasses < ActiveRecord::Migration
|
|
11
11
|
mailinglist_class.save
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
begin
|
15
|
+
execute "alter table mailinglist_classes alter archived set not null"
|
16
|
+
rescue
|
17
|
+
nil # oh well
|
18
|
+
end
|
15
19
|
|
16
20
|
ml=MailinglistClass.find_by_name("Mailing List")
|
17
21
|
if ml
|
data/db/schema.mysql.sql
CHANGED
@@ -83,6 +83,14 @@ CREATE TABLE proxy_links (
|
|
83
83
|
`address_id` int(11) NOT NULL
|
84
84
|
) ENGINE=InnoDB;
|
85
85
|
|
86
|
+
CREATE TABLE sys_configs (
|
87
|
+
`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY,
|
88
|
+
`name` varchar(255),
|
89
|
+
`value` varchar(255),
|
90
|
+
`description` varchar(255),
|
91
|
+
`priority` int(11)
|
92
|
+
) ENGINE=InnoDB;
|
93
|
+
|
86
94
|
CREATE TABLE users (
|
87
95
|
`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY,
|
88
96
|
`login` text NOT NULL,
|
@@ -101,4 +109,4 @@ CREATE TABLE schema_info (
|
|
101
109
|
`version` int(11)
|
102
110
|
) ENGINE=InnoDB;
|
103
111
|
|
104
|
-
insert into schema_info (version) values (
|
112
|
+
insert into schema_info (version) values (26);
|
data/db/schema.postgresql.sql
CHANGED
@@ -83,6 +83,14 @@ CREATE TABLE proxy_links (
|
|
83
83
|
"address_id" integer NOT NULL
|
84
84
|
);
|
85
85
|
|
86
|
+
CREATE TABLE sys_configs (
|
87
|
+
"id" serial primary key,
|
88
|
+
"name" character varying(255),
|
89
|
+
"value" character varying(255),
|
90
|
+
"description" character varying(255),
|
91
|
+
"priority" integer
|
92
|
+
);
|
93
|
+
|
86
94
|
CREATE TABLE users (
|
87
95
|
"id" serial primary key,
|
88
96
|
"login" text NOT NULL,
|
@@ -101,4 +109,4 @@ CREATE TABLE schema_info (
|
|
101
109
|
"version" integer
|
102
110
|
);
|
103
111
|
|
104
|
-
insert into schema_info (version) values (
|
112
|
+
insert into schema_info (version) values (26);
|
data/db/schema.sqlite.sql
CHANGED
@@ -83,6 +83,14 @@ CREATE TABLE proxy_links (
|
|
83
83
|
"address_id" integer NOT NULL
|
84
84
|
);
|
85
85
|
|
86
|
+
CREATE TABLE sys_configs (
|
87
|
+
"id" INTEGER PRIMARY KEY NOT NULL,
|
88
|
+
"name" varchar(255),
|
89
|
+
"value" varchar(255),
|
90
|
+
"description" varchar(255),
|
91
|
+
"priority" integer
|
92
|
+
);
|
93
|
+
|
86
94
|
CREATE TABLE users (
|
87
95
|
"id" INTEGER PRIMARY KEY NOT NULL,
|
88
96
|
"login" text NOT NULL,
|
@@ -101,4 +109,4 @@ CREATE TABLE schema_info (
|
|
101
109
|
"version" integer
|
102
110
|
);
|
103
111
|
|
104
|
-
insert into schema_info (version) values (
|
112
|
+
insert into schema_info (version) values (26);
|
data/db/schema.sqlserver.sql
CHANGED
@@ -91,6 +91,15 @@ CREATE TABLE proxy_links (
|
|
91
91
|
[address_id] int NOT NULL
|
92
92
|
);
|
93
93
|
|
94
|
+
CREATE TABLE sys_configs (
|
95
|
+
[id] int NOT NULL IDENTITY(1,
|
96
|
+
1) PRIMARY KEY,
|
97
|
+
[name] varchar(255),
|
98
|
+
[value] varchar(255),
|
99
|
+
[description] varchar(255),
|
100
|
+
[priority] int
|
101
|
+
);
|
102
|
+
|
94
103
|
CREATE TABLE users (
|
95
104
|
[id] int NOT NULL IDENTITY(1,
|
96
105
|
1) PRIMARY KEY,
|
@@ -110,4 +119,4 @@ CREATE TABLE schema_info (
|
|
110
119
|
[version] int
|
111
120
|
);
|
112
121
|
|
113
|
-
insert into schema_info (version) values (
|
122
|
+
insert into schema_info (version) values (26);
|
data/db/schema_version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
26
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'rake/gempackagetask'
|
2
|
+
|
3
|
+
PKG_VERSION = "0.0.5"
|
4
|
+
PKG_NAME = "sugoi-mail"
|
5
|
+
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
6
|
+
|
7
|
+
spec = Gem::Specification.new do |s|
|
8
|
+
s.name = PKG_NAME
|
9
|
+
s.version = PKG_VERSION
|
10
|
+
s.required_ruby_version = ">= 1.8.4"
|
11
|
+
s.summary = "Powerful mailing list manager."
|
12
|
+
# s.description = "FIXME"
|
13
|
+
s.has_rdoc = true
|
14
|
+
|
15
|
+
s.files = Dir.glob('**/*', File::FNM_DOTMATCH).reject do |f|
|
16
|
+
[ /\.$/, /config\/database.yml$/, /config\/database.yml-/,
|
17
|
+
/database\.sqlite/,
|
18
|
+
/\.log$/, /^pkg/, /\.svn/, /^vendor\/rails/, /\~$/,
|
19
|
+
/\/\._/, /\/#/ ].any? {|regex| f =~ regex }
|
20
|
+
end
|
21
|
+
s.require_path = '.'
|
22
|
+
s.author = "Dave Brown"
|
23
|
+
s.email = "dagbrown@invio.co.jp"
|
24
|
+
s.homepage = "http://sugoi-mail.rubyforge.org/"
|
25
|
+
s.rubyforge_project = "sugoi-mail"
|
26
|
+
s.platform = Gem::Platform::RUBY
|
27
|
+
s.executables = [PKG_NAME]
|
28
|
+
|
29
|
+
s.add_dependency("rails", "= 1.1.6")
|
30
|
+
s.add_dependency("rails-app-installer", ">= 0.1.2")
|
31
|
+
s.add_dependency("gurgitate-mail", ">=1.8.0")
|
32
|
+
s.add_dependency("termios", ">=0.9.4")
|
33
|
+
s.add_dependency("highline", ">=1.2.3")
|
34
|
+
s.add_dependency("sqlite3-ruby", ">= 1.1.0")
|
35
|
+
end
|
36
|
+
|
37
|
+
Rake::GemPackageTask.new(spec) do |p|
|
38
|
+
p.gem_spec = spec
|
39
|
+
p.need_tar = false
|
40
|
+
p.need_zip = false
|
41
|
+
end
|
data/public/index.html
ADDED
@@ -0,0 +1,277 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Ruby on Rails: Welcome aboard</title>
|
7
|
+
<style type="text/css" media="screen">
|
8
|
+
body {
|
9
|
+
margin: 0;
|
10
|
+
margin-bottom: 25px;
|
11
|
+
padding: 0;
|
12
|
+
background-color: #f0f0f0;
|
13
|
+
font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
|
14
|
+
font-size: 13px;
|
15
|
+
color: #333;
|
16
|
+
}
|
17
|
+
|
18
|
+
h1 {
|
19
|
+
font-size: 28px;
|
20
|
+
color: #000;
|
21
|
+
}
|
22
|
+
|
23
|
+
a {color: #03c}
|
24
|
+
a:hover {
|
25
|
+
background-color: #03c;
|
26
|
+
color: white;
|
27
|
+
text-decoration: none;
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
#page {
|
32
|
+
background-color: #f0f0f0;
|
33
|
+
width: 750px;
|
34
|
+
margin: 0;
|
35
|
+
margin-left: auto;
|
36
|
+
margin-right: auto;
|
37
|
+
}
|
38
|
+
|
39
|
+
#content {
|
40
|
+
float: left;
|
41
|
+
background-color: white;
|
42
|
+
border: 3px solid #aaa;
|
43
|
+
border-top: none;
|
44
|
+
padding: 25px;
|
45
|
+
width: 500px;
|
46
|
+
}
|
47
|
+
|
48
|
+
#sidebar {
|
49
|
+
float: right;
|
50
|
+
width: 175px;
|
51
|
+
}
|
52
|
+
|
53
|
+
#footer {
|
54
|
+
clear: both;
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
#header, #about, #getting-started {
|
59
|
+
padding-left: 75px;
|
60
|
+
padding-right: 30px;
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
#header {
|
65
|
+
background-image: url("images/rails.png");
|
66
|
+
background-repeat: no-repeat;
|
67
|
+
background-position: top left;
|
68
|
+
height: 64px;
|
69
|
+
}
|
70
|
+
#header h1, #header h2 {margin: 0}
|
71
|
+
#header h2 {
|
72
|
+
color: #888;
|
73
|
+
font-weight: normal;
|
74
|
+
font-size: 16px;
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
#about h3 {
|
79
|
+
margin: 0;
|
80
|
+
margin-bottom: 10px;
|
81
|
+
font-size: 14px;
|
82
|
+
}
|
83
|
+
|
84
|
+
#about-content {
|
85
|
+
background-color: #ffd;
|
86
|
+
border: 1px solid #fc0;
|
87
|
+
margin-left: -11px;
|
88
|
+
}
|
89
|
+
#about-content table {
|
90
|
+
margin-top: 10px;
|
91
|
+
margin-bottom: 10px;
|
92
|
+
font-size: 11px;
|
93
|
+
border-collapse: collapse;
|
94
|
+
}
|
95
|
+
#about-content td {
|
96
|
+
padding: 10px;
|
97
|
+
padding-top: 3px;
|
98
|
+
padding-bottom: 3px;
|
99
|
+
}
|
100
|
+
#about-content td.name {color: #555}
|
101
|
+
#about-content td.value {color: #000}
|
102
|
+
|
103
|
+
#about-content.failure {
|
104
|
+
background-color: #fcc;
|
105
|
+
border: 1px solid #f00;
|
106
|
+
}
|
107
|
+
#about-content.failure p {
|
108
|
+
margin: 0;
|
109
|
+
padding: 10px;
|
110
|
+
}
|
111
|
+
|
112
|
+
|
113
|
+
#getting-started {
|
114
|
+
border-top: 1px solid #ccc;
|
115
|
+
margin-top: 25px;
|
116
|
+
padding-top: 15px;
|
117
|
+
}
|
118
|
+
#getting-started h1 {
|
119
|
+
margin: 0;
|
120
|
+
font-size: 20px;
|
121
|
+
}
|
122
|
+
#getting-started h2 {
|
123
|
+
margin: 0;
|
124
|
+
font-size: 14px;
|
125
|
+
font-weight: normal;
|
126
|
+
color: #333;
|
127
|
+
margin-bottom: 25px;
|
128
|
+
}
|
129
|
+
#getting-started ol {
|
130
|
+
margin-left: 0;
|
131
|
+
padding-left: 0;
|
132
|
+
}
|
133
|
+
#getting-started li {
|
134
|
+
font-size: 18px;
|
135
|
+
color: #888;
|
136
|
+
margin-bottom: 25px;
|
137
|
+
}
|
138
|
+
#getting-started li h2 {
|
139
|
+
margin: 0;
|
140
|
+
font-weight: normal;
|
141
|
+
font-size: 18px;
|
142
|
+
color: #333;
|
143
|
+
}
|
144
|
+
#getting-started li p {
|
145
|
+
color: #555;
|
146
|
+
font-size: 13px;
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
#search {
|
151
|
+
margin: 0;
|
152
|
+
padding-top: 10px;
|
153
|
+
padding-bottom: 10px;
|
154
|
+
font-size: 11px;
|
155
|
+
}
|
156
|
+
#search input {
|
157
|
+
font-size: 11px;
|
158
|
+
margin: 2px;
|
159
|
+
}
|
160
|
+
#search-text {width: 170px}
|
161
|
+
|
162
|
+
|
163
|
+
#sidebar ul {
|
164
|
+
margin-left: 0;
|
165
|
+
padding-left: 0;
|
166
|
+
}
|
167
|
+
#sidebar ul h3 {
|
168
|
+
margin-top: 25px;
|
169
|
+
font-size: 16px;
|
170
|
+
padding-bottom: 10px;
|
171
|
+
border-bottom: 1px solid #ccc;
|
172
|
+
}
|
173
|
+
#sidebar li {
|
174
|
+
list-style-type: none;
|
175
|
+
}
|
176
|
+
#sidebar ul.links li {
|
177
|
+
margin-bottom: 5px;
|
178
|
+
}
|
179
|
+
|
180
|
+
</style>
|
181
|
+
<script type="text/javascript" src="javascripts/prototype.js"></script>
|
182
|
+
<script type="text/javascript" src="javascripts/effects.js"></script>
|
183
|
+
<script type="text/javascript">
|
184
|
+
function about() {
|
185
|
+
if (Element.empty('about-content')) {
|
186
|
+
new Ajax.Updater('about-content', 'rails/info/properties', {
|
187
|
+
method: 'get',
|
188
|
+
onFailure: function() {Element.classNames('about-content').add('failure')},
|
189
|
+
onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
|
190
|
+
});
|
191
|
+
} else {
|
192
|
+
new Effect[Element.visible('about-content') ?
|
193
|
+
'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
window.onload = function() {
|
198
|
+
$('search-text').value = '';
|
199
|
+
$('search').onsubmit = function() {
|
200
|
+
$('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
|
201
|
+
}
|
202
|
+
}
|
203
|
+
</script>
|
204
|
+
</head>
|
205
|
+
<body>
|
206
|
+
<div id="page">
|
207
|
+
<div id="sidebar">
|
208
|
+
<ul id="sidebar-items">
|
209
|
+
<li>
|
210
|
+
<form id="search" action="http://www.google.com/search" method="get">
|
211
|
+
<input type="hidden" name="hl" value="en" />
|
212
|
+
<input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
|
213
|
+
<input type="submit" value="Search" /> the Rails site
|
214
|
+
</form>
|
215
|
+
</li>
|
216
|
+
|
217
|
+
<li>
|
218
|
+
<h3>Join the community</h3>
|
219
|
+
<ul class="links">
|
220
|
+
<li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
|
221
|
+
<li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
|
222
|
+
<li><a href="http://lists.rubyonrails.org/">Mailing lists</a></li>
|
223
|
+
<li><a href="http://wiki.rubyonrails.org/rails/pages/IRC">IRC channel</a></li>
|
224
|
+
<li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
|
225
|
+
<li><a href="http://dev.rubyonrails.org/">Bug tracker</a></li>
|
226
|
+
</ul>
|
227
|
+
</li>
|
228
|
+
|
229
|
+
<li>
|
230
|
+
<h3>Browse the documentation</h3>
|
231
|
+
<ul class="links">
|
232
|
+
<li><a href="http://api.rubyonrails.org/">Rails API</a></li>
|
233
|
+
<li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
|
234
|
+
<li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
|
235
|
+
</ul>
|
236
|
+
</li>
|
237
|
+
</ul>
|
238
|
+
</div>
|
239
|
+
|
240
|
+
<div id="content">
|
241
|
+
<div id="header">
|
242
|
+
<h1>Welcome aboard</h1>
|
243
|
+
<h2>You’re riding the Rails!</h2>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
<div id="about">
|
247
|
+
<h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3>
|
248
|
+
<div id="about-content" style="display: none"></div>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<div id="getting-started">
|
252
|
+
<h1>Getting started</h1>
|
253
|
+
<h2>Here’s how to get rolling:</h2>
|
254
|
+
|
255
|
+
<ol>
|
256
|
+
<li>
|
257
|
+
<h2>Create your databases and edit <tt>config/database.yml</tt></h2>
|
258
|
+
<p>Rails needs to know your login and password.</p>
|
259
|
+
</li>
|
260
|
+
|
261
|
+
<li>
|
262
|
+
<h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
|
263
|
+
<p>To see all available options, run it without parameters.</p>
|
264
|
+
</li>
|
265
|
+
|
266
|
+
<li>
|
267
|
+
<h2>Set up a default route and remove or rename this file</h2>
|
268
|
+
<p>Routes are setup in config/routes.rb.</p>
|
269
|
+
</li>
|
270
|
+
</ol>
|
271
|
+
</div>
|
272
|
+
</div>
|
273
|
+
|
274
|
+
<div id="footer"> </div>
|
275
|
+
</div>
|
276
|
+
</body>
|
277
|
+
</html>
|
@@ -282,4 +282,75 @@ class SugoiAdminControllerTest < Test::Unit::TestCase
|
|
282
282
|
assigns["error"]
|
283
283
|
assert_nil assigns["removed_addresses"]
|
284
284
|
end
|
285
|
+
|
286
|
+
def test_init_collisions
|
287
|
+
assert_nothing_raised do
|
288
|
+
invoke "init"
|
289
|
+
end
|
290
|
+
assert assigns["alreadythere"]
|
291
|
+
end
|
292
|
+
|
293
|
+
def test_init_mailinglistclasses
|
294
|
+
MailinglistClass.delete_all
|
295
|
+
|
296
|
+
assert_nothing_raised do
|
297
|
+
invoke "init"
|
298
|
+
end
|
299
|
+
|
300
|
+
assert assigns["alreadythere"]
|
301
|
+
|
302
|
+
assert assigns.grep(/MailinglistClass/).length == 0
|
303
|
+
|
304
|
+
assert_equal @loaded_fixtures["mailinglist_classes"].length,
|
305
|
+
MailinglistClass.find_all.length
|
306
|
+
end
|
307
|
+
|
308
|
+
def test_init_sysconfigs
|
309
|
+
SysConfig.delete_all
|
310
|
+
|
311
|
+
assert_nothing_raised do
|
312
|
+
invoke "init"
|
313
|
+
end
|
314
|
+
|
315
|
+
assert assigns["alreadythere"]
|
316
|
+
|
317
|
+
assert assigns.grep(/SysConfig/).length == 0
|
318
|
+
|
319
|
+
assert_equal @loaded_fixtures["sys_configs"].length,
|
320
|
+
SysConfig.find_all.length
|
321
|
+
end
|
322
|
+
|
323
|
+
def test_init_adminmessages
|
324
|
+
AdminMessage.delete_all
|
325
|
+
|
326
|
+
assert_nothing_raised do
|
327
|
+
invoke "init"
|
328
|
+
end
|
329
|
+
|
330
|
+
assert assigns["alreadythere"]
|
331
|
+
|
332
|
+
assert assigns.grep(/AdminMessages/).length == 0
|
333
|
+
|
334
|
+
assert_equal @loaded_fixtures["admin_messages"].length,
|
335
|
+
AdminMessage.find_all.length
|
336
|
+
end
|
337
|
+
|
338
|
+
def test_init_all
|
339
|
+
MailinglistClass.delete_all
|
340
|
+
SysConfig.delete_all
|
341
|
+
AdminMessage.delete_all
|
342
|
+
|
343
|
+
assert_nothing_raised do
|
344
|
+
invoke "init"
|
345
|
+
end
|
346
|
+
|
347
|
+
assert_equal 0, assigns["alreadythere"].length
|
348
|
+
|
349
|
+
assert_equal @loaded_fixtures["mailinglist_classes"].length,
|
350
|
+
MailinglistClass.find_all.length
|
351
|
+
assert_equal @loaded_fixtures["sys_configs"].length,
|
352
|
+
SysConfig.find_all.length
|
353
|
+
assert_equal @loaded_fixtures["admin_messages"].length,
|
354
|
+
AdminMessage.find_all.length
|
355
|
+
end
|
285
356
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: sugoi-mail
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-01-
|
6
|
+
version: 0.0.5
|
7
|
+
date: 2007-01-15 00:00:00 +09:00
|
8
8
|
summary: Powerful mailing list manager.
|
9
9
|
require_paths:
|
10
10
|
- .
|
@@ -15,12 +15,12 @@ description:
|
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
|
-
has_rdoc:
|
18
|
+
has_rdoc: true
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.8.
|
23
|
+
version: 1.8.4
|
24
24
|
version:
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- lib/limitedfork.rb
|
53
53
|
- lib/gurgitate-rules.rb
|
54
54
|
- lib/tasks
|
55
|
+
- lib/tasks/release.rake
|
55
56
|
- config/boot.rb
|
56
57
|
- config/routes.rb
|
57
58
|
- config/environment.rb
|
@@ -73,6 +74,7 @@ files:
|
|
73
74
|
- public/404.html
|
74
75
|
- public/images
|
75
76
|
- public/stylesheets
|
77
|
+
- public/index.html
|
76
78
|
- public/javascripts/prototype.js
|
77
79
|
- public/javascripts/application.js
|
78
80
|
- public/javascripts/effects.js
|
@@ -93,6 +95,7 @@ files:
|
|
93
95
|
- app/apis
|
94
96
|
- app/controllers/account_controller.rb
|
95
97
|
- app/controllers/mailinglist_controller.rb
|
98
|
+
- app/controllers/sugoi_admin_help_controller.rb
|
96
99
|
- app/controllers/sugoi_admin_controller.rb
|
97
100
|
- app/controllers/mailservice_controller.rb
|
98
101
|
- app/controllers/commandline_controller.rb
|