Michael Granger avatar Michael Granger committed df7f080

Update to Mongrel2 1.8.1 config schema.

Comments (0)

Files changed (4)

data/mongrel2/config.sql

+begin transaction;
+
 DROP TABLE IF EXISTS server;
 DROP TABLE IF EXISTS host;
 DROP TABLE IF EXISTS handler;
     error_log TEXT,
     chroot TEXT DEFAULT '/var/www',
     pid_file TEXT,
+    control_port TEXT DEFAULT "",
     default_host TEXT,
-    name TEXT DEFAULT '',
+    name TEXT DEFAULT "",
     bind_addr TEXT DEFAULT "0.0.0.0",
     port INTEGER,
-    use_ssl INTEGER default 0);
+    use_ssl INTEGER DEFAULT 0);
 
 CREATE TABLE host (id INTEGER PRIMARY KEY,
     server_id INTEGER,
     target_id INTEGER,
     target_type TEXT);
 
+
 CREATE TABLE setting (id INTEGER PRIMARY KEY, key TEXT, value TEXT);
 
+
 CREATE TABLE statistic (id SERIAL,
     other_type TEXT,
     other_id INTEGER,
     sd REAL,
     primary key (other_type, other_id, name));
 
+CREATE TABLE filter (id INTEGER PRIMARY KEY, 
+    server_id INTEGER, 
+    name TEXT, 
+    settings TEXT);
+
 CREATE TABLE mimetype (id INTEGER PRIMARY KEY, mimetype TEXT, extension TEXT);
 
-CREATE TABLE filter (id INTEGER PRIMARY KEY,
-    server_id INTEGER,
-    name TEXT,
-    settings TEXT);
-
 CREATE TABLE IF NOT EXISTS log(id INTEGER PRIMARY KEY,
     who TEXT,
     what TEXT,
     how TEXT,
     why TEXT);
 
+commit;

data/mongrel2/mimetypes.sql

 insert into mimetype (extension, mimetype) values ('.ftc', 'application/vnd.fluxtime.clip');
 insert into mimetype (extension, mimetype) values ('.pqa', 'application/vnd.palm');
 insert into mimetype (extension, mimetype) values ('.java', 'text/x-java');
-insert into mimetype (extension, mimetype) values ('.apk', 'application/vnd.android.package-archive');
 insert into mimetype (extension, mimetype) values ('.vms', 'chemical/x-vamas-iso14976');
 insert into mimetype (extension, mimetype) values ('.asx', 'video/x-ms-asf');
 

lib/mongrel2/config/server.rb

 class Mongrel2::Config::Server < Mongrel2::Config( :server )
 	include Mongrel2::Constants
 
-	### As of Mongrel2/1.8.0:
+	### As of Mongrel2/1.8.1:
 	# CREATE TABLE server (id INTEGER PRIMARY KEY,
 	#     uuid TEXT,
 	#     access_log TEXT,
 	#     error_log TEXT,
 	#     chroot TEXT DEFAULT '/var/www',
 	#     pid_file TEXT,
+	#     control_port TEXT DEFAULT "",
 	#     default_host TEXT,
-	#     name TEXT DEFAULT '',
+	#     name TEXT DEFAULT "",
 	#     bind_addr TEXT DEFAULT "0.0.0.0",
 	#     port INTEGER,
-	#     use_ssl INTEGER default 0);
+	#     use_ssl INTEGER DEFAULT 0);
 
 	##
 	# Return the dataset for looking up a server by its UUID.

spec/mongrel2/config/dsl_spec.rb

 				chroot '/service/mongrel2'
 				access_log '/var/log/access'
 				error_log '/var/log/errors'
+				control_port '/var/run/intranet.sock'
 			end
 
 			result.should be_a( Mongrel2::Config::Server )
 			result.chroot.should == '/service/mongrel2'
 			result.access_log.should == '/var/log/access'
 			result.error_log.should == '/var/log/errors'
+			result.control_port.should == '/var/run/intranet.sock'
 		end
 	end
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.