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-03-29 02:36:32
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13339 Modified Files: package.ini Changes Log Message: OIN-58: add examples and more info about creating a box to OI2::App::BaseBox; cleanup the boxes action; update message keys to lose the '.label' Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/package.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** package.ini 17 Mar 2005 13:22:15 -0000 1.4 --- package.ini 29 Mar 2005 02:36:22 -0000 1.5 *************** *** 1,5 **** [package] name = base_box ! version = 2.21 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ --- 1,5 ---- [package] name = base_box ! version = 2.30 author = Chris Winters <ch...@cw...> url = http://www.openinteract.org/ Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/Changes,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Changes 17 Mar 2005 13:22:14 -0000 1.22 --- Changes 29 Mar 2005 02:36:23 -0000 1.23 *************** *** 1,4 **** --- 1,9 ---- Revision history for OpenInteract package base_box. + 2.30 Sun Mar 27 12:05:36 EST 2005 + + Clean up OI2::Action::Box; move docs into OI2::App::BaseBox + including more tutorials about different types of boxes. + 2.21 Thu Mar 17 08:05:13 EST 2005 |
From: Chris W. <la...@us...> - 2005-03-29 02:36:32
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13339/template Modified Files: user_info_box.tmpl powered_by_box.tmpl object_modify_box.tmpl login_box.tmpl Log Message: OIN-58: add examples and more info about creating a box to OI2::App::BaseBox; cleanup the boxes action; update message keys to lose the '.label' Index: user_info_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/user_info_box.tmpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** user_info_box.tmpl 22 May 2004 04:58:23 -0000 1.7 --- user_info_box.tmpl 29 Mar 2005 02:36:21 -0000 1.8 *************** *** 10,17 **** </span><br /> <span align="right"> ! <a href="[% edit_url %]">[% MSG( 'user_info_box.label.customize' ) %]</a> | ! <a href="[% logout_url %]">[% MSG( 'user_info_box.label.signout' ) %]</a> </span> [%- ELSE -%] ! [%- MSG( 'user_info_box.label.no_login' ) -%] [%- END -%] \ No newline at end of file --- 10,17 ---- </span><br /> <span align="right"> ! <a href="[% edit_url %]">[% MSG( 'user_info_box.customize' ) %]</a> | ! <a href="[% logout_url %]">[% MSG( 'user_info_box.signout' ) %]</a> </span> [%- ELSE -%] ! [%- MSG( 'user_info_box.no_login' ) -%] [%- END -%] \ No newline at end of file Index: powered_by_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/powered_by_box.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** powered_by_box.tmpl 11 Feb 2004 06:12:46 -0000 1.2 --- powered_by_box.tmpl 29 Mar 2005 02:36:21 -0000 1.3 *************** *** 1,7 **** <p>[% MSG( 'powered_by_box.summary' ) %]</p> <p align="center"> ! <a href="http://openinteract.sourceforge.net/"><img src="/images/pw_by_oi.gif" border="0" ! width="88" height="31" ! alt="Powered by OpenInteract!"></a> <br> <a href="http://perl.apache.org/"><img src="/images/pw_by_mod_perl.gif" border="0" --- 1,7 ---- <p>[% MSG( 'powered_by_box.summary' ) %]</p> <p align="center"> ! <a href="http://www.openinteract.org/"><img src="/images/pw_by_oi.gif" border="0" ! width="88" height="31" ! alt="Powered by OpenInteract!"></a> <br> <a href="http://perl.apache.org/"><img src="/images/pw_by_mod_perl.gif" border="0" Index: object_modify_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/object_modify_box.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** object_modify_box.tmpl 11 Feb 2004 06:12:46 -0000 1.3 --- object_modify_box.tmpl 29 Mar 2005 02:36:21 -0000 1.4 *************** *** 13,17 **** object_id = object_info.object_id ) -%] [%- theme.bullet %] <a href="[% security_url %]"> ! [%- MSG( 'object_modify_box.label.edit_security' ) %]</a><br> [%- tagged = tagged + 1 -%] [% END -%] --- 13,17 ---- object_id = object_info.object_id ) -%] [%- theme.bullet %] <a href="[% security_url %]"> ! [%- MSG( 'object_modify_box.edit_security' ) %]</a><br> [%- tagged = tagged + 1 -%] [% END -%] *************** *** 23,27 **** object_id = object_info.object_id ) -%] [%- theme.bullet %] <a href="[% topics_url %]"> ! [%- MSG( 'object_modify_box.label.edit_security' ) %]</a><br> [%- tagged = tagged + 1 -%] [%- END -%] --- 23,27 ---- object_id = object_info.object_id ) -%] [%- theme.bullet %] <a href="[% topics_url %]"> ! [%- MSG( 'object_modify_box.edit_security' ) %]</a><br> [%- tagged = tagged + 1 -%] [%- END -%] Index: login_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/login_box.tmpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** login_box.tmpl 5 Oct 2004 02:01:47 -0000 1.9 --- login_box.tmpl 29 Mar 2005 02:36:21 -0000 1.10 *************** *** 21,25 **** [% END %] <tr> ! <td align="right">[% MSG( 'login_box.label.name' ) %]</td> <td>[% INCLUDE form_text( name = login_config.login_field, size = 8, --- 21,25 ---- [% END %] <tr> ! <td align="right">[% MSG( 'login_box.name' ) %]</td> <td>[% INCLUDE form_text( name = login_config.login_field, size = 8, *************** *** 27,31 **** </tr> <tr> ! <td align="right">[% MSG( 'login_box.label.password' ) %]</td> <td>[% INCLUDE form_password( name = login_config.password_field, size = 8 ) -%]</td> --- 27,31 ---- </tr> <tr> ! <td align="right">[% MSG( 'login_box.password' ) %]</td> <td>[% INCLUDE form_password( name = login_config.password_field, size = 8 ) -%]</td> *************** *** 36,43 **** [%- IF login_config.remember_field -%] [%- INCLUDE form_checkbox( name = login_config.remember_field, ! value = 'yes' ) -%] [% MSG( 'login_box.label.remember' ) %]<br> [% END -%] [% END -%] ! <a href="[% forgot_url %]">[% MSG( 'login_box.label.forgot' ) %]</a> </td> <td align="right"> --- 36,43 ---- [%- IF login_config.remember_field -%] [%- INCLUDE form_checkbox( name = login_config.remember_field, ! value = 'yes' ) -%] [% MSG( 'login_box.remember' ) %]<br> [% END -%] [% END -%] ! <a href="[% forgot_url %]">[% MSG( 'login_box.forgot' ) %]</a> </td> <td align="right"> |
From: Chris W. <la...@us...> - 2005-03-29 02:35:55
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13128/template Modified Files: admin_tools_box.tmpl Log Message: OIN-58: add examples and more info about creating a box to OI2::App::BaseBox; cleanup the boxes action; update message keys to lose the '.label' Index: admin_tools_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/admin_tools_box.tmpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_tools_box.tmpl 14 Mar 2005 02:12:47 -0000 1.7 --- admin_tools_box.tmpl 29 Mar 2005 02:35:47 -0000 1.8 *************** *** 15,26 **** user_new_url = OI.make_url( ACTION = 'user', TASK = 'display_add' ); -%] ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.error_browser', error_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.group', group_list_url, group_new_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.lookup', lookup_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.activity', activity_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.page', page_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.security', security_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.template', tmpl_list_url, tmpl_new_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.doc', docs_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.theme', theme_list_url, theme_new_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.label.user', user_search_url, user_new_url ) %] --- 15,26 ---- user_new_url = OI.make_url( ACTION = 'user', TASK = 'display_add' ); -%] ! [% theme.bullet %] [% MSG( 'admin_tools_box.error_browser', error_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.group', group_list_url, group_new_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.lookup', lookup_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.activity', activity_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.page', page_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.security', security_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.template', tmpl_list_url, tmpl_new_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.doc', docs_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.theme', theme_list_url, theme_new_url ) %]<br> ! [% theme.bullet %] [% MSG( 'admin_tools_box.user', user_search_url, user_new_url ) %] |
From: Chris W. <la...@us...> - 2005-03-25 16:46:46
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802 Modified Files: Package.pm Log Message: add 'year' to parameters for package brick when copying resources (to use in copyright notice) Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Package.pm 24 Mar 2005 05:49:27 -0000 1.57 --- Package.pm 25 Mar 2005 16:46:35 -0000 1.58 *************** *** 923,930 **** --- 923,933 ---- my $brick = OpenInteract2::Brick->new( $brick_name ); my $class_name = $class->name_as_class( $name ); + my @date_info = localtime; + my $year = $date_info[5] + 1900; return $brick->copy_all_resources_to( $dest_dir, { %{ $brick_vars }, package_name => $name, class_name => $class_name, + year => $year, }); } |
From: Chris W. <la...@us...> - 2005-03-25 16:45:30
|
Update of /cvsroot/openinteract/OpenInteract2/sample/package_from_table In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18253/package_from_table Modified Files: App.pm Log Message: fix pod escapes and add generic copyright notice Index: App.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/package_from_table/App.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** App.pm 25 Mar 2005 16:39:19 -0000 1.3 --- App.pm 25 Mar 2005 16:45:22 -0000 1.4 *************** *** 55,59 **** =head1 AUTHORS ! Who AmI <me...@wh...> =cut --- 55,63 ---- =head1 AUTHORS ! Who AmI E<lt>me...@wh...E<gt> ! ! =head1 COPYRIGHT ! ! Copyright (c) [% year %] Who AmI. All rights reserved. =cut |
From: Chris W. <la...@us...> - 2005-03-25 16:45:30
|
Update of /cvsroot/openinteract/OpenInteract2/sample/package In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18253/package Modified Files: App.pm Log Message: fix pod escapes and add generic copyright notice Index: App.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/package/App.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** App.pm 25 Mar 2005 16:39:18 -0000 1.4 --- App.pm 25 Mar 2005 16:45:22 -0000 1.5 *************** *** 54,58 **** =head1 AUTHORS ! Who AmI <me...@wh...> =cut --- 54,62 ---- =head1 AUTHORS ! Who AmI E<lt>me...@wh...E<gt> ! ! =head1 COPYRIGHT ! ! Copyright (c) [% year %] Who AmI. All rights reserved. =cut |
From: Chris W. <la...@us...> - 2005-03-25 16:39:28
|
Update of /cvsroot/openinteract/OpenInteract2/sample/package_from_table In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15337/package_from_table Modified Files: App.pm Log Message: fill in the POD a bit for guidance Index: App.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/package_from_table/App.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** App.pm 9 Mar 2005 20:26:25 -0000 1.2 --- App.pm 25 Mar 2005 16:39:19 -0000 1.3 *************** *** 44,48 **** OpenInteract2::App::[% class_name %] - This application will do everything! ! [% pod %] =cut --- 44,59 ---- OpenInteract2::App::[% class_name %] - This application will do everything! ! ! =head1 SYNOPSIS ! ! =head1 DESCRIPTION ! ! =head1 ACTIONS ! ! =head1 OBJECTS ! ! =head1 AUTHORS ! ! Who AmI <me...@wh...> =cut |
From: Chris W. <la...@us...> - 2005-03-25 16:39:28
|
Update of /cvsroot/openinteract/OpenInteract2/sample/package In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15337/package Modified Files: App.pm Log Message: fill in the POD a bit for guidance Index: App.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/package/App.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** App.pm 9 Mar 2005 20:26:24 -0000 1.3 --- App.pm 25 Mar 2005 16:39:18 -0000 1.4 *************** *** 44,48 **** OpenInteract2::App::[% class_name %] - This application will do everything! ! [% pod %] =cut --- 44,58 ---- OpenInteract2::App::[% class_name %] - This application will do everything! ! =head1 SYNOPSIS ! ! =head1 DESCRIPTION ! ! =head1 ACTIONS ! ! =head1 OBJECTS ! ! =head1 AUTHORS ! ! Who AmI <me...@wh...> =cut |
From: Chris W. <la...@us...> - 2005-03-25 14:50:46
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22837 Modified Files: InstallPackage.pm Log Message: use . instead of , -- thanks to Antti for spot Index: InstallPackage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/InstallPackage.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** InstallPackage.pm 24 Mar 2005 13:30:28 -0000 1.22 --- InstallPackage.pm 25 Mar 2005 14:50:25 -0000 1.23 *************** *** 224,228 **** $status->{is_ok} = 'no'; $status->{message} = ! "Brick class ", ref( $brick ), " should only have one " . "resource -- the Base64 version of the zip file."; return; --- 224,228 ---- $status->{is_ok} = 'no'; $status->{message} = ! "Brick class " . ref( $brick ) . " should only have one " . "resource -- the Base64 version of the zip file."; return; |
From: Chris W. <la...@us...> - 2005-03-25 05:40:13
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Datasource In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29694 Modified Files: DBI.pm Log Message: OIN-157: Class::DBI requires DBIx::ContextualFetch to be set in the RootClass attribute of the connect() call (grr...) Index: DBI.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Datasource/DBI.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** DBI.pm 17 Mar 2005 14:58:01 -0000 1.17 --- DBI.pm 25 Mar 2005 05:40:02 -0000 1.18 *************** *** 17,25 **** use constant DEFAULT_TRUNC_OK => 0; sub connect { my ( $class, $ds_name, $ds_info ) = @_; $log ||= get_logger( LOG_DS ); unless ( ref $ds_info ) { ! $log->error( "No data given to create DBI [$ds_name] handle" ); oi_error "Cannot create connection without datasource info"; } --- 17,27 ---- use constant DEFAULT_TRUNC_OK => 0; + my @CONNECT_ATTRIBUTES = qw( RootClass ); + sub connect { my ( $class, $ds_name, $ds_info ) = @_; $log ||= get_logger( LOG_DS ); unless ( ref $ds_info ) { ! $log->error( "No data given to create DBI '$ds_name' handle" ); oi_error "Cannot create connection without datasource info"; } *************** *** 46,49 **** --- 48,57 ---- my $password = $full->{password}; + my %connect_attr = map { $_ => $full->{ $_ } } + grep { defined $full->{ $_ } } + @CONNECT_ATTRIBUTES; + $connect_attr{RaiseError} = 0; + $connect_attr{PrintError} = 0; + if ( $log->is_debug ) { my %dumpable = %{ $full }; *************** *** 54,59 **** my $db = DBI->connect( $dsn, $username, $password, ! { RaiseError => 0, ! PrintError => 0 } ); unless ( $db ) { oi_datasource_error --- 62,66 ---- my $db = DBI->connect( $dsn, $username, $password, ! \%connect_attr ); unless ( $db ) { oi_datasource_error *************** *** 118,122 **** type dsn username password long_read_len long_trunc_ok trace_level ); ! my %info = map { $_ => $ds_info->{ $_ } } @copy_properties; my $dbi_type = lc $ds_info->{dbi_type}; --- 125,129 ---- type dsn username password long_read_len long_trunc_ok trace_level ); ! my %info = map { $_ => $ds_info->{ $_ } } @copy_properties, @CONNECT_ATTRIBUTES; my $dbi_type = lc $ds_info->{dbi_type}; |
From: Chris W. <la...@us...> - 2005-03-24 13:30:51
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9565 Modified Files: InstallPackage.pm Log Message: fix brick name validation error Index: InstallPackage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/InstallPackage.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** InstallPackage.pm 24 Mar 2005 05:32:35 -0000 1.21 --- InstallPackage.pm 24 Mar 2005 13:30:28 -0000 1.22 *************** *** 83,86 **** --- 83,87 ---- } elsif ( $name eq 'brick_name' ) { + return unless ( $value ); my $brick = eval { OpenInteract2::Brick->new( $value ) }; if ( $@ or ! $brick ) { |
From: Chris W. <la...@us...> - 2005-03-24 13:07:05
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28400 Modified Files: Initializer.pm Log Message: duh! iterating over a hash works better with 'each'... Index: Initializer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N/Initializer.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Initializer.pm 24 Mar 2005 05:00:37 -0000 1.16 --- Initializer.pm 24 Mar 2005 13:06:52 -0000 1.17 *************** *** 300,304 **** sub _assign_messages { my ( $class, $messages ) = @_; ! while ( my ( $key, $value ) = %{ $messages } ) { $Lexicon{ $key } = $value; } --- 300,304 ---- sub _assign_messages { my ( $class, $messages ) = @_; ! while ( my ( $key, $value ) = each %{ $messages } ) { $Lexicon{ $key } = $value; } |
From: Chris W. <la...@us...> - 2005-03-24 05:49:54
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4933 Modified Files: Package.pm Log Message: OIN-158: add functionality for removing all package files Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Package.pm 17 Mar 2005 14:57:58 -0000 1.56 --- Package.pm 24 Mar 2005 05:49:27 -0000 1.57 *************** *** 599,602 **** --- 599,617 ---- } + # removes all package files: + # - $WEBSITE_DIR/conf/package + # - $WEBSITE_DIR/template/package + # - $WEBSITE_DIR/pkg/package-x.yy + + sub remove_files { + my ( $self, $website_dir ) = @_; + my $package_config = catdir( $website_dir, 'conf', $self->name ); + my $package_template = catdir( $website_dir, 'template', $self->name ); + my $package_dir = rel2abs( $self->directory ); + for ( $package_config, $package_template, $package_dir ) { + $self->_remove_directory_tree( $_ ); + } + } + ######################################## *************** *** 1669,1672 **** --- 1684,1707 ---- Returns: array of status hashrefs, with a single member. + B<remove_files( $website_dir )> + + Removes all package files from C<$website_dir>. This includes: + + =over 4 + + =item * + + The package itself + + =item * + + The package's configuration files (C<$WEBSITE_DIR/conf/$PACKAGE>) + + =item * + + The package's template files (C<$WEBSITE_DIR/template/$PACKAGE>) + + =back + B<get_spops_files()> |
From: Chris W. <la...@us...> - 2005-03-24 05:32:44
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28827/Website Modified Files: InstallPackage.pm Log Message: be able to install package given a brick_class or brick_name, assuming it contains a single resource with the base64'd zip file Index: InstallPackage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/InstallPackage.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** InstallPackage.pm 17 Mar 2005 14:58:04 -0000 1.20 --- InstallPackage.pm 24 Mar 2005 05:32:35 -0000 1.21 *************** *** 34,38 **** package_class => { description => ! 'Package distribution application class that can perform installation', is_required => 'no', do_validate => 'yes', --- 34,50 ---- package_class => { description => ! 'OpenInteract2::App:: class that can perform installation', ! is_required => 'no', ! do_validate => 'yes', ! }, ! brick_class => { ! description => ! 'OpenInteract2::Brick:: class that contains package as zip file', ! is_required => 'no', ! do_validate => 'yes', ! }, ! brick_name => { ! description => ! 'Name of OpenInteract2::Brick:: implementation that contains package as zip file', is_required => 'no', do_validate => 'yes', *************** *** 45,50 **** if ( $name eq 'package_class' ) { my $pkg_file = $self->param( 'package_file' ); ! unless ( $value or $pkg_file ) { ! return "Either 'package_class' or 'package_file' must be defined."; } return; --- 57,65 ---- if ( $name eq 'package_class' ) { my $pkg_file = $self->param( 'package_file' ); ! my $brick_class = $self->param( 'brick_class' ); ! my $brick_name = $self->param( 'brick_name' ); ! unless ( $value or $pkg_file or $brick_class or $brick_name ) { ! return "One of 'package_class', 'package_file', " . ! "'brick_class', or 'brick_name' must be defined."; } return; *************** *** 53,56 **** --- 68,92 ---- return unless ( $value ); } + elsif ( $name eq 'brick_class' ) { + return unless ( $value ); + eval "require $value"; + if ( $@ ) { + return "Failed to require '$value': $@"; + } + my $brick_name = $value->get_name(); + unless ( $brick_name ) { + return "Class '$value' is valid but did not return a " . + "name with 'get_name()'"; + } + $self->param( brick_name => $brick_name ); + return; + } + elsif ( $name eq 'brick_name' ) { + my $brick = eval { OpenInteract2::Brick->new( $value ) }; + if ( $@ or ! $brick ) { + my $error = $@ || 'no brick found'; + return "Brick '$name' error: $error"; + } + } return $self->SUPER::validate_param( $name, $value ); } *************** *** 72,75 **** --- 108,114 ---- $self->_install_app( $app_class, \%status ); } + elsif ( my $brick_name = $self->param( 'brick_name' ) ) { + $self->_install_brick( $brick_name, \%status ); + } $self->_add_status( \%status ); } *************** *** 170,174 **** $status->{message} = sprintf( 'Installed package %s-%s to website %s', ! $name, $version, $self->param( 'website_dir' ) ); --- 209,213 ---- $status->{message} = sprintf( 'Installed package %s-%s to website %s', ! $name, $version, $self->param( 'website_dir' ) ); *************** *** 177,180 **** --- 216,237 ---- } + sub _install_brick { + my ( $self, $brick_name, $status ) = @_; + my $brick = OpenInteract2::Brick->new( $brick_name ); + my @resources = $brick->list_resources; + if ( scalar @resources > 1 ) { + $status->{is_ok} = 'no'; + $status->{message} = + "Brick class ", ref( $brick ), " should only have one " . + "resource -- the Base64 version of the zip file."; + return; + } + my $pkg_info = $brick->load_resource( $resources[0] ); + my $pkg_file = OpenInteract2::Util->decode_base64_and_store( + \$pkg_info->{content} + ); + $self->_install_file( $pkg_file, $status ); + } + sub _check_package_exists { my ( $self, $name, $version, $status ) = @_; |
From: Chris W. <la...@us...> - 2005-03-24 05:32:44
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28827 Modified Files: Website.pm Log Message: be able to install package given a brick_class or brick_name, assuming it contains a single resource with the base64'd zip file Index: Website.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Website.pm 17 Mar 2005 14:58:02 -0000 1.25 --- Website.pm 24 Mar 2005 05:32:35 -0000 1.26 *************** *** 93,103 **** my ( $self, $website_dir, $package_names ) = @_; foreach my $pkg_name ( @{ $package_names } ) { ! my $brick = OpenInteract2::Brick->new( $pkg_name ); ! foreach my $resource_name ( $brick->list_resources ) { ! my $pkg_info = $brick->load_resource( $resource_name ); ! my $pkg_file = OpenInteract2::Util->decode_base64_and_store( ! \$pkg_info->{content} ! ); ! $self->_install_package_file( undef, $pkg_file, $website_dir ); } } --- 93,110 ---- my ( $self, $website_dir, $package_names ) = @_; foreach my $pkg_name ( @{ $package_names } ) { ! my $install_task = OpenInteract2::Manage->new( ! 'install_package', { ! brick_name => $pkg_name, ! website_dir => $website_dir, ! }); ! ! $self->copy_observers( $install_task ); ! eval { $install_task->execute }; ! if ( $@ ) { ! $self->_fail( 'install package', ! "Failed to install $pkg_name: $@" ); ! } ! else { ! $self->_add_status( $install_task->get_status ); } } |
From: Chris W. <la...@us...> - 2005-03-24 05:32:07
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28515/Website Modified Files: Upgrade.pm Log Message: just fix description so the 'list_tasks' listing isn't askew Index: Upgrade.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/Upgrade.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Upgrade.pm 18 Mar 2005 04:09:50 -0000 1.19 --- Upgrade.pm 24 Mar 2005 05:31:55 -0000 1.20 *************** *** 15,24 **** sub get_brief_description { ! return <<'DESC'; ! Upgrade your website to a new version of OpenInteract2 -- ! remember to read 'perldoc OpenInteract2::Manual::Changes' ! to see what has been updated and find any configuration changes ! you may need to make. ! DESC } --- 15,24 ---- sub get_brief_description { ! return join( "\n", ! q{Upgrade your website to a new version of OpenInteract2 -- }, ! q{remember to read 'perldoc OpenInteract2::Manual::Changes' }, ! q{to see what has been updated and find any configuration changes }, ! q{you may need to make.} ! ); } |
From: Chris W. <la...@us...> - 2005-03-24 05:31:10
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28092 Modified Files: RemovePackage.pm Log Message: OIN-158: add option for removing all package directories Index: RemovePackage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/RemovePackage.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RemovePackage.pm 17 Mar 2005 14:58:04 -0000 1.7 --- RemovePackage.pm 24 Mar 2005 05:31:01 -0000 1.8 *************** *** 22,28 **** --- 22,40 ---- website_dir => $self->_get_website_dir_param, package => $self->_get_package_param, + full_remove => { + description => + 'Flag to indicate whether we should also remove package files', + is_required => 'no', + do_validate => 'no', + is_boolean => 'yes', + }, }; } + sub setup_task { + my ( $self ) = @_; + $self->_setup_context({ skip => 'read packages' }); + } + sub run_task { my ( $self ) = @_; *************** *** 34,38 **** next unless ( $name ); my $package = $repository->fetch_package( $name ); ! eval { $repository->remove_package( $package ) }; my $action = "remove package $name"; if ( $@ ) { --- 46,53 ---- next unless ( $name ); my $package = $repository->fetch_package( $name ); ! eval { ! $repository->remove_package( $package ); ! $package->remove_files( $self->param( 'website_dir' ) ); ! }; my $action = "remove package $name"; if ( $@ ) { |
From: Chris W. <la...@us...> - 2005-03-24 05:14:29
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18375 Modified Files: Request.pm Log Message: fix some minor doc issues Index: Request.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request.pm,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Request.pm 23 Mar 2005 19:17:55 -0000 1.56 --- Request.pm 24 Mar 2005 05:14:21 -0000 1.57 *************** *** 499,511 **** When you create a new request object you need to specify what type of ! request it is. (Your OpenInteract server configuration should have ! this specified in the 'context_info' section.) The process of ! initializing the object during the C<new()> call fills the Request ! object with any parameters, uploaded files and important headers from ! the client. ! ! The L<OpenInteract2::Context|OpenInteract2::Context> object is ! responsible for associating cookies and the session with this request ! object. =head1 METHODS --- 499,506 ---- When you create a new request object you need to specify what type of ! request it is -- this is done in your adapter (CGI script, Apache ! handler, etc.) The process of initializing the object during the ! C<new()> call fills the Request object with any parameters, uploaded ! files and important headers from the client. =head1 METHODS *************** *** 863,868 **** If your architecture is deployed under a particular URL you should set this as soon as possible. Do so using the C<assign_deploy_url()> ! method of the context. See ! L<OpenInteract2::Request::CGI|OpenInteract2::Request::CGI> for an example. --- 858,862 ---- If your architecture is deployed under a particular URL you should set this as soon as possible. Do so using the C<assign_deploy_url()> ! method of the context. See L<OpenInteract2::Request::CGI> for an example. *************** *** 870,876 **** Other than that take a look at ! L<OpenInteract::Request::Standalone|OpenInteract::Request::Standalone>. It ! forces you to deal with parameters and file uploads yourself, but it ! may be the path of least resistance. =head2 Methods --- 864,870 ---- Other than that take a look at ! L<OpenInteract::Request::Standalone>. It forces you to deal with ! parameters and file uploads yourself, but it may be the path of least ! resistance. =head2 Methods |
From: Chris W. <la...@us...> - 2005-03-24 05:13:56
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17863 Modified Files: Brick.pm Log Message: move docs so CPAN sees them ok Index: Brick.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Brick.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Brick.pm 17 Feb 2005 04:59:43 -0000 1.4 --- Brick.pm 24 Mar 2005 05:13:47 -0000 1.5 *************** *** 17,20 **** --- 17,221 ---- $OpenInteract2::Brick::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); + # Docs are up here because parsers get confused by the included class + # below... + + =pod + + =head1 NAME + + OpenInteract2::Brick - Base class for inlined data packages + + =head1 SYNOPSIS + + use OpenInteract2::Brick; + + my $loader = OpenInteract2::Brick->new( 'apache' ); + my @resources = $loader->list_resources; + print "Resources available in 'Apache': ", + join( ', ', @resources ), "\n"; + + my $httpd_static_info = $loader->load_resource( 'httpd_static.conf' ); + print "File should be stored in: $httpd_static_info->{destination}\n"; + print "File contents:\n$httpd_static_info->{content}\n"; + + =head1 DESCRIPTION + + Rather than including lots of sample files used to create packages and + websites, OI2 has a set of 'bricks'. Each one of these classes has one + or more inlined files you can ask for by file name. Each of these + files also has associated with it some metadata to determine where it + should go and whether it should be evaluated as a template before + being stored. (Of course, you're free to ignore these data and do + whatever you want with the contents, but other parts of the OI2 + framework need them.) + + =head1 CLASS METHODS + + B<new( $type )> + + Returns an instance of the bricks associated with C<$type>, which + should always be a lowercased value. + + B<list_bricks()> + + Returns a sorted list of all available brick names. With the name you + can instantiate a new brick: + + my @brick_names = OpenInteract2::Brick->list_bricks; + foreach my $name ( @brick_names ) { + my $brick = OpenInteract2::Brick->new( $name ); + print "Resources in brick '$name': ", + join( ", ", $brick->list_resources ), "\n"; + } + + =head1 OBJECT METHODS + + B<list_resources()> + + Returns an array of all resources defined. These are always simple + filenames with no paths, so with the 'apache2' type you would do + something like: + + my $loader = OpenInteract2::Brick->new( 'apache2' ); + print "Apache2 resources:\n ", + join( "\n ", $loader->list_resources ), "\n"; + + And get: + + Apache2 resources: + httpd_mp2_solo.conf + startup_mp2.pl + + These resource names are what you use in C<load_resource()>: + + my $startup_info = $loader->load_resource( 'startup_mp2.pl' ); + print "Startup script is:\n", $startup_info->{contents}; + + B<load_resource( $resource_name > + + Loads the resource and metdata associated with C<$resource_name>. If + C<$resource_name> is empty or no resource is actually associated with + it we throw an exception. + + If the resource is found we return a hashref with the following keys: + + =over 4 + + =item * + + B<content>: Contents of the resource. + + =item * + + B<destination>: Space-delimited string of directories where this + resource should be copied. Note that the string may have template + directives in it. + + =item * + + B<evaluate>: Whether you should evaluate the data in 'content' before + storing it. + + =back + + Regarding template directives. A number of resources have template + directives in them so they can be properly named -- for instance, the + perl 'package' declaration in the generated action whene you create a + new package looks like this: + + package OpenInteract2::Action::[% class_name %]; + + When we use this resource we first run it through a template processor + (Template Toolkit) so that when we create a package called + 'baseball_stats' the above will get translated to: + + package OpenInteract2::Action::BaseballStats; + + B<copy_all_resources_to( $destination_dir, [ \%token_replacements ] )> + + Copies all resources from this brick to C<$destination_dir>. See + L<copy_resources_to()> for more. + + Returns: hashref with keys 'copied', 'skipped', 'same' each of which + has as its value an arrayref of the relevant files. + + B<copy_resources_to( $destination_dir, \%token_replacements, @resource_names )> + + Copies the resources with C<@resource_names> to the given + C<$destination_dir>. For those resources that are evaluatable use the + C<\%token_replacements> when evaluating as Template Toolkit templates. + + If the source and destination are the same -- checked by the content + size and MD5 digest -- we don't do a copy. + + We also don't do a copy if the resource is specified in the + directory's has a '.no_overwrite' file. (See + L<OpenInteract2::Config::Readonly> for this file's format and how we + use it.) + + Returns: hashref with keys 'copied', 'skipped', 'same' each of which + has as its value an arrayref of the relevant files. + + =head1 SUBCLASSING + + Since you typically don't create subclasses by hand this is mostly + unnecessary. If you're interested in creating a C<::Brick> subclass by + hand first look in the C<build_bricks> script found at the root of the + OI2 source tree -- it builds the class dynamically based on + specifications and files found in the filesystem. + + That said, subclasses must implement the following methods: + + B<get_name()> + + Return the name by which people instantiate this loader. Should be + lower-cased. + + B<get_resources()> + + Return a hash of data regarding the resources specified by this + class. Keys are resource names (generally filenames) and values are + arrayrefs with two elements: + + =over 4 + + =item 0. + + String with destination information. This tells the caller where the + contents should be stored. Should be space-delimited and may have + template directives in it. + + =item 1. + + Whether the content can be evaluated by a template processor as 'yes' + or 'no'. Generally you should leave this as 'yes' unless the specified + resource is actually a TT2 template. + + =back + + B<load( $resource_name )> + + Return the content associated with C<$resource_name>. The caller + (L<OpenInteract2::Brick> checks that C<$resource_name> is valid before + invoking this method. + + =head1 SEE ALSO + + L<Class::Factory> + + =head1 COPYRIGHT + + Copyright (c) 2005 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> + + =cut + + my $TEMPLATE = Template->new(); *************** *** 265,461 **** 1; - - __END__ - - =head1 NAME - - OpenInteract2::Brick - Base class for inlined data packages - - =head1 SYNOPSIS - - use OpenInteract2::Brick; - - my $loader = OpenInteract2::Brick->new( 'apache' ); - my @resources = $loader->list_resources; - print "Resources available in 'Apache': ", - join( ', ', @resources ), "\n"; - - my $httpd_static_info = $loader->load_resource( 'httpd_static.conf' ); - print "File should be stored in: $httpd_static_info->{destination}\n"; - print "File contents:\n$httpd_static_info->{content}\n"; - - =head1 DESCRIPTION - - Rather than including lots of sample files used to create packages and - websites, OI2 has a set of 'bricks'. Each one of these classes has one - or more inlined files you can ask for by file name. Each of these - files also has associated with it some metadata to determine where it - should go and whether it should be evaluated as a template before - being stored. (Of course, you're free to ignore these data and do - whatever you want with the contents, but other parts of the OI2 - framework need them.) - - =head1 CLASS METHODS - - B<new( $type )> - - Returns an instance of the bricks associated with C<$type>, which - should always be a lowercased value. - - B<list_bricks()> - - Returns a sorted list of all available brick names. With the name you - can instantiate a new brick: - - my @brick_names = OpenInteract2::Brick->list_bricks; - foreach my $name ( @brick_names ) { - my $brick = OpenInteract2::Brick->new( $name ); - print "Resources in brick '$name': ", - join( ", ", $brick->list_resources ), "\n"; - } - - =head1 OBJECT METHODS - - B<list_resources()> - - Returns an array of all resources defined. These are always simple - filenames with no paths, so with the 'apache2' type you would do - something like: - - my $loader = OpenInteract2::Brick->new( 'apache2' ); - print "Apache2 resources:\n ", - join( "\n ", $loader->list_resources ), "\n"; - - And get: - - Apache2 resources: - httpd_mp2_solo.conf - startup_mp2.pl - - These resource names are what you use in C<load_resource()>: - - my $startup_info = $loader->load_resource( 'startup_mp2.pl' ); - print "Startup script is:\n", $startup_info->{contents}; - - B<load_resource( $resource_name > - - Loads the resource and metdata associated with C<$resource_name>. If - C<$resource_name> is empty or no resource is actually associated with - it we throw an exception. - - If the resource is found we return a hashref with the following keys: - - =over 4 - - =item * - - B<content>: Contents of the resource. - - =item * - - B<destination>: Space-delimited string of directories where this - resource should be copied. Note that the string may have template - directives in it. - - =item * - - B<evaluate>: Whether you should evaluate the data in 'content' before - storing it. - - =back - - Regarding template directives. A number of resources have template - directives in them so they can be properly named -- for instance, the - perl 'package' declaration in the generated action whene you create a - new package looks like this: - - package OpenInteract2::Action::[% class_name %]; - - When we use this resource we first run it through a template processor - (Template Toolkit) so that when we create a package called - 'baseball_stats' the above will get translated to: - - package OpenInteract2::Action::BaseballStats; - - B<copy_all_resources_to( $destination_dir, [ \%token_replacements ] )> - - Copies all resources from this brick to C<$destination_dir>. See - L<copy_resources_to()> for more. - - Returns: hashref with keys 'copied', 'skipped', 'same' each of which - has as its value an arrayref of the relevant files. - - B<copy_resources_to( $destination_dir, \%token_replacements, @resource_names )> - - Copies the resources with C<@resource_names> to the given - C<$destination_dir>. For those resources that are evaluatable use the - C<\%token_replacements> when evaluating as Template Toolkit templates. - - If the source and destination are the same -- checked by the content - size and MD5 digest -- we don't do a copy. - - We also don't do a copy if the resource is specified in the - directory's has a '.no_overwrite' file. (See - L<OpenInteract2::Config::Readonly> for this file's format and how we - use it.) - - Returns: hashref with keys 'copied', 'skipped', 'same' each of which - has as its value an arrayref of the relevant files. - - =head1 SUBCLASSING - - Since you typically don't create subclasses by hand this is mostly - unnecessary. If you're interested in creating a C<::Brick> subclass by - hand first look in the C<build_bricks> script found at the root of the - OI2 source tree -- it builds the class dynamically based on - specifications and files found in the filesystem. - - That said, subclasses must implement the following methods: - - B<get_name()> - - Return the name by which people instantiate this loader. Should be - lower-cased. - - B<get_resources()> - - Return a hash of data regarding the resources specified by this - class. Keys are resource names (generally filenames) and values are - arrayrefs with two elements: - - =over 4 - - =item 0. - - String with destination information. This tells the caller where the - contents should be stored. Should be space-delimited and may have - template directives in it. - - =item 1. - - Whether the content can be evaluated by a template processor as 'yes' - or 'no'. Generally you should leave this as 'yes' unless the specified - resource is actually a TT2 template. - - =back - - B<load( $resource_name )> - - Return the content associated with C<$resource_name>. The caller - (L<OpenInteract2::Brick> checks that C<$resource_name> is valid before - invoking this method. - - =head1 SEE ALSO - - L<Class::Factory> - - =head1 COPYRIGHT - - Copyright (c) 2005 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> --- 466,467 ---- |
From: Chris W. <la...@us...> - 2005-03-24 05:11:47
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16800 Modified Files: Error.pm Log Message: OIN-159: if the error filename already exists, keep incrementing the ms until it doesn't Index: Error.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Error.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Error.pm 25 Feb 2005 00:07:19 -0000 1.1 --- Error.pm 24 Mar 2005 05:11:22 -0000 1.2 *************** *** 23,26 **** --- 23,29 ---- __PACKAGE__->mk_accessors( keys %FIELDS ); + my $TEMPLATE = Template->new(); + my $ERROR_TEMPLATE = _error_template(); + sub new { my ( $class, %params ) = @_; *************** *** 83,89 **** oi_error "Parameter 'file' must be defined to store an error."; } - if ( -f $file ) { - oi_error "Cannot overwrite existing file '$file' with error contents"; - } eval { mkpath( dirname( $file ) ) --- 86,89 ---- *************** *** 92,99 **** oi_error "Cannot create directories for '$file': $@"; } ! my $error_template = $self->_error_template(); ! my $template = Template->new(); ! $template->process( \$error_template, { e => $self }, $file ) ! || oi_error "Cannot process error template to '$file': ", $template->error(); $self->file_storage( $file ); return $file; --- 92,102 ---- oi_error "Cannot create directories for '$file': $@"; } ! ! # if the file already exists, find another... (race condition) ! while ( -f $file ) { ! $file =~ s/(\d\d\d)\.txt$/sprintf( '%003d', $1 + 1 ) . '.txt'/e; ! } ! $TEMPLATE->process( \$ERROR_TEMPLATE, { e => $self }, $file ) ! || oi_error "Cannot process error template to '$file': ", $TEMPLATE->error(); $self->file_storage( $file ); return $file; |
From: Chris W. <la...@us...> - 2005-03-24 05:00:47
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11828 Modified Files: Initializer.pm Log Message: no black voodoo magic for Teemu :-) instead of generating all the keys/values in the class assign them after the class is generated Index: Initializer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N/Initializer.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Initializer.pm 23 Mar 2005 19:17:57 -0000 1.15 --- Initializer.pm 24 Mar 2005 05:00:37 -0000 1.16 *************** *** 147,155 **** my $source = $all_messages->{ $lang }{SOURCE}{ $key }; $log->is_debug && ! $log->debug( ! "DUPLICATE MESSAGE KEY FOUND. Key '$key' from ", ! "'$file' was already found in message file ", ! "'$source' read in earlier. Existing key WILL NOT BE ", ! "OVERWRITTEN, which may cause odd application behavior." ); } else { --- 147,155 ---- my $source = $all_messages->{ $lang }{SOURCE}{ $key }; $log->is_debug && ! $log->debug( ! "DUPLICATE MESSAGE KEY FOUND. Key '$key' from ", ! "'$file' was already found in message file ", ! "'$source' read in earlier. Existing key WILL NOT BE ", ! "OVERWRITTEN, which may cause odd behavior." ); } else { *************** *** 183,187 **** } else { ! my ( $key, $msg ) = $line =~ /^\s*([\w\.]+)\s*=\s*(.*)$/; if ( $key ) { if ( $current_key ) { --- 183,188 ---- } else { ! # since we split on a '=' the key can have any character EXCEPT a '=' ! my ( $key, $msg ) = split( /\s*=\s*/, $line, 2 ); if ( $key ) { if ( $current_key ) { *************** *** 252,256 **** lang_class => $lang_class, base_class => $base_class, - messages => $messages, ); --- 253,256 ---- *************** *** 276,279 **** --- 276,284 ---- $log->is_debug && $log->debug( "Evaluated class $lang_class ok" ); + + $lang_class->_assign_messages( $messages ); + $log->is_debug && + $log->debug( "Assigned mesages to $lang_class ok" ); + return $lang_class; } *************** *** 289,299 **** @[% lang_class %]::ISA = qw( [% base_class %] ); sub get_oi2_lang { return '[% lang %]' } ! %Lexicon = ( ! [% FOREACH msg_key = messages.keys -%] ! '[% msg_key %]' => qq{[% messages.$msg_key %]}, ! [% END -%] ! ); 1; --- 294,307 ---- @[% lang_class %]::ISA = qw( [% base_class %] ); + %Lexicon = (); + sub get_oi2_lang { return '[% lang %]' } ! sub _assign_messages { ! my ( $class, $messages ) = @_; ! while ( my ( $key, $value ) = %{ $messages } ) { ! $Lexicon{ $key } = $value; ! } ! } 1; |
From: Teemu A. <in...@us...> - 2005-03-23 19:18:37
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22537/I18N Modified Files: Initializer.pm Log Message: 1) Changed logging in I18N to be less intrusive 2) I18N returns requested key itself with [_\d+] replaced if no translation is found and debugging is off 3) Improved logic in deciding the user language Index: Initializer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N/Initializer.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Initializer.pm 18 Mar 2005 04:09:50 -0000 1.14 --- Initializer.pm 23 Mar 2005 19:17:57 -0000 1.15 *************** *** 146,150 **** if ( $all_messages->{ $lang }{ $key } ) { my $source = $all_messages->{ $lang }{SOURCE}{ $key }; ! $log->warn( "DUPLICATE MESSAGE KEY FOUND. Key '$key' from ", "'$file' was already found in message file ", --- 146,151 ---- if ( $all_messages->{ $lang }{ $key } ) { my $source = $all_messages->{ $lang }{SOURCE}{ $key }; ! $log->is_debug && ! $log->debug( "DUPLICATE MESSAGE KEY FOUND. Key '$key' from ", "'$file' was already found in message file ", |
From: Teemu A. <in...@us...> - 2005-03-23 19:18:13
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22537 Modified Files: I18N.pm Request.pm Log Message: 1) Changed logging in I18N to be less intrusive 2) I18N returns requested key itself with [_\d+] replaced if no translation is found and debugging is off 3) Improved logic in deciding the user language Index: I18N.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/I18N.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** I18N.pm 18 Mar 2005 04:09:48 -0000 1.9 --- I18N.pm 23 Mar 2005 19:17:54 -0000 1.10 *************** *** 32,37 **** }; if ( $@ ) { ! $log->error( "Failed to translate '$key': $@" );; ! return "Message error for '$key'"; } $log->is_debug && --- 32,48 ---- }; if ( $@ ) { ! if ( $log->is_debug ) { ! $log->debug( "Failed to translate '$key': $@" );; ! return "Message error for '$key'"; ! } ! else { ! my $iteration = 1; ! while ( 1 ) { ! last unless $key =~ /\[_$iteration\]/; ! $key =~ s/\[_$iteration\]/$args[$iteration]/g; ! $iteration++; ! } ! return $key; ! } } $log->is_debug && Index: Request.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request.pm,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Request.pm 23 Mar 2005 16:32:32 -0000 1.55 --- Request.pm 23 Mar 2005 19:17:55 -0000 1.56 *************** *** 383,406 **** ? @{ $session_lang } : $session_lang; } ! elsif ( my @param_lang = $self->param( $lang_config->{choice_param_name} ) ) { $log->is_debug && $log->debug( "Added language from request parameter ", "'$lang_config->{choice_param_name}'" ); ! push @lang, @param_lang; ! } ! else { ! $log->is_debug && ! $log->debug( "Added default language: $lang_config->{default_language}" ); ! push @lang, $lang_config->{default_language}; } - if ( my @browser_lang = $self->_find_browser_languages ) { $log->is_debug && $log->debug( "Added language to head from browser: ", join( ', ', @browser_lang ) ); ! unshift @lang, @browser_lang; } $self->{_user_language} = \@lang; $log->is_debug && --- 383,405 ---- ? @{ $session_lang } : $session_lang; } ! ! if ( my @param_lang = $self->param( $lang_config->{choice_param_name} ) ) { $log->is_debug && $log->debug( "Added language from request parameter ", "'$lang_config->{choice_param_name}'" ); ! unshift @lang, @param_lang; } if ( my @browser_lang = $self->_find_browser_languages ) { $log->is_debug && $log->debug( "Added language to head from browser: ", join( ', ', @browser_lang ) ); ! push @lang, @browser_lang; } + $log->is_debug && + $log->debug( "Added default language: $lang_config->{default_language}" ); + push @lang, $lang_config->{default_language}; + $self->{_user_language} = \@lang; $log->is_debug && |
From: Chris W. <la...@us...> - 2005-03-23 16:32:59
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8913 Modified Files: Request.pm Log Message: remove 'action_name' and 'task_name' references from docs Index: Request.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request.pm,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Request.pm 17 Mar 2005 14:57:58 -0000 1.54 --- Request.pm 23 Mar 2005 16:32:32 -0000 1.55 *************** *** 643,649 **** subclass should pass the full, absolute URL path -- no protocol, host or port, but query arguments should be included. With this the ! C<url_absolute> and C<url_relative> properties are properly set. The ! method also sets the action name and task for use by the controller, ! delegating the actual work to L<OpenInteract2::URL>. If you want to do any behind-the-scenes redirection before the --- 643,647 ---- subclass should pass the full, absolute URL path -- no protocol, host or port, but query arguments should be included. With this the ! C<url_absolute> and C<url_relative> properties are properly set. If you want to do any behind-the-scenes redirection before the *************** *** 778,791 **** The stateful session for the current user. - B<action_name> - - Name of the action as gleaned from the URL. (May be empty, may change - as a result of lookups.) - - B<task_name> - - Task of the action as gleaned from the URL. (May be empty, may change - as a result of lookups.) - B<auth_user> --- 776,779 ---- |
From: Chris W. <la...@us...> - 2005-03-21 03:53:09
|
Update of /cvsroot/openinteract/OpenInteract2/sample/apache2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23874 Modified Files: startup_mp2.pl Log Message: updated startup to include APR::Table, thanks to Andreas and Teemu Index: startup_mp2.pl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/apache2/startup_mp2.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** startup_mp2.pl 26 Feb 2005 23:31:25 -0000 1.2 --- startup_mp2.pl 21 Mar 2005 03:53:01 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- use Apache2 (); use Apache2::OpenInteract2; + use APR::Table (); use CGI; use Log::Log4perl; |