Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 19:28:13 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r235735 - in user/des/fbce: . db lib/FBCE/Model
Message-ID:  <201205211928.q4LJSDdn069900@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Mon May 21 19:28:13 2012
New Revision: 235735
URL: http://svn.freebsd.org/changeset/base/235735

Log:
  Move the database connection information to the configuration file.
  Remove RCS id from lib/FBCE/Model/FBCE.pm, which should hereafter never
  change except to reflect changes in Catalyst itself.

Modified:
  user/des/fbce/db/update.sh   (contents, props changed)
  user/des/fbce/fbce.conf   (contents, props changed)
  user/des/fbce/lib/FBCE/Model/FBCE.pm   (contents, props changed)

Modified: user/des/fbce/db/update.sh
==============================================================================
--- user/des/fbce/db/update.sh	Mon May 21 19:04:56 2012	(r235734)
+++ user/des/fbce/db/update.sh	Mon May 21 19:28:13 2012	(r235735)
@@ -1,8 +1,8 @@
 #!/bin/sh
+#
+# $FreeBSD$
+#
 
 cd $(dirname $(realpath $0))
 
-../script/fbce_create.pl model \
-    FBCE DBIC::Schema FBCE::Schema \
-    create=static \
-    "dbi:Pg:dbname=fbce" fbce
+../script/fbce_create.pl model FBCE DBIC::Schema FBCE::Schema

Modified: user/des/fbce/fbce.conf
==============================================================================
--- user/des/fbce/fbce.conf	Mon May 21 19:04:56 2012	(r235734)
+++ user/des/fbce/fbce.conf	Mon May 21 19:28:13 2012	(r235735)
@@ -1,5 +1,15 @@
+# $FreeBSD$
+
 title = 2012 FreeBSD Core Team Election
 
+<Model::FBCE>
+  <connect_info>
+    dsn = "dbi:Pg:dbname=dbname"
+    user = "user"
+    password = "password"
+  </connect_info>
+</Model::FBCE>
+
 <Model::Schedule>
   nominating_starts = 2012-05-23 00:00:00 UTC
   nominating_ends = 2012-05-30 00:00:00 UTC

Modified: user/des/fbce/lib/FBCE/Model/FBCE.pm
==============================================================================
--- user/des/fbce/lib/FBCE/Model/FBCE.pm	Mon May 21 19:04:56 2012	(r235734)
+++ user/des/fbce/lib/FBCE/Model/FBCE.pm	Mon May 21 19:28:13 2012	(r235735)
@@ -5,12 +5,6 @@ use base 'Catalyst::Model::DBIC::Schema'
 
 __PACKAGE__->config(
     schema_class => 'FBCE::Schema',
-    
-    connect_info => {
-        dsn => 'dbi:Pg:dbname=fbce',
-        user => 'fbce',
-        password => '',
-    }
 );
 
 =head1 NAME



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205211928.q4LJSDdn069900>