You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(381) |
Nov
(176) |
Dec
(310) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(334) |
Feb
(96) |
Mar
(149) |
Apr
(214) |
May
(120) |
Jun
(56) |
Jul
(10) |
Aug
(273) |
Sep
(182) |
Oct
(56) |
Nov
(125) |
Dec
(22) |
2003 |
Jan
(63) |
Feb
(181) |
Mar
(498) |
Apr
(433) |
May
(39) |
Jun
(512) |
Jul
(276) |
Aug
(156) |
Sep
(101) |
Oct
(66) |
Nov
(24) |
Dec
(161) |
2004 |
Jan
(1) |
Feb
(377) |
Mar
(68) |
Apr
(26) |
May
(107) |
Jun
(333) |
Jul
(13) |
Aug
|
Sep
(76) |
Oct
(88) |
Nov
(170) |
Dec
(91) |
2005 |
Jan
(52) |
Feb
(239) |
Mar
(402) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
(13) |
Aug
|
Sep
(71) |
Oct
(34) |
Nov
|
Dec
|
2006 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris W. <la...@us...> - 2005-02-28 00:56:03
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_theme In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/base_theme Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = base_theme version = 2.11 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ sql_installer = OpenInteract2::SQLInstall::Theme description = A theme is a group of properties that affect the display \ of all pages that use it -- generally all pages within the system. \ Themes are very flexible -- you can place in them design elements (such \ as bullets), colors, copyright notices, font faces, just about anything. \ The theme also points to the template we use as the main template file, \ so we can frame the page. The package includes the Theme and \ ThemeProperty objects as well as the handler used to edit themes. This \ package is required for the basic operations of OpenInteract. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_theme/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MANIFEST 13 Feb 2004 05:52:32 -0000 1.3 --- MANIFEST 28 Feb 2005 00:55:41 -0000 1.4 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini conf/spops_theme.ini --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini conf/spops_theme.ini Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_theme/Changes,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Changes 5 Dec 2004 08:51:20 -0000 1.11 --- Changes 28 Feb 2005 00:55:41 -0000 1.12 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base_theme. + 2.11 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.10 Sat Dec 4 00:28:45 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:56:03
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_error In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/base_error Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = base_error version = 3.01 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ sql_installer = OpenInteract2::SQLInstall::Error description = Contains the object definition and methods for the errors thrown by the system, and the handler for browsing the errors. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_error/MANIFEST,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MANIFEST 25 Feb 2005 05:20:39 -0000 1.4 --- MANIFEST 28 Feb 2005 00:55:41 -0000 1.5 *************** *** 1,5 **** Changes MANIFEST ! package.conf conf/action.ini data/install_security.dat --- 1,5 ---- Changes MANIFEST ! package.ini conf/action.ini data/install_security.dat Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_error/Changes,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Changes 25 Feb 2005 05:20:39 -0000 1.13 --- Changes 28 Feb 2005 00:55:41 -0000 1.14 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base_error. + 3.01 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 3.00 Wed Feb 23 22:00:46 EST 2005 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:56:02
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/base_box Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = base_box version = 2.18 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ sql_installer = description = This base package generates the boxes that contain site-wide links, content-specific links, navigation help and information, and any other interesting thing. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MANIFEST 9 Nov 2004 12:26:41 -0000 1.3 --- MANIFEST 28 Feb 2005 00:55:41 -0000 1.4 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini doc/base_box.pod --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini doc/base_box.pod Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/Changes,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Changes 28 Nov 2004 00:09:39 -0000 1.18 --- Changes 28 Feb 2005 00:55:41 -0000 1.19 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base_box. + 2.18 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.17 Sat Nov 27 19:09:06 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:56:02
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/lookup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/lookup Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = lookup version = 2.08 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ sql_installer = OpenInteract2::SQLInstall::Lookup description = Generic lookup table editing Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/lookup/MANIFEST,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST 16 Feb 2004 18:04:16 -0000 1.2 --- MANIFEST 28 Feb 2005 00:55:40 -0000 1.3 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini data/install_security.dat --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini data/install_security.dat Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/lookup/Changes,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Changes 5 Dec 2004 08:51:22 -0000 1.8 --- Changes 28 Feb 2005 00:55:40 -0000 1.9 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package lookup. + 2.08 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.07 Sat Dec 4 12:52:09 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:56:01
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_page In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/base_page Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = base_page version = 2.29 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ module = File::MMagic module = HTTP::Request module = LWP::UserAgent sql_installer = OpenInteract2::SQLInstall::Page description = Object and handler representing a static web page, either \ from the filesystem or from objects stored within a database, or both. \ (Choose the default in 'conf/spops_page.ini'.) This will be the default \ handler for most OpenInteract applications, and is a fundamental part of the system. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/MANIFEST,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MANIFEST 22 May 2004 04:06:32 -0000 1.6 --- MANIFEST 28 Feb 2005 00:55:41 -0000 1.7 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini conf/spops_content_type.ini --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini conf/spops_content_type.ini Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/Changes,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Changes 27 Nov 2004 19:00:28 -0000 1.27 --- Changes 28 Feb 2005 00:55:41 -0000 1.28 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base_page. + 2.29 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.28 Sat Nov 27 13:53:53 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:55:58
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/full_text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/full_text Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = full_text version = 2.59 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ module = DBI module = Lingua::Stem sql_installer = OpenInteract2::SQLInstall::FullText description = Implements full-text searching within OpenInteract (more \ properly within SPOPS, but the package also includes a handler to \ process site-wide searches). Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/full_text/MANIFEST,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MANIFEST 6 Jun 2004 19:55:12 -0000 1.6 --- MANIFEST 28 Feb 2005 00:55:40 -0000 1.7 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini conf/spops_full_text_mapping.ini --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini conf/spops_full_text_mapping.ini Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/full_text/Changes,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Changes 5 Dec 2004 08:51:22 -0000 1.17 --- Changes 28 Feb 2005 00:55:40 -0000 1.18 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package full_text. + 2.59 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.58 Sat Dec 4 12:52:09 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:55:57
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/comments In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/comments Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = comments version = 1.20 author = Chris Winters <ch...@cw...> url = http://www.cwinters.com/ sql_installer = OpenInteract2::SQLInstall::Comments description = Simple comment package -- no threading or karma or ratings \ or anything like that. It's meant to emulate the 80% solution supplied \ by commenting systems with packages like Movable Type or Radio. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/MANIFEST,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST 16 Feb 2004 16:19:50 -0000 1.2 --- MANIFEST 28 Feb 2005 00:55:40 -0000 1.3 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini conf/spops_comment.ini --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini conf/spops_comment.ini Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/Changes,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Changes 7 Dec 2004 22:44:20 -0000 1.17 --- Changes 28 Feb 2005 00:55:40 -0000 1.18 *************** *** 1,4 **** --- 1,11 ---- Revision history for OpenInteract package comments. + 1.20 Sun Feb 27 16:07:21 EST 2005 + + OIN-128: Add the ability to add preformatted text to comments + via <ecode> tags (like use.perl) + + OIN-137: change package.conf -> package.ini + 1.19 Tue Dec 7 17:43:25 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:55:57
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/base Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = base version = 2.13 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ sql_installer = OpenInteract2::SQLInstall::Base description = This package contains some basic framework pieces for OpenInteract. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base/MANIFEST,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MANIFEST 18 Feb 2005 03:15:21 -0000 1.5 --- MANIFEST 28 Feb 2005 00:55:42 -0000 1.6 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf OpenInteract2/Action/Logout.pm OpenInteract2/Action/Package.pm --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini OpenInteract2/Action/Logout.pm OpenInteract2/Action/Package.pm Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base/Changes,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Changes 18 Feb 2005 03:15:21 -0000 1.13 --- Changes 28 Feb 2005 00:55:42 -0000 1.14 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package base. + 2.13 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.12 Thu Feb 17 22:14:27 EST 2005 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:55:54
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29585/news Modified Files: MANIFEST Changes Added Files: package.ini Removed Files: package.conf Log Message: OIN-137: replace 'package.conf' with 'package.ini' --- NEW FILE: package.ini --- [package] name = news version = 2.21 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ sql_installer = OpenInteract2::SQLInstall::News description = Implement a simple news system. Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/MANIFEST,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MANIFEST 25 Feb 2004 01:52:03 -0000 1.6 --- MANIFEST 28 Feb 2005 00:55:39 -0000 1.7 *************** *** 2,6 **** MANIFEST MANIFEST.SKIP ! package.conf conf/action.ini conf/spops_news.ini --- 2,6 ---- MANIFEST MANIFEST.SKIP ! package.ini conf/action.ini conf/spops_news.ini Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/Changes,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Changes 5 Dec 2004 08:51:23 -0000 1.20 --- Changes 28 Feb 2005 00:55:39 -0000 1.21 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package news. + 2.21 Sun Feb 27 16:07:21 EST 2005 + + OIN-137: change package.conf -> package.ini + 2.20 Sat Dec 4 12:52:09 EST 2004 --- package.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-28 00:54:49
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/comments/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29265/comments/OpenInteract2/Action Modified Files: Comments.pm Log Message: OIN-128: use <ecode></ecode> to demarcate preformatted text Index: Comments.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/comments/OpenInteract2/Action/Comments.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Comments.pm 7 Dec 2004 22:44:20 -0000 1.10 --- Comments.pm 28 Feb 2005 00:54:30 -0000 1.11 *************** *** 10,13 **** --- 10,14 ---- use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context qw( CTX ); + use OpenInteract2::Cookie; use OpenInteract2::Util; *************** *** 22,26 **** $log ||= get_logger( LOG_APP ); ! my $object = $self->param( 'object' ); my $obj_class = $self->param( 'class' ); my $obj_id = $self->param( 'object_id' ); --- 23,27 ---- $log ||= get_logger( LOG_APP ); ! my $object = $self->param( 'object' ); my $obj_class = $self->param( 'class' ); my $obj_id = $self->param( 'object_id' ); *************** *** 348,352 **** } ! # Get rid of any HTML tags $comment->{content} =~ s|<[^>]+>||gs; --- 349,368 ---- } ! # store the unescaped version for the re-editing (if preview) ! ! $self->param( pre_escaped => $comment->{content} ); ! ! # pull out any <ecode></ecode> sections for later ! ! my @code_sections = (); ! my $count = 0; ! $comment->{content} =~ s| ! (<ecode>(.*?)</ecode>) ! | ! push @code_sections, $2; ! 'CODECONTENT' . ++$count; ! |gisemx; ! ! # Get rid of any HTML tags (be sure this is after code sections) $comment->{content} =~ s|<[^>]+>||gs; *************** *** 355,363 **** # Escape any remaining HTMLisms - # ...but store the unescaped version for the re-editing (if this - # is a preview) - - $self->param( pre_escaped => $comment->{content} ); - $comment->{content} = HTML::Entities::encode( $comment->{content} ); $comment->{subject} = HTML::Entities::encode( $comment->{subject} ); --- 371,374 ---- *************** *** 371,374 **** --- 382,392 ---- $comment->{content} =~ s/(\r\n\r\n|\n\n)/$1<p>/g; + # put the code sections back in + $count = 1; + foreach my $section ( @code_sections ) { + $comment =~ s|CODESECTION$count|<pre class="commentCode">$section</pre>|gsm; + $count++; + } + # Non-object form widgets *************** *** 398,402 **** my $action = $request->param( 'action' ); ! if ( $action eq 'Preview' ) { return $self->_show_editable; } --- 416,420 ---- my $action = $request->param( 'action' ); ! if ( $action eq $self->_msg( 'comments.form.preview' ) ) { return $self->_show_editable; } *************** *** 471,475 **** } - my $action_info = CTX->lookup_action_info( 'comment' ); --- 489,492 ---- |
From: Chris W. <la...@us...> - 2005-02-26 23:31:37
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901/lib/OpenInteract2 Modified Files: Constants.pm Context.pm Manage.pm Repository.pm Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' Index: Constants.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Constants.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Constants.pm 17 Feb 2004 04:30:13 -0000 1.9 --- Constants.pm 26 Feb 2005 23:31:24 -0000 1.10 *************** *** 49,55 **** ); ! use constant BASE_CONF_DIR => 'conf'; ! use constant BASE_CONF_FILE => 'base.conf'; ! my @FILE = qw( BASE_CONF_DIR BASE_CONF_FILE ); use constant ACTION_KEY => 'ACTION'; --- 49,55 ---- ); ! use constant BOOTSTRAP_CONF_DIR => 'conf'; ! use constant BOOTSTRAP_CONF_FILE => 'bootstrap.ini'; ! my @FILE = qw( BOOTSTRAP_CONF_DIR BOOTSTRAP_CONF_FILE ); use constant ACTION_KEY => 'ACTION'; *************** *** 159,167 **** These are default filenames and directories for various items in OI2: ! B<BASE_CONF_DIR>: This is the default directory under the website where ! you can find the base configuration. This is normally 'conf'. ! B<BASE_CONF_FILE>: This is the default filename for the base ! configuration. It is normally 'base.conf'. =head2 Template Keys --- 159,167 ---- These are default filenames and directories for various items in OI2: ! B<BOOTSTRAP_CONF_DIR>: This is the default directory under the website where ! you can find the bootstrap configuration. This is normally 'conf'. ! B<BOOTSTRAP_CONF_FILE>: This is the default filename for the ! bootstrap configuration. It is normally 'bootstrap.ini'. =head2 Template Keys Index: Context.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Context.pm,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** Context.pm 25 Feb 2005 05:35:59 -0000 1.85 --- Context.pm 26 Feb 2005 23:31:24 -0000 1.86 *************** *** 42,46 **** require OpenInteract2::Config; ! require OpenInteract2::Config::Base; require OpenInteract2::DatasourceManager; require OpenInteract2::Observer; --- 42,46 ---- require OpenInteract2::Config; ! require OpenInteract2::Config::Bootstrap; require OpenInteract2::DatasourceManager; require OpenInteract2::Observer; *************** *** 53,57 **** require OpenInteract2::I18N; ! my @CORE_FIELDS = qw( base_config repository packages cache datasource_manager timezone timezone_object setup_class ); my @REQUEST_FIELDS = qw( request response controller user group is_logged_in is_admin ); --- 53,57 ---- require OpenInteract2::I18N; ! my @CORE_FIELDS = qw( bootstrap repository packages cache datasource_manager timezone timezone_object setup_class ); my @REQUEST_FIELDS = qw( request response controller user group is_logged_in is_admin ); *************** *** 62,66 **** # $item should be either a hashref of parameters (preferably with one ! # parameter 'website_dir') or an OI2::Config::Base object sub create { --- 62,66 ---- # $item should be either a hashref of parameters (preferably with one ! # parameter 'website_dir') or an OI2::Config::Bootstrap object sub create { *************** *** 75,91 **** my $ctx = bless( {}, $class ); ! my ( $base_config ); ! if ( ref $item eq 'OpenInteract2::Config::Base' ) { ! $base_config = $item; ! $website_dir = $base_config->website_dir; } elsif ( $item->{website_dir} ) { ! $base_config = eval { ! OpenInteract2::Config::Base->new({ ! website_dir => $item->{website_dir} }) }; if ( $@ ) { OpenInteract2::Exception->throw( ! "Cannot create base config object using website ", "directory '$item->{website_dir}': $@" ); } --- 75,92 ---- my $ctx = bless( {}, $class ); ! my ( $bootstrap ); ! if ( ref $item eq 'OpenInteract2::Config::Bootstrap' ) { ! $bootstrap = $item; ! $website_dir = $bootstrap->website_dir; } elsif ( $item->{website_dir} ) { ! $bootstrap = eval { ! OpenInteract2::Config::Bootstrap->new({ ! website_dir => $item->{website_dir} ! }) }; if ( $@ ) { OpenInteract2::Exception->throw( ! "Cannot create bootstrap object using website ", "directory '$item->{website_dir}': $@" ); } *************** *** 104,110 **** $log_init ||= get_logger( LOG_INIT ); ! if ( $base_config ) { ! $ctx->base_config( $base_config ); ! $log_init->is_debug && $log_init->debug( "Assigned base config ok" ); eval { $ctx->setup( $params ) }; if ( $@ ) { --- 105,112 ---- $log_init ||= get_logger( LOG_INIT ); ! if ( $bootstrap ) { ! $ctx->bootstrap( $bootstrap ); ! $log_init->is_debug && ! $log_init->debug( "Assigned bootstrap ok; setting up..." ); eval { $ctx->setup( $params ) }; if ( $@ ) { *************** *** 149,167 **** $log_init->info( "Will skip setup tasks: ", join( ', ', @skip ) ); } ! my $base_config = $self->base_config; ! unless ( $base_config and ! ref( $base_config ) eq 'OpenInteract2::Config::Base' ) { ! $log_init->error( "Cannot run setup() without base_config defined" ); OpenInteract2::Exception->throw( ! "Cannot run setup() on context without a valid base ", ! "configuration object set" ); } # This should call _initialize_singleton() when it's got the ! # context in a decent state OpenInteract2::Setup->run_all_actions( $self, @skip ); - $log_init->info( "Initialized context ok" ); return $self; } --- 151,170 ---- $log_init->info( "Will skip setup tasks: ", join( ', ', @skip ) ); } ! my $bootstrap = $self->bootstrap; ! unless ( $bootstrap and ! ref( $bootstrap ) eq 'OpenInteract2::Config::Bootstrap' ) { ! $log_init->error( "Cannot run setup() without bootstrap defined" ); OpenInteract2::Exception->throw( ! "Cannot run setup() on context without a valid ", ! "bootstrap configuration object set" ); } # This should call _initialize_singleton() when it's got the ! # context in a decent state... + $log_init->info( "Running setup actions..." ); OpenInteract2::Setup->run_all_actions( $self, @skip ); + $log_init->info( "Setup actions ran ok, context now initialized" ); return $self; } *************** *** 187,191 **** if ( $config ) { $log_init ||= get_logger( LOG_INIT ); ! $config->{dir}{website} = $self->base_config->website_dir; $config->translate_dirs; $log_init->info( "Translated server config directories ok" ); --- 190,194 ---- if ( $config ) { $log_init ||= get_logger( LOG_INIT ); ! $config->{dir}{website} = $self->bootstrap->website_dir; $config->translate_dirs; $log_init->info( "Translated server config directories ok" ); *************** *** 567,573 **** sub lookup_temp_lib_directory { my ( $self ) = @_; ! my $base_config = $self->base_config; ! my $lib_dir = $base_config->temp_lib_dir || DEFAULT_TEMP_LIB_DIR; ! return File::Spec->catdir( $base_config->website_dir, $lib_dir ); } --- 570,576 ---- sub lookup_temp_lib_directory { my ( $self ) = @_; ! my $bootstrap = $self->bootstrap; ! my $lib_dir = $bootstrap->temp_lib_dir || DEFAULT_TEMP_LIB_DIR; ! return File::Spec->catdir( $bootstrap->website_dir, $lib_dir ); } *************** *** 979,989 **** Returns: L<OpenInteract2::Context|OpenInteract2::Context> object ! B<create( $base_config|\%config_params, [ \%setup_params ] )> Creates a new context. If you pass in a ! L<OpenInteract2::Config::Base|OpenInteract2::Config::Base> object or ! specify 'website_dir' in C<\%setup_params>, it will run the server ! initialization routines in C<setup()>. (If you pass in an invalid ! directory for the parameter an exception is thrown.) If you do not know these items when the context is created, you can do --- 982,992 ---- Returns: L<OpenInteract2::Context|OpenInteract2::Context> object ! B<create( $bootstrap|\%config_params, [ \%setup_params ] )> Creates a new context. If you pass in a ! L<OpenInteract2::Config::Bootstrap|OpenInteract2::Config::Bootstrap> ! object or specify 'website_dir' in C<\%setup_params>, it will run the ! server initialization routines in C<setup()>. (If you pass in an ! invalid directory for the parameter an exception is thrown.) If you do not know these items when the context is created, you can do *************** *** 994,1001 **** ... some time later ... ! my $base_config = OpenInteract2::Config::Base->new({ website_dir => $dir } ); ... or ... ! my $base_config = OpenInteract2::Config::Base->new({ filename => $file } ); ! $ctx->base_config( $base_config ); $ctx->setup(); --- 997,1008 ---- ... some time later ... ! my $bootstrap = OpenInteract2::Config::Bootstrap->new({ ! website_dir => $dir ! }); ... or ... ! my $bootstrap = OpenInteract2::Config::Bootstrap->new({ ! filename => $file ! }); ! $ctx->bootstrap( $bootstrap ); $ctx->setup(); *************** *** 1022,1031 **** Runs a series of routines, mostly from L<OpenInteract2::Setup|OpenInteract2::Setup>, to initialize the ! singleton context object. If the C<base_config> property has not been set with a valid ! L<OpenInteract2::Config::Base|OpenInteract2::Config::Base> object, an exception is thrown. ! If you pass to C<create()> a C<base_config> object or a valid website directory, C<setup()> will be called automatically. --- 1029,1038 ---- Runs a series of routines, mostly from L<OpenInteract2::Setup|OpenInteract2::Setup>, to initialize the ! singleton context object. If the C<bootstrap> property has not been set with a valid ! L<OpenInteract2::Config::Bootstrap|OpenInteract2::Config::Bootstrap> object, an exception is thrown. ! If you pass to C<create()> a C<bootstrap> object or a valid website directory, C<setup()> will be called automatically. *************** *** 1492,1498 **** Creates the fully-qualified name for the temporary library ! directory. This can be specified in the base configuration ! (C<conf/base.conf>) or a default (C<tmplib/>) is provided. Both are ! relative to the website directory. This method does not care of the directory exists or not, it just --- 1499,1505 ---- Creates the fully-qualified name for the temporary library ! directory. This can be specified in the bootstrap configuration ! (C<conf/bootstrap.ini>) or a default (C<tmplib/>) is provided. Both ! are relative to the website directory. This method does not care of the directory exists or not, it just *************** *** 1579,1584 **** methods. ! B<base_config>: Holds the ! L<OpenInteract2::Config::Base|OpenInteract2::Config::Base> object. This must be defined for the context to be initialized. --- 1586,1591 ---- methods. ! B<bootstrap>: Holds the ! L<OpenInteract2::Config::Bootstrap|OpenInteract2::Config::Bootstrap> object. This must be defined for the context to be initialized. *************** *** 1601,1605 **** L<OpenInteract2::Action|OpenInteract2::Action> ! L<OpenInteract2::Config::Base|OpenInteract2::Config::Base> L<OpenInteract2::Setup|OpenInteract2::Setup> --- 1608,1612 ---- L<OpenInteract2::Action|OpenInteract2::Action> ! L<OpenInteract2::Config::Bootstrap|OpenInteract2::Config::Bootstrap> L<OpenInteract2::Setup|OpenInteract2::Setup> Index: Manage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage.pm,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Manage.pm 13 Feb 2005 20:16:36 -0000 1.46 --- Manage.pm 26 Feb 2005 23:31:24 -0000 1.47 *************** *** 500,507 **** } $log->info( "Website directory '$website_dir' exists, setting up context..." ); ! my $base_config = OpenInteract2::Config::Base->new({ website_dir => $website_dir }); ! OpenInteract2::Context->create( $base_config, $params ); $log->info( "Context setup for management task(s) ok" ); } --- 500,508 ---- } $log->info( "Website directory '$website_dir' exists, setting up context..." ); ! my $bootstrap = OpenInteract2::Config::Bootstrap->new({ website_dir => $website_dir }); ! $log->info( "Created bootstrap config ok, creating context..." ); ! OpenInteract2::Context->create( $bootstrap, $params ); $log->info( "Context setup for management task(s) ok" ); } Index: Repository.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Repository.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Repository.pm 24 Jan 2005 17:11:54 -0000 1.21 --- Repository.pm 26 Feb 2005 23:31:24 -0000 1.22 *************** *** 27,31 **** # CONSTRUCTOR ! # Open up the repository, using the OpenInteract2::Config::Base object # or a specified website directory. Can also open up from a separate # file if specified. --- 27,31 ---- # CONSTRUCTOR ! # Open up the repository, using the OpenInteract2::Config::Bootstrap object # or a specified website directory. Can also open up from a separate # file if specified. *************** *** 41,45 **** my $repository_file = REPOSITORY_FILE; my $typeof = ref $item; ! if ( $typeof eq 'OpenInteract2::Config::Base' ) { $self->website_dir( $item->website_dir ); $self->config_dir( $item->config_dir ); --- 41,45 ---- my $repository_file = REPOSITORY_FILE; my $typeof = ref $item; ! if ( $typeof eq 'OpenInteract2::Config::Bootstrap' ) { $self->website_dir( $item->website_dir ); $self->config_dir( $item->config_dir ); *************** *** 333,337 **** # Get a reference to a repository ! my $repository = OpenInteract2::Repository->new( CTX->base_config ); # OR a handy shortcut once the setup actions have run --- 333,337 ---- # Get a reference to a repository ! my $repository = OpenInteract2::Repository->new( CTX->bootstrap ); # OR a handy shortcut once the setup actions have run *************** *** 415,419 **** =head1 METHODS ! B<new( [ $base_config | \%params ] )> Creates a new repository object. You normally do not call this --- 415,419 ---- =head1 METHODS ! B<new( [ $bootstrap | \%params ] )> Creates a new repository object. You normally do not call this *************** *** 421,426 **** context. ! Initialization is preferred with C<$base_config>, which is a ! L<OpenInteract2::Config::Base|OpenInteract2::Config::Base> object. This contains the website, config and package directories we need to initialize the repository. --- 421,426 ---- context. ! Initialization is preferred with C<$bootstrap>, which is a ! L<OpenInteract2::Config::Bootstrap|OpenInteract2::Config::Bootstrap> object. This contains the website, config and package directories we need to initialize the repository. |
From: Chris W. <la...@us...> - 2005-02-26 23:31:37
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901/lib/OpenInteract2/Setup Modified Files: ReadRepository.pm ReadSPOPSConfig.pm ReadServerConfig.pm Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' Index: ReadRepository.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup/ReadRepository.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReadRepository.pm 24 Jan 2005 17:17:31 -0000 1.1 --- ReadRepository.pm 26 Feb 2005 23:31:25 -0000 1.2 *************** *** 19,26 **** my ( $self, $ctx ) = @_; $log ||= get_logger( LOG_INIT ); ! my $base_config = $ctx->base_config; ! $log->info( "Creating context from base config with ", ! "'", $base_config->website_dir, "'" ); ! $ctx->repository( OpenInteract2::Repository->new( $base_config ) ); } --- 19,26 ---- my ( $self, $ctx ) = @_; $log ||= get_logger( LOG_INIT ); ! my $bootstrap = $ctx->bootstrap; ! $log->info( "Creating context from bootstrap with ", ! "'", $bootstrap->website_dir, "'" ); ! $ctx->repository( OpenInteract2::Repository->new( $bootstrap ) ); } *************** *** 46,52 **** =head1 DESCRIPTION ! This setup action just passes the 'base_config' property (a ! L<OpenInteract2::Config::Base>) of the context to a constructor for ! L<OpenInteract2::Repository>. =head2 Setup Metadata --- 46,52 ---- =head1 DESCRIPTION ! This setup action just passes the 'bootstrap' property (a ! L<OpenInteract2::Config::Bootstrap>) of the context to a constructor ! for L<OpenInteract2::Repository>. =head2 Setup Metadata Index: ReadSPOPSConfig.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup/ReadSPOPSConfig.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReadSPOPSConfig.pm 24 Jan 2005 17:17:31 -0000 1.1 --- ReadSPOPSConfig.pm 26 Feb 2005 23:31:25 -0000 1.2 *************** *** 19,23 **** sub get_dependencies { ! return ( 'read packages' ); } --- 19,23 ---- sub get_dependencies { ! return ( 'initialize actions' ); } Index: ReadServerConfig.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup/ReadServerConfig.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReadServerConfig.pm 24 Jan 2005 17:17:31 -0000 1.1 --- ReadServerConfig.pm 26 Feb 2005 23:31:25 -0000 1.2 *************** *** 24,38 **** my ( $self, $ctx ) = @_; $log ||= get_logger( LOG_INIT ); ! my $base = $ctx->base_config; ! unless ( ref $base eq 'OpenInteract2::Config::Base' ) { ! oi_error "Cannot read server configuration: 'base_config' ", "property of context not set properly"; } ! my $server_config_file = $base->get_server_config_file; unless ( $server_config_file ) { oi_error "Cannot read server configuration: filename not ", ! "defined in base config file ", $base->filename; } ! my $config_type = $base->config_type; $log->info( "Reading server configuration as '$config_type' ", "with '$server_config_file'" ); --- 24,38 ---- my ( $self, $ctx ) = @_; $log ||= get_logger( LOG_INIT ); ! my $bootstrap = $ctx->bootstrap; ! unless ( ref $bootstrap eq 'OpenInteract2::Config::Bootstrap' ) { ! oi_error "Cannot read server configuration: 'bootstrap' ", "property of context not set properly"; } ! my $server_config_file = $bootstrap->get_server_config_file; unless ( $server_config_file ) { oi_error "Cannot read server configuration: filename not ", ! "defined in bootstrap file ", $bootstrap->filename; } ! my $config_type = $bootstrap->config_type; $log->info( "Reading server configuration as '$config_type' ", "with '$server_config_file'" ); *************** *** 64,69 **** This setup action reads in the server configuration. To do so it needs ! information from the L<OpenInteract2::Config::Base> object registered ! with the context: =over 4 --- 64,69 ---- This setup action reads in the server configuration. To do so it needs ! information from the L<OpenInteract2::Config::Bootstrap> object ! registered with the context: =over 4 |
From: Chris W. <la...@us...> - 2005-02-26 23:31:37
|
Update of /cvsroot/openinteract/OpenInteract2/sample/website/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901/sample/website/conf Modified Files: FILES Added Files: bootstrap.ini Removed Files: base.conf Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' --- NEW FILE: bootstrap.ini --- # This configuration bootstraps the server into existence [bootstrap] website_dir = [% website_dir %] config_dir = conf config_file = server.ini config_type = ini config_class = OpenInteract2::Config::IniFile package_dir = pkg temp_lib_dir = tmplib Index: FILES =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/conf/FILES,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FILES 28 Jan 2005 15:37:10 -0000 1.7 --- FILES 26 Feb 2005 23:31:25 -0000 1.8 *************** *** 1,3 **** ! base.conf --> conf base.conf action_override.ini --> conf sample-action_override.ini spops_override.ini --> conf sample-spops_override.ini --- 1,3 ---- ! bootstrap.ini --> conf bootstrap.ini action_override.ini --> conf sample-action_override.ini spops_override.ini --> conf sample-spops_override.ini --- base.conf DELETED --- |
From: Chris W. <la...@us...> - 2005-02-26 23:31:37
|
Update of /cvsroot/openinteract/OpenInteract2/sample/apache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901/sample/apache Modified Files: startup.pl Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' Index: startup.pl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/apache/startup.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** startup.pl 25 Jun 2003 14:14:44 -0000 1.5 --- startup.pl 26 Feb 2005 23:31:25 -0000 1.6 *************** *** 5,20 **** use Apache::OpenInteract2::HttpAuth; use Log::Log4perl; ! use OpenInteract2::Config::Base; use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context; ! my $BASE_CONFIG_FILE = '[% website_dir %]/conf/base.conf'; { Log::Log4perl::init( '[% website_dir %]/conf/log4perl.conf' ); ! my $base_config = OpenInteract2::Config::Base->new( ! { filename => $BASE_CONFIG_FILE } ); my $ctx = OpenInteract2::Context->create( ! $base_config, { temp_lib_create => 'create' } ); $ctx->assign_request_type( 'apache' ); $ctx->assign_response_type( 'apache' ); --- 5,21 ---- use Apache::OpenInteract2::HttpAuth; use Log::Log4perl; ! use OpenInteract2::Config::Bootstrap; use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context; ! my $BOOTSTRAP_CONFIG_FILE = '[% website_dir %]/conf/bootstrap.ini'; { Log::Log4perl::init( '[% website_dir %]/conf/log4perl.conf' ); ! my $bootstrap = OpenInteract2::Config::Bootstrap->new({ ! filename => $BOOTSTRAP_CONFIG_FILE ! }); my $ctx = OpenInteract2::Context->create( ! $bootstrap, { temp_lib_create => 'create' } ); $ctx->assign_request_type( 'apache' ); $ctx->assign_response_type( 'apache' ); |
From: Chris W. <la...@us...> - 2005-02-26 23:31:36
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901/lib/OpenInteract2/Config Added Files: Bootstrap.pm Removed Files: Base.pm Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' --- NEW FILE: Bootstrap.pm --- package OpenInteract2::Config::Bootstrap; # $Id: Bootstrap.pm,v 1.1 2005/02/26 23:31:24 lachoy Exp $ use strict; use base qw( Exporter Class::Accessor::Fast ); use File::Basename qw( dirname ); use File::Spec::Functions qw( :ALL ); use Log::Log4perl qw( get_logger ); use OpenInteract2::Config::Ini; use OpenInteract2::Constants qw( :log BOOTSTRAP_CONF_DIR BOOTSTRAP_CONF_FILE ); use OpenInteract2::Context qw( CTX ); use OpenInteract2::Exception qw( oi_error ); $OpenInteract2::Config::Bootstrap::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/); my ( $log ); my @CONFIG_FIELDS = qw( website_dir temp_lib_dir package_dir config_type config_class config_dir config_file ); my @FIELDS = ( @CONFIG_FIELDS, 'filename' ); OpenInteract2::Config::Bootstrap->mk_accessors( @FIELDS ); ######################################## # CLASS METHODS sub new { my ( $class, $params ) = @_; $log ||= get_logger( LOG_CONFIG ); my $self = bless( {}, $class ); my $filename = $params->{filename}; my $website_dir = $params->{website_dir}; if ( ! $filename and $website_dir ) { $filename = $self->create_website_filename( $website_dir ); $self->website_dir( $website_dir ); } # If the last directory of the specified file is 'conf', assume # that everything else is the website dir elsif ( $filename and ! $website_dir ) { $filename = rel2abs( $filename ); my @dirs = splitdir( dirname( $filename ) ); if ( $dirs[-1] eq BOOTSTRAP_CONF_DIR ) { pop @dirs; $self->website_dir( catdir( @dirs ) ); } } if ( $filename and -f $filename ) { $params = $self->read_config( $filename ); $self->filename( $filename ); } unless ( $self->config_dir ) { $self->config_dir( BOOTSTRAP_CONF_DIR ); } $self->_initialize( $params ); $log->debug( "Read bootstrap configuration ok, returning" ); return $self; } sub read_config { my ( $class, $filename ) = @_; $log ||= get_logger( LOG_CONFIG ); unless ( -f $filename ) { my $msg = "Cannot open '$filename' for bootstrap server " . "configuration: file does not exist"; $log->fatal( $msg ); oi_error $msg; } my $ini = OpenInteract2::Config::Ini->new({ filename => $filename }); return {} unless ( $ini->{bootstrap} ); my %params = (); while ( my ( $key, $value ) = each %{ $ini->{bootstrap} } ) { $params{ $key } = $value; } return \%params; } sub create_website_filename { my ( $class, $dir ) = @_; unless ( $dir ) { oi_error "Must pass in website directory to create ", "bootstrap filename"; } return $class->create_filename( catdir( $dir, BOOTSTRAP_CONF_DIR ) ); } sub create_filename { my ( $class, $dir ) = @_; unless ( $dir ) { oi_error "Must pass in directory to create bootstrap filename"; } return catfile( $dir, BOOTSTRAP_CONF_FILE ); } ######################################## # OBJECT METHODS sub _initialize { my ( $self, $params ) = @_; foreach my $field ( @CONFIG_FIELDS ) { if ( $params->{ $field } ) { $self->$field( $params->{ $field } ); if ( $field =~ /dir$/ ) { $self->clean_dir( $field ); } } } return $self; } sub clean_dir { my ( $self, $prop ) = @_; my $dir = $self->$prop(); if ( $dir ) { $dir =~ s|/$||; $self->$prop( $dir ); } return $dir; } sub get_server_config_file { my ( $self ) = @_; unless ( $self->website_dir and $self->config_dir and $self->config_file ) { oi_error sprintf( "Properties 'website_dir', 'config_dir' and 'config_file' must " . "be defined to retrieve the config filename. Currently assigned " . "as '%s', '%s' and '%s'", $self->website_dir, $self->config_dir, $self->config_file ); } $self->clean_dir( 'website_dir' ); $self->clean_dir( 'config_dir' ); return catfile( $self->website_dir, $self->config_dir, $self->config_file ); } sub save_config { my ( $self, ) = @_; # First ensure required fields are set my @empty_fields = grep { ! $self->$_() } @CONFIG_FIELDS; if ( scalar @empty_fields ) { oi_error "Cannot save bootstrap config: the following fields ", "must be defined: ", join( ", ", @empty_fields ); } # If no filename create one from the website_dir unless ( $self->filename() ) { $self->filename( $self->create_website_filename( $self->website_dir ) ); } # Now store data into the INI and write it out my $ini = OpenInteract2::Config::Ini->new(); foreach my $field ( @CONFIG_FIELDS ) { $ini->set( 'bootstrap', $field, $self->$field() ); } $ini->write_file( $self->filename() ); return $self->filename(); } 1; __END__ =head1 NAME OpenInteract2::Config::Bootstrap - Represents a server bootstrap configuration =head1 SYNOPSIS # Sample bootstrap configuration [bootstrap] website_dir = /path/to/mysite config_type = ini config_class = OpenInteract2::Config::IniFile config_dir = conf config_file = server.ini package_dir = pkg # Open an existing bootstrap my $bc = OpenInteract2::Config::Bootstrap->new({ website_dir => '/path/to/mysite' }); my $bc = OpenInteract2::Config::Bootstrap->new({ filename => '/path/to/mysite/conf/bootstrap-alt.ini' }); # Create a new one and write it with the default filename my $bc = OpenInteract2::Config::Bootstrap->new; $bc->website_dir( '/path/to/mysite' ); $bc->config_type( 'ini' ); $bc->config_class( 'OpenInteract2::Config::IniFile' ); $bc->config_dir( 'conf' ); $bc->config_file( 'server.ini' ); $bc->package_dir( 'pkg' ); $bc->save_config(); =head1 DESCRIPTION This configuration enables you to easily bootstrap an OpenInteract server with just a little information. =head1 METHODS =head2 Class Methods B<new( [ \%params ] )> Creates a new bootstrap object. You can initialize it with as many parameters as you like if you are creating one from scratch. You can also pass in one of: =over 4 =item B<filename> =item B<website_dir> =back And the constructor will read values from C<filename> or the filename returned by C<create_filename()> with C<website_dir>. The constructor will also set the C<filename> property to the file from which the values were read. Returns: A C<OpenInteract2::Config::Bootstrap> object. B<read_config( $filename )> Reads configuration values from C<$filename> and returns the configured key/value pairs. When reading in the file we sskip all blank lines as well as lines beginning with a '#' for comments. Extra space is stripped from the beginning and ending of all keys and values. Returns: Hashref of config values from $filename. B<create_website_filename( $website_directory )> Creates a typicaly configuration filename given C<$website_directory>. This is: $website_directory/BOOTSTRAP_CONF_DIR/BOOTSTRAP_CONF_FILE where C<BOOTSTRAP_CONF_DIR> and C<BOOTSTRAP_CONF_FILE> are from L<OpenInteract2::Constants|OpenInteract2::Constants>. An exception is thrown if C<$directory> is not provided. We do not check whether C<$directory> is a valid directory. Returns: a potential filename for a bootstrap object B<create_filename( $directory )> Creates a typical configuration filename given C<$directory>. This is: $directory/BOOTSTRAP_CONF_FILE where C<BOOTSTRAP_CONF_FILE> is from L<OpenInteract2::Constants|OpenInteract2::Constants>. An exception is thrown if C<$directory> is not provided. We do not check whether C<$directory> is a valid directory. Returns: a potential filename for a bootstrap object =head2 Object Methods B<clean_dir( $property_name )> Remove the trailing '/' from the directory specified by C<$property_name>. Sets the property in the object and returns the cleaned directory. Example: $bc->clean_dir( 'config_dir' ); $bc->clean_dir( 'website_dir' ); Returns: the cleaned directory. B<get_server_config_file()> Puts together the properties 'website_dir', 'config_dir' and 'config_file' to create a fully qualified filename. Returns: full filename for the server config. B<save_config()> Writes the configured values from the object to a file. If you do not set a filename before calling this the method will create one for you using C<create_filename()> and the value from the C<website_dir> property. If you do not have all the properties defined the method will throw an exception. Returns: the filename to which the configuration was written. =head1 PROPERTIES B<website_dir>: Root directory of the website B<config_type>: Type of configuration site is using B<config_class>: Class used to read server configuration B<config_dir>: Directory where configuration is kept, relative to C<website_dir> B<config_file>: Name of configuration file in C<config_dir> B<package_dir>: Directory where packages are kept, relative to C<website_dir>. B<filename>: Location of configuration file; not written out to the bootstrap file. =head1 SEE ALSO L<Class::Accessor> L<OpenInteract2::Config::Ini> =head1 COPYRIGHT Copyright (c) 2001-2004 Chris Winters. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Chris Winters E<lt>ch...@cw...E<gt> --- Base.pm DELETED --- |
From: Chris W. <la...@us...> - 2005-02-26 23:31:36
|
Update of /cvsroot/openinteract/OpenInteract2/sample/apache2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901/sample/apache2 Modified Files: startup_mp2.pl Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' Index: startup_mp2.pl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/apache2/startup_mp2.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** startup_mp2.pl 19 Feb 2004 04:25:36 -0000 1.1 --- startup_mp2.pl 26 Feb 2005 23:31:25 -0000 1.2 *************** *** 6,10 **** use CGI; use Log::Log4perl; ! use OpenInteract2::Config::Base; use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context; --- 6,10 ---- use CGI; use Log::Log4perl; ! use OpenInteract2::Config::Bootstrap; use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context; *************** *** 12,23 **** CGI->compile( ':all' ); ! my $BASE_CONFIG_FILE = '[% website_dir %]/conf/base.conf'; { Log::Log4perl::init( '[% website_dir %]/conf/log4perl.conf' ); ! my $base_config = OpenInteract2::Config::Base->new( ! { filename => $BASE_CONFIG_FILE } ); my $ctx = OpenInteract2::Context->create( ! $base_config, { temp_lib_create => 'create' } ); $ctx->assign_request_type( 'apache2' ); $ctx->assign_response_type( 'apache2' ); --- 12,24 ---- CGI->compile( ':all' ); ! my $BOOTSTRAP_CONFIG_FILE = '[% website_dir %]/conf/bootstrap.ini'; { Log::Log4perl::init( '[% website_dir %]/conf/log4perl.conf' ); ! my $bootstrap = OpenInteract2::Config::Bootstrap->new({ ! filename => $BOOTSTRAP_CONFIG_FILE ! }); my $ctx = OpenInteract2::Context->create( ! $bootstrap, { temp_lib_create => 'create' } ); $ctx->assign_request_type( 'apache2' ); $ctx->assign_response_type( 'apache2' ); |
From: Chris W. <la...@us...> - 2005-02-26 23:31:32
|
Update of /cvsroot/openinteract/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2901 Modified Files: MANIFEST Log Message: OIN-136: replace all OI2::Config::Base references with ::Bootstrap and all 'base.conf' references with 'bootstrap.ini' Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/MANIFEST,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** MANIFEST 25 Feb 2005 05:43:34 -0000 1.116 --- MANIFEST 26 Feb 2005 23:31:24 -0000 1.117 *************** *** 62,66 **** lib/OpenInteract2/Cache/File.pm lib/OpenInteract2/Config.pm ! lib/OpenInteract2/Config/Base.pm lib/OpenInteract2/Config/GlobalOverride.pm lib/OpenInteract2/Config/Ini.pm --- 62,66 ---- lib/OpenInteract2/Cache/File.pm lib/OpenInteract2/Config.pm ! lib/OpenInteract2/Config/Bootstrap.pm lib/OpenInteract2/Config/GlobalOverride.pm lib/OpenInteract2/Config/Ini.pm *************** *** 113,116 **** --- 113,117 ---- lib/OpenInteract2/Manage/Website.pm lib/OpenInteract2/Manage/Website/CleanExpiredSessions.pm + lib/OpenInteract2/Manage/Website/CleanOrphanedUsers.pm lib/OpenInteract2/Manage/Website/Create.pm lib/OpenInteract2/Manage/Website/CreateSecurity.pm *************** *** 239,243 **** t/cache.t t/cache_file.t ! t/config_base.t t/config_ini.t t/config_ini_file.t --- 240,244 ---- t/cache.t t/cache_file.t ! t/config_bootstrap.t t/config_ini.t t/config_ini_file.t |
From: Chris W. <la...@us...> - 2005-02-26 23:24:59
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv858/OpenInteract2/Config Modified Files: Ini.pm Log Message: initialize metadata so we don't get any surprises if people don't assign data to the INI object properly (using hash access vs set()) Index: Ini.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/Ini.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Ini.pm 27 Nov 2004 20:33:55 -0000 1.18 --- Ini.pm 26 Feb 2005 23:24:35 -0000 1.19 *************** *** 19,31 **** # Stuff in metadata (_m): ! # sections (\@): all full sections, in the order they were read ! # comments (\%): key is full section name, value is comment scalar ! # filename ($): file read from ! # directory ($): directory file read from sub new { my ( $pkg, $params ) = @_; my $class = ref $pkg || $pkg; ! my $self = bless( {}, $class ); if ( $self->{_m}{filename} = $params->{filename} ) { $self->{_m}{directory} = $params->{directory} || dirname( $params->{filename} ); --- 19,39 ---- # Stuff in metadata (_m): ! # sections (\@): all full sections, in the order they were read ! # comments (\%): key is full section name, value is comment scalar ! # filename ($): file read from ! # directory ($): directory file read from ! # order (\@): order of sections read/assigned ! # order_map (\%): to determine if section exists sub new { my ( $pkg, $params ) = @_; my $class = ref $pkg || $pkg; ! my $self = bless( { ! filename => '', ! directory => '', ! sections => [], ! comments => {}, ! order => [], ! }, $class ); if ( $self->{_m}{filename} = $params->{filename} ) { $self->{_m}{directory} = $params->{directory} || dirname( $params->{filename} ); |
From: Chris W. <la...@us...> - 2005-02-26 23:22:55
|
Update of /cvsroot/openinteract/OpenInteract2/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32729/t Modified Files: url.t Log Message: OIN-135: modify URL parsing to deal with additional parameters and return from parse() methods Index: url.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/url.t,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** url.t 27 Nov 2004 18:27:33 -0000 1.14 --- url.t 26 Feb 2005 23:22:45 -0000 1.15 *************** *** 7,11 **** require 'utils.pl'; use OpenInteract2::Context qw( CTX ); ! use Test::More tests => 112; initialize_context(); --- 7,11 ---- require 'utils.pl'; use OpenInteract2::Context qw( CTX ); ! use Test::More tests => 135; initialize_context(); *************** *** 24,77 **** { my ( $action_name, $task ); ! ( $action_name, $task ) = $UCL->parse( 'http://www.infocom.com/games/explore/' ); is( $action_name, 'games', 'Action name from full URL (relative)' ); is( $task, 'explore', 'Task from full URL (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( 'http://www.infocom.com/games/explore/' ); is( $action_name, 'games', 'Action name from full URL (absolute)' ); is( $task, 'explore', 'Task from full URL (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( 'http://www.infocom.com/games/explore/?name=zork' ); is( $action_name, 'games', 'Action name from full URL with query (relative)' ); is( $task, 'explore', 'Task from full URL with query (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( 'http://www.infocom.com/games/explore/?name=zork' ); is( $action_name, 'games', 'Action name from full URL with query (absolute)' ); is( $task, 'explore', 'Task from full URL with query (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( '/foo/bar/baz/' ); is( $action_name, 'foo', 'Action name from relative URL path (relative)' ); is( $task, 'bar', 'Task from relative URL path (relative)' ); } { my ( $action_name, $task ); ! ( $action_name, $task ) = $UCL->parse_absolute( '/foo/bar/baz/' ); is( $action_name, 'foo', 'Action name from URL path (absolute)' ); is( $task, 'bar', 'Task from relative URL path (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( '/foo/bar/baz/?blah=blech' ); is( $action_name, 'foo', 'Action name from URL path with query (relative)' ); is( $task, 'bar', ! 'Task from URL path with query (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( '/foo/bar/baz/?blah=blech' ); is( $action_name, 'foo', 'Action name from URL path with query (absolute)' ); is( $task, 'bar', 'Task from URL path with query (absolute)' ); ( $action_name, $task ) = $UCL->parse( '/foo/?bar=baz' ); --- 24,103 ---- { my ( $action_name, $task ); ! my ( @params ); ! ( $action_name, $task, @params ) = $UCL->parse( 'http://www.infocom.com/games/explore/5/2' ); is( $action_name, 'games', 'Action name from full URL (relative)' ); is( $task, 'explore', 'Task from full URL (relative)' ); + is( $params[0], '5', + 'REST 1 from full URL (relative)' ); + is( $params[1], '2', + 'REST 2 from full URL (relative)' ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( 'http://www.infocom.com/games/explore/6/8' ); is( $action_name, 'games', 'Action name from full URL (absolute)' ); is( $task, 'explore', 'Task from full URL (absolute)' ); + is( $params[0], '6', + 'REST 1 from full URL (absolute)' ); + is( $params[1], '8', + 'REST 2 from full URL (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( 'http://www.infocom.com/games/explore/infocom/?name=zork' ); is( $action_name, 'games', 'Action name from full URL with query (relative)' ); is( $task, 'explore', 'Task from full URL with query (relative)' ); + is( $params[0], 'infocom', + 'REST 1 from full URL with query (relative)' ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( 'http://www.infocom.com/games/explore/frobozz//?name=zork' ); is( $action_name, 'games', 'Action name from full URL with query (absolute)' ); is( $task, 'explore', 'Task from full URL with query (absolute)' ); + is( $params[0], 'frobozz', + 'REST 1 from full URL with query (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( '/foo/bar/baz/' ); is( $action_name, 'foo', 'Action name from relative URL path (relative)' ); is( $task, 'bar', 'Task from relative URL path (relative)' ); + is( $params[0], 'baz', + 'REST 1 from relative URL path (relative)' ); } { my ( $action_name, $task ); ! my ( @params ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( '/foo/bar/baz/' ); is( $action_name, 'foo', 'Action name from URL path (absolute)' ); is( $task, 'bar', 'Task from relative URL path (absolute)' ); + is( $params[0], 'baz', + 'REST 1 from relative URL path (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( '/foo/bar/baz/quux?blah=blech' ); is( $action_name, 'foo', 'Action name from URL path with query (relative)' ); is( $task, 'bar', ! 'Task from URL path with query (relative)' ); ! is( $params[0], 'baz', ! 'REST 1 from URL path with query (relative)' ); ! is( $params[1], 'quux', ! 'REST 2 from URL path with query (relative)' ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( '/foo/bar/goo/gle/?blah=blech' ); is( $action_name, 'foo', 'Action name from URL path with query (absolute)' ); is( $task, 'bar', 'Task from URL path with query (absolute)' ); + is( $params[0], 'goo', + 'REST 1 from URL path with query (absolute)' ); + is( $params[1], 'gle', + 'REST 2 from URL path with query (absolute)' ); ( $action_name, $task ) = $UCL->parse( '/foo/?bar=baz' ); *************** *** 195,252 **** { my ( $action_name, $task ); ! ( $action_name, $task ) = $UCL->parse( 'http://www.infocom.com/games/explore/' ); is( $action_name, 'games', 'Action name from full URL not under context, with context set (relative)' ); is( $task, 'explore', 'Task from full URL not under context, with context set (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( 'http://www.infocom.com/games/explore/' ); is( $action_name, undef, 'Action name from full URL not under context, with context set (absolute)' ); is( $task, undef, 'Task from full URL not under context, with context set (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( '/foo/bar/baz/' ); is( $action_name, 'foo', 'Action name from URL path not under context, with context set (relative)' ); is( $task, 'bar', 'Task from URL path not under context, with context set (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( '/foo/bar/baz/' ); is( $action_name, undef, 'Action name from URL path not under context, with context set (absolute)' ); is( $task, undef, 'Task from URL path not under context, with context set (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( 'http://www.infocom.com/OpenInteract/games/explore/' ); is( $action_name, 'OpenInteract', 'Action name from full URL, with context set (relative)' ); is( $task, 'games', 'Task from full URL, with context set (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( 'http://www.infocom.com/OpenInteract/games/explore/' ); is( $action_name, 'games', 'Action name from full URL, with context set (absolute)' ); is( $task, 'explore', 'Task from full URL, with context set (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( 'http://www.infocom.com/OpenInteract/games/explore/?name=zork' ); is( $action_name, 'OpenInteract', 'Action name from full URL with query, with context set (relative)' ); is( $task, 'games', 'Task from full URL with query, with context set (relative)' ); ! ( $action_name, $task ) = $UCL->parse_absolute( 'http://www.infocom.com/OpenInteract/games/explore/?name=zork' ); is( $action_name, 'games', 'Action name from full absolute URL with query, with context set (absolute)' ); is( $task, 'explore', 'Task from full URL with query, with context set (absolute)' ); ! ( $action_name, $task ) = $UCL->parse( '/OpenInteract/foo/bar/baz/' ); is( $action_name, 'OpenInteract', 'Action name from URL path under context, with context set (relative)' ); is( $task, 'foo', 'Task from URL path under context, with context set (relative)' ); ( $action_name, $task ) = $UCL->parse_absolute( '/OpenInteract/foo/bar/baz/' ); --- 221,302 ---- { my ( $action_name, $task ); + my ( @params ); ! ( $action_name, $task, @params ) = $UCL->parse( 'http://www.infocom.com/games/explore/foo' ); is( $action_name, 'games', 'Action name from full URL not under context, with context set (relative)' ); is( $task, 'explore', 'Task from full URL not under context, with context set (relative)' ); + is( $params[0], 'foo', + 'REST 1 from full URL not under context, with context set (relative)' ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( 'http://www.infocom.com/games/explore/' ); is( $action_name, undef, 'Action name from full URL not under context, with context set (absolute)' ); is( $task, undef, 'Task from full URL not under context, with context set (absolute)' ); + is( scalar @params, 0, + 'No REST from full URL not under context, with context set (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( '/foo/bar/baz/' ); is( $action_name, 'foo', 'Action name from URL path not under context, with context set (relative)' ); is( $task, 'bar', 'Task from URL path not under context, with context set (relative)' ); + is( $params[0], 'baz', + 'REST 1 from URL path not under context, with context set (relative)' ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( '/foo/bar/baz/' ); is( $action_name, undef, 'Action name from URL path not under context, with context set (absolute)' ); is( $task, undef, 'Task from URL path not under context, with context set (absolute)' ); + is( scalar @params, 0, + 'No REST from URL path not under context, with context set (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( 'http://www.infocom.com/OpenInteract/games/explore/' ); is( $action_name, 'OpenInteract', 'Action name from full URL, with context set (relative)' ); is( $task, 'games', 'Task from full URL, with context set (relative)' ); + is( $task, 'explore', + 'REST 1 from full URL, with context set (relative)' ); ! ( $action_name, $task, @params ) = ! $UCL->parse_absolute( 'http://www.infocom.com/OpenInteract/games/explore/textbased/sf' ); is( $action_name, 'games', 'Action name from full URL, with context set (absolute)' ); is( $task, 'explore', 'Task from full URL, with context set (absolute)' ); + is( $params[0], 'textbased', + 'REST 1 from full URL, with context set (absolute)' ); + is( $params[1], 'sf', + 'REST 2 from full URL, with context set (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( 'http://www.infocom.com/OpenInteract/games/explore/classic?name=zork' ); is( $action_name, 'OpenInteract', 'Action name from full URL with query, with context set (relative)' ); is( $task, 'games', 'Task from full URL with query, with context set (relative)' ); + is( $params[0], 'classic', + 'REST 1 from full URL with query, with context set (relative)' ); ! ( $action_name, $task, @params ) = $UCL->parse_absolute( 'http://www.infocom.com/OpenInteract/games/explore/classic/?name=zork' ); is( $action_name, 'games', 'Action name from full absolute URL with query, with context set (absolute)' ); is( $task, 'explore', 'Task from full URL with query, with context set (absolute)' ); + is( $params[0], 'classic', + 'REST 1 from full URL with query, with context set (absolute)' ); ! ( $action_name, $task, @params ) = $UCL->parse( '/OpenInteract/foo/bar/baz/' ); is( $action_name, 'OpenInteract', 'Action name from URL path under context, with context set (relative)' ); is( $task, 'foo', 'Task from URL path under context, with context set (relative)' ); + is( $params[0], 'bar', + 'REST 1 from URL path under context, with context set (relative)' ); + is( $params[1], 'baz', + 'REST 2 from URL path under context, with context set (relative)' ); ( $action_name, $task ) = $UCL->parse_absolute( '/OpenInteract/foo/bar/baz/' ); |
From: Chris W. <la...@us...> - 2005-02-26 23:22:54
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32729/lib/OpenInteract2 Modified Files: URL.pm Log Message: OIN-135: modify URL parsing to deal with additional parameters and return from parse() methods Index: URL.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/URL.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** URL.pm 27 Nov 2004 18:27:33 -0000 1.28 --- URL.pm 26 Feb 2005 23:22:45 -0000 1.29 *************** *** 53,60 **** } ! my ( $action_name ) = $path =~ m|^/([^/?]+)|; ! my ( $task ) = $path =~ m|^/[^/]+/([^/?]+)|; ! ! return ( $action_name, $task ); } --- 53,60 ---- } ! my @path_items = split( /\//, $path ); ! shift @path_items unless ( $path_items[0] ); ! pop @path_items unless ( $path_items[-1] ); ! return ( @path_items ); } *************** *** 274,290 **** B<parse( $url )> ! Parses C<$url> into an action name and task, disregarding the URL ! context. It does not attempt to verify whether the action name or the ! task is valid. This should only be used on relative URLs, or ones ! already stripped by the L<OpenInteract2::Request|OpenInteract2::Request> object. ! Note that an action name and task are still returned if an application ! is deployed under a context and the URL does not start with that ! context. See C<parse_absolute()> for a version that takes this into ! account. ! Return: two-item list of the action name and task pulled from ! C<$url>. Note that the second item may be undefined. Examples: --- 274,291 ---- B<parse( $url )> ! Parses C<$url> into an action name and task and any additional ! parameters, disregarding the URL context. It does not attempt to ! verify whether the action name or the task is valid. This should only ! be used on relative URLs, or ones already stripped by the L<OpenInteract2::Request|OpenInteract2::Request> object. ! Note that an action name, task and parameters are still returned if an ! application is deployed under a context and the URL does not start ! with that context. See C<parse_absolute()> for a version that takes ! this into account. ! Return: list with the action name and task and additional parameters ! pulled from C<$url>; if the C<$url> is empty or just a single '/' the ! list will be empty as well. Examples: *************** *** 294,297 **** --- 295,301 ---- # $action_name = 'games', $task = 'explore' + my ( $action_name, $task, @params ) = OpenInteract2::URL->parse( '/games/explore/1' ); + # $action_name = 'games', $task = 'explore', $params[0] = '1' + CTX->assign_deploy_url( '/Public' ); my ( $action_name, $task ) = OpenInteract2::URL->parse( '/games/explore/' ); *************** *** 302,305 **** --- 306,313 ---- # $action_name = 'games', $task = undef; + CTX->assign_deploy_url( '/Public' ); + my ( $action_name, $task, @params ) = OpenInteract2::URL->parse( '/games/display/42/?foo=bar' ); + # $action_name = 'games', $task = 'display', $params[0] = '42'; + my ( $action_name, $task ) = OpenInteract2::URL->parse( '/Public/games/explore/' ); # $action_name = 'games', $task = 'explore' *************** *** 307,310 **** --- 315,321 ---- my ( $action_name, $task ) = OpenInteract2::URL->parse( '/Public/games/?foo=bar' ); # $action_name = 'games', $task = undef + + my ( $action_name, $task, @params ) = OpenInteract2::URL->parse( '/Public/games/explore/55?foo=bar' ); + # $action_name = 'games', $task = 'explore', $params[0] = '55' B<Alias>: C<parse_relative( $url )> *************** *** 334,337 **** --- 345,351 ---- # $action_name = 'games', $task = 'explore' + my ( $action_name, $task, @params ) = OpenInteract2::URL->parse_absolute( '/Public/games/explore/42' ); + # $action_name = 'games', $task = 'explore', $params[0] = '42' + my ( $action_name, $task ) = OpenInteract2::URL->parse_absolute( '/Public/games/?foo=bar' ); # $action_name = 'games', $task = undef *************** *** 371,375 **** Finally: if C<$base_url> begins with 'http:' we do not modify it in ! any way (including escaping it) except to append the C<\%params>. Return: URL formed from the deployed context, C<$base_url> and --- 385,390 ---- Finally: if C<$base_url> begins with 'http:' we do not modify it in ! any way (including escaping it or adding a context) except to append ! the C<\%params>. Return: URL formed from the deployed context, C<$base_url> and *************** *** 402,405 **** --- 417,423 ---- # $url = '/Public/foo?name=Mario%20Lemiux' + $url = OpenInteract2::URL->create( 'http://foo bar/foo', { name => 'Mario Lemieux' } ); + # $url = 'http://foo bar/foo?name=Mario%20Lemiux' + CTX->assign_deploy_url( '/cgi-bin/oi.cgi' ); $url = OpenInteract2::URL->create( '/foo', { bar => 'baz' } ); |
From: Chris W. <la...@us...> - 2005-02-26 23:13:32
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29155 Modified Files: SQLInstall.pm Log Message: oh, that's embarassing... Index: SQLInstall.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SQLInstall.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** SQLInstall.pm 26 Feb 2005 22:51:26 -0000 1.28 --- SQLInstall.pm 26 Feb 2005 23:13:23 -0000 1.29 *************** *** 239,243 **** ); ! my $num_skip_files = scalar ; my %restrict_to = map { $_ => 1 } @restrict_files; --- 239,243 ---- ); ! my $num_skip_files = scalar @restrict_files; my %restrict_to = map { $_ => 1 } @restrict_files; |
From: Chris W. <la...@us...> - 2005-02-26 23:07:15
|
Update of /cvsroot/openinteract/OpenInteract2/sample/package_from_table In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26870 Modified Files: FILES Added Files: App.pm Removed Files: package.pod Log Message: OIN-72: move 'package.pod' to 'App.pm' so documentation is searchable/viewable using standard tools --- NEW FILE: App.pm --- package OpenInteract2::App::[% class_name %]; use strict; use base qw( Exporter OpenInteract2::App ); use OpenInteract2::Manage; $OpenInteract2::App::[% class_name %]::VERSION = '0.01'; @OpenInteract2::App::[% class_name %]::EXPORT = qw( install ); sub get_brick_name { return '[% package_name %]'; } # Not a method, just an exported sub sub install { my ( $website_dir ) = @_; my $manage = OpenInteract2::Manage->new( 'install_package' ); $manage->param( website_dir => $website_dir ); $manage->param( package_class => __PACKAGE__ ); return $manage->execute; } __END__ =pod =head1 NAME OpenInteract2::App::[% class_name %] - This application will do everything! =head1 SYNOPSIS =head1 DESCRIPTION =head1 OBJECTS No objects created by this application. =head1 ACTIONS No actions defined in this application. =head1 RULESETS No rulesets defined in this application. =head1 TASKS No management tasks defined in this application. =head1 SEE ALSO =head1 AUTHORS Who AmI E<lt>me...@wh...E<gt> =cut Index: FILES =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/package_from_table/FILES,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FILES 17 Feb 2005 05:09:36 -0000 1.1 --- FILES 26 Feb 2005 23:07:03 -0000 1.2 *************** *** 3,10 **** spops.ini --> conf spops.ini action.ini --> conf action.ini - package.pod --> doc [% package_name %].pod messages_en.msg --> msg/[% package_name %]-messages-en.msg SQLInstall.pm --> OpenInteract2 SQLInstall [% class_name %].pm Action.pm --> OpenInteract2 Action [% class_name %].pm form.tmpl --> template form.tmpl display.tmpl --> template display.tmpl --- 3,10 ---- spops.ini --> conf spops.ini action.ini --> conf action.ini messages_en.msg --> msg/[% package_name %]-messages-en.msg SQLInstall.pm --> OpenInteract2 SQLInstall [% class_name %].pm Action.pm --> OpenInteract2 Action [% class_name %].pm + App.pm --> OpenInteract2 App [% class_name %].pm form.tmpl --> template form.tmpl display.tmpl --> template display.tmpl --- package.pod DELETED --- |
From: Chris W. <la...@us...> - 2005-02-26 23:06:01
|
Update of /cvsroot/openinteract/OpenInteract2/sample/package In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26511 Modified Files: FILES Added Files: App.pm Removed Files: package.pod Log Message: OIN-72: move 'package.pod' to 'App.pm' so documentation is searchable/viewable using standard tools --- NEW FILE: App.pm --- package OpenInteract2::App::[% class_name %]; use strict; use base qw( Exporter OpenInteract2::App ); use OpenInteract2::Manage; $OpenInteract2::App::[% class_name %]::VERSION = '0.01'; @OpenInteract2::App::[% class_name %]::EXPORT = qw( install ); sub get_brick_name { return '[% package_name %]'; } # Not a method, just an exported sub sub install { my ( $website_dir ) = @_; my $manage = OpenInteract2::Manage->new( 'install_package' ); $manage->param( website_dir => $website_dir ); $manage->param( package_class => __PACKAGE__ ); return $manage->execute; } __END__ =pod =head1 NAME OpenInteract2::App::[% class_name %] - This application will do everything! =head1 SYNOPSIS =head1 DESCRIPTION =head1 OBJECTS No objects created by this application. =head1 ACTIONS No actions defined in this application. =head1 RULESETS No rulesets defined in this application. =head1 TASKS No management tasks defined in this application. =head1 SEE ALSO =head1 AUTHORS Who AmI E<lt>me...@wh...E<gt> =cut Index: FILES =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/package/FILES,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FILES 28 Jan 2005 15:37:09 -0000 1.5 --- FILES 26 Feb 2005 23:05:51 -0000 1.6 *************** *** 7,15 **** package.conf --> package.conf ! package.pod --> doc [% package_name %].pod ! SQLInstall.pm --> OpenInteract2 SQLInstall [% class_name %].pm ! Action.pm --> OpenInteract2 Action [% class_name %].pm spops.ini --> conf spops.ini action.ini --> conf action.ini ! MANIFEST.SKIP --> MANIFEST.SKIP *sample.tmpl --> template sample.tmpl \ No newline at end of file --- 7,15 ---- package.conf --> package.conf ! MANIFEST.SKIP --> MANIFEST.SKIP spops.ini --> conf spops.ini action.ini --> conf action.ini ! SQLInstall.pm --> OpenInteract2 SQLInstall [% class_name %].pm ! Action.pm --> OpenInteract2 Action [% class_name %].pm ! App.pm --> OpenInteract2 App [% class_name %].pm *sample.tmpl --> template sample.tmpl \ No newline at end of file --- package.pod DELETED --- |
From: Chris W. <la...@us...> - 2005-02-26 23:04:16
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26060 Modified Files: Package.pm Log Message: OIN-72: don't create a 'doc' subdirectory anymore (docs will be in separate module...) Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Package.pm 17 Feb 2005 05:01:11 -0000 1.48 --- Package.pm 26 Feb 2005 23:04:05 -0000 1.49 *************** *** 35,39 **** my @PKG_SUBDIR = qw( ! conf data doc msg struct template script html html/images OpenInteract2 OpenInteract2/Action OpenInteract2/SQLInstall ); --- 35,39 ---- my @PKG_SUBDIR = qw( ! conf data msg struct template script html html/images OpenInteract2 OpenInteract2/Action OpenInteract2/SQLInstall ); |
From: Chris W. <la...@us...> - 2005-02-26 22:51:35
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22266 Modified Files: SQLInstall.pm Log Message: OIN-134: ensure that the files given to us to restrict by aren't blank/empty Index: SQLInstall.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SQLInstall.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** SQLInstall.pm 26 Feb 2005 04:14:18 -0000 1.27 --- SQLInstall.pm 26 Feb 2005 22:51:26 -0000 1.28 *************** *** 167,170 **** --- 167,174 ---- sub install_structure { my ( $self, @restrict_files ) = @_; + + # filter out empty/undef items + @restrict_files = grep { $_ } @restrict_files; + my $pkg = $self->package; unless ( UNIVERSAL::isa( $self->package, 'OpenInteract2::Package' ) ) { *************** *** 174,178 **** $log->is_info && $log->info( "Installing structure for package ", ! $self->package->full_name ); my $package_name = $pkg->name; --- 178,183 ---- $log->is_info && $log->info( "Installing structure for package ", ! $self->package->full_name, "and skipping files [", ! join( '] [', @restrict_files ), ']' ); my $package_name = $pkg->name; *************** *** 233,242 **** $self->get_structure_file( $structure_set, $driver_name ) ); ! my %restrict_to_files = map { $_ => 1 } @restrict_files; foreach my $structure_file ( @all_files ) { ! if ( scalar @restrict_files ! and ! $restrict_to_files{ $structure_file } ) { ! $log->info( "Skipping file '$structure_file' since files ", ! "were specified and it's not in the list" ); next; } --- 238,250 ---- $self->get_structure_file( $structure_set, $driver_name ) ); ! ! my $num_skip_files = scalar ; ! my %restrict_to = map { $_ => 1 } @restrict_files; ! foreach my $structure_file ( @all_files ) { ! if ( $num_skip_files and ! $restrict_to{ $structure_file } ) { ! $log->info( "Skipping file '$structure_file' since ", ! "$num_skip_files files were specified to ", ! "skip and this one is not in the list" ); next; } |