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...> - 2004-10-02 22:15:09
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6846 Modified Files: Apache.pm Apache2.pm CGI.pm LWP.pm Standalone.pm Log Message: OIN-48: always save the session when doing a redirect Index: Apache.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/Apache.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Apache.pm 22 Sep 2004 03:09:34 -0000 1.18 --- Apache.pm 2 Oct 2004 22:13:19 -0000 1.19 *************** *** 95,98 **** --- 95,101 ---- my ( $self, $url ) = @_; $log ||= get_logger( LOG_RESPONSE ); + + $self->save_session; + $url ||= $self->return_url; $log->is_info && Index: Apache2.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/Apache2.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Apache2.pm 22 Sep 2004 03:09:34 -0000 1.4 --- Apache2.pm 2 Oct 2004 22:13:19 -0000 1.5 *************** *** 90,93 **** --- 90,97 ---- sub redirect { my ( $self, $url ) = @_; + $log ||= get_logger( LOG_RESPONSE ); + + $self->save_session; + $url ||= $self->return_url; $log->is_info && Index: CGI.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/CGI.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** CGI.pm 22 Sep 2004 03:09:34 -0000 1.17 --- CGI.pm 2 Oct 2004 22:13:19 -0000 1.18 *************** *** 94,97 **** --- 94,100 ---- my ( $self, $url ) = @_; $log ||= get_logger( LOG_RESPONSE ); + + $self->save_session; + $url ||= $self->return_url; $log->is_info && Index: LWP.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/LWP.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** LWP.pm 22 Sep 2004 03:09:34 -0000 1.19 --- LWP.pm 2 Oct 2004 22:13:19 -0000 1.20 *************** *** 78,81 **** --- 78,84 ---- my ( $self, $url ) = @_; $log ||= get_logger( LOG_RESPONSE ); + + $self->save_session; + $url ||= $self->return_url; $log->is_info && Index: Standalone.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/Standalone.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Standalone.pm 22 Sep 2004 03:09:34 -0000 1.12 --- Standalone.pm 2 Oct 2004 22:13:19 -0000 1.13 *************** *** 91,94 **** --- 91,95 ---- sub redirect { my ( $self, $url ) = @_; + $self->save_session; my @header = (); push @header, "Status: 302 Moved"; |
From: Chris W. <la...@us...> - 2004-10-02 22:07:00
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4741 Modified Files: Common.pm Log Message: OIN-43: apply slightly modified version of Salve's patch -- I had the field/alias order reversed...; also add docs Index: Common.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action/Common.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Common.pm 27 Sep 2004 04:48:44 -0000 1.17 --- Common.pm 2 Oct 2004 22:05:05 -0000 1.18 *************** *** 170,177 **** my $object_class = $self->param( 'c_object_class' ); my $field_map = eval { $object_class->CONFIG->{field_map} } || {}; ! $alt_id_field = $field_map->{ $id_field }; if ( $alt_id_field ) { $id = $self->param( $alt_id_field ) || $request->param( $alt_id_field ); } } --- 170,181 ---- my $object_class = $self->param( 'c_object_class' ); my $field_map = eval { $object_class->CONFIG->{field_map} } || {}; ! my %reverse_map = map { $field_map->{ $_ } => $_ } keys %{ $field_map }; ! $alt_id_field = $reverse_map{ $id_field } || $field_map->{ $id_field }; if ( $alt_id_field ) { + $log->is_debug && + $log->debug( "Using mapped ID field '$alt_id_field'" ); $id = $self->param( $alt_id_field ) || $request->param( $alt_id_field ); + $self->param( c_id_field => $alt_id_field ); } } *************** *** 520,536 **** =over 4 ! =item * Is there an action parameter with the name C<c_id>? ! =item * Is there an action parameter with the same name as the ID field? ! =item * Is there a request parameter with the same name as the ID field? ! =item * Is there a request parameter with the name 'id'? --- 524,540 ---- =over 4 ! =item 1. Is there an action parameter with the name C<c_id>? ! =item 1. Is there an action parameter with the same name as the ID field? ! =item 1. Is there a request parameter with the same name as the ID field? ! =item 1. Is there a request parameter with the name 'id'? *************** *** 538,544 **** =back ! The first check that finds an ID is used. If no ID is found the check ! fails. If an ID is found it is set in the action parameter C<c_id> so ! you do not need to do the lookup. B<_common_check_template_specified( @template_parameters )> --- 542,550 ---- =back ! The first check that finds an ID is used. If no ID is found and there ! is a corresponding entry in an SPOPS object 'field_map' configuration ! we rerun checks 2 and 3 above with the new ID field. If no ID value is ! still found the check fails. If an ID is found its value is set in the ! action parameter C<c_id> so you do not need to do the lookup. B<_common_check_template_specified( @template_parameters )> |
From: Chris W. <la...@us...> - 2004-10-01 02:44:14
|
Update of /cvsroot/openinteract/OpenInteract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26652 Modified Files: Changes Log Message: latest changes Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/Changes,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** Changes 30 May 2004 15:13:49 -0000 1.171 --- Changes 1 Oct 2004 02:44:04 -0000 1.172 *************** *** 1,4 **** --- 1,16 ---- Revision history for Perl extension OpenInteract. + 1.62 Thu Sep 30 22:43:23 EDT 2004 + + Individual: + + * OpenInteract.pm: + + - OI-6: Fix bug when specifying static files to send my filename + (vs filehandle). Thanks to Andreas Nolte for reporting. + + No packages changed. + + 1.61 Sun May 30 11:05:27 EDT 2004 |
From: Chris W. <la...@us...> - 2004-09-28 16:10:46
|
Update of /cvsroot/openinteract/OpenInteract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9922 Modified Files: MANIFEST OpenInteract.pm Log Message: update changelog and version Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/MANIFEST,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** MANIFEST 30 May 2004 15:13:49 -0000 1.116 --- MANIFEST 28 Sep 2004 16:10:37 -0000 1.117 *************** *** 167,169 **** template/table_bordered_begin template/table_bordered_end ! template/to_group \ No newline at end of file --- 167,170 ---- template/table_bordered_begin template/table_bordered_end ! template/to_group ! META.yml Module meta-data (added by MakeMaker) Index: OpenInteract.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract.pm,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** OpenInteract.pm 28 Sep 2004 16:08:14 -0000 1.54 --- OpenInteract.pm 28 Sep 2004 16:10:37 -0000 1.55 *************** *** 8,12 **** use Data::Dumper qw( Dumper ); ! $OpenInteract::VERSION = '1.61'; # Generic separator used in display --- 8,12 ---- use Data::Dumper qw( Dumper ); ! $OpenInteract::VERSION = '1.62'; # Generic separator used in display |
From: Chris W. <la...@us...> - 2004-09-28 16:08:26
|
Update of /cvsroot/openinteract/OpenInteract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9101 Modified Files: OpenInteract.pm Log Message: OI-6: fix bad variable declaration and make the code a little clearer Index: OpenInteract.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract.pm,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** OpenInteract.pm 30 May 2004 15:13:49 -0000 1.53 --- OpenInteract.pm 28 Sep 2004 16:08:14 -0000 1.54 *************** *** 465,473 **** sub send_static_file { my ( $class, $R ) = @_; ! my $fh = $R->{page}{send_file}; my ( $file_size ); # File is a handle... ! if ( ref $fh ) { my $default_type = 'application/octet-stream'; unless ( $R->{page}{content_type} ) { --- 465,476 ---- sub send_static_file { my ( $class, $R ) = @_; ! my $file_spec = $R->{page}{send_file}; my ( $file_size ); + my ( $fh ); # File is a handle... ! ! if ( ref $file_spec ) { ! $fh = $file_spec; my $default_type = 'application/octet-stream'; unless ( $R->{page}{content_type} ) { *************** *** 484,496 **** # File is a filename... else { ! my $fh = Apache->gensym; ! eval { open( $fh, $R->{page}{send_file} ) || die $!; }; if ( $@ ) { ! $R->scrib( 0, "Cannot open static file from filesystem ($R->{page}{send_file}): $@" ); return NOT_FOUND; } $file_size = $R->{page}{send_file_size} ! || (stat $R->{page}{send_file})[7]; ! $R->DEBUG && $R->scrib( 1, "Sending file ($R->{page}{send_file}) of size", "($file_size) and type", "($R->{page}{content_type})" ); --- 487,499 ---- # File is a filename... else { ! $fh = Apache->gensym; ! eval { open( $fh, $file_spec ) || die $! }; if ( $@ ) { ! $R->scrib( 0, "Cannot open static file from filesystem ($file_spec): $@" ); return NOT_FOUND; } $file_size = $R->{page}{send_file_size} ! || (stat $file_spec)[7]; ! $R->DEBUG && $R->scrib( 1, "Sending file ($file_spec) of size", "($file_size) and type", "($R->{page}{content_type})" ); |
From: Chris W. <la...@us...> - 2004-09-27 20:12:12
|
Update of /cvsroot/openinteract/OpenInteract2/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31411/t Modified Files: package.t Log Message: modify regex to work under win32 Index: package.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/package.t,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** package.t 9 Jun 2004 01:10:52 -0000 1.15 --- package.t 27 Sep 2004 20:12:02 -0000 1.16 *************** *** 115,118 **** --- 115,119 ---- my $expand_dir = catdir( get_current_dir(), 'fruit-1.00' ); mkdir( $expand_dir, 0777 ); + $expand_dir =~ s|\\|\\\\|g; eval { $d_package->export }; like( "$@", qr/^Directory '$expand_dir' already exists/, |
From: Chris W. <la...@us...> - 2004-09-27 20:04:16
|
Update of /cvsroot/openinteract/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29735 Modified Files: build_docs Log Message: OIN-84: fix issues on Win32 for building documentation Index: build_docs =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/build_docs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** build_docs 21 Mar 2004 23:08:05 -0000 1.11 --- build_docs 27 Sep 2004 20:04:05 -0000 1.12 *************** *** 18,22 **** use File::Find; use File::Path; ! use File::Spec; use Getopt::Std; use PodView; --- 18,22 ---- use File::Find; use File::Path; ! use File::Spec::Functions qw( catdir catfile ); use Getopt::Std; use PodView; *************** *** 27,37 **** my $CWD = cwd; - my $BASE_DIR = '.'; my $MANUAL_DIR = 'doc'; my ( $HTML_DIR ); ! my $DEST_DIR = File::Spec->catdir( $CWD, 'site', 'working' ); my $DOC_EXT = $PodView::INTERNAL_DOC_EXT; ! my $LIB_DIR = File::Spec->catdir( $CWD, 'lib' ); my @LIB_FILES = (); --- 27,36 ---- my $CWD = cwd; my $BASE_DIR = '.'; my $MANUAL_DIR = 'doc'; my ( $HTML_DIR ); ! my $DEST_DIR = catdir( $CWD, 'site', 'working' ); my $DOC_EXT = $PodView::INTERNAL_DOC_EXT; ! my $LIB_DIR = catdir( $CWD, 'lib' ); my @LIB_FILES = (); *************** *** 49,54 **** $PodView::INTERNAL_DOC_PATH = $opts{p}; } ! $HTML_DIR = File::Spec->catdir( $CWD, 'site', ! $PodView::INTERNAL_DOC_PATH ); # Grab the relevant .pm files from the manifest and extract the --- 48,55 ---- $PodView::INTERNAL_DOC_PATH = $opts{p}; } ! $HTML_DIR = catdir( $CWD, 'site', $PodView::INTERNAL_DOC_PATH ); ! ! $DEBUG && warn "Using directories [CWD: $CWD] [DEST: $DEST_DIR] ", ! "[LIB: $LIB_DIR] [HTML: $HTML_DIR]\n"; # Grab the relevant .pm files from the manifest and extract the *************** *** 67,80 **** PMFILE: foreach my $pm_file ( @LIB_FILES ) { ! ( $DEBUG > 1 ) && warn "Trying PM [$pm_file]\n"; my $name = $pm_file; $name =~ s|^lib/||; $name =~ s/\.pm$//; ! $name =~ s|/|::|g; my $pom = eval { $pm_parser->parse_file( $pm_file ) ! || die "Cannot parse [$pm_file]: ", $pm_parser->error(), "\n"; }; if ( $@ ) { --- 68,81 ---- PMFILE: foreach my $pm_file ( @LIB_FILES ) { ! ( $DEBUG > 1 ) && warn "Trying PM '$pm_file'\n"; my $name = $pm_file; $name =~ s|^lib/||; $name =~ s/\.pm$//; ! $name =~ s|[/\\]|::|g; my $pom = eval { $pm_parser->parse_file( $pm_file ) ! || die "Cannot parse '$pm_file': ", $pm_parser->error(), "\n"; }; if ( $@ ) { *************** *** 94,107 **** my $relative_pm_file = $pm_file; ! $relative_pm_file =~ s|^lib/||; ! my $dest_pod_file = File::Spec->catfile( $DEST_DIR, ! $relative_pm_file ); $dest_pod_file =~ s/\.pm$/.pod/; check_path( $dest_pod_file ); ! open( MODPOD, "> $dest_pod_file" ) ! || die "Cannot open [$dest_pod_file]: $!"; print MODPOD $pom; close( MODPOD ); ! $DEBUG && warn "Extrated POD from [$pm_file] to [$dest_pod_file] ok\n"; push @site_pod_files, $dest_pod_file; } --- 95,107 ---- my $relative_pm_file = $pm_file; ! $relative_pm_file =~ s|^lib[\\/]||; ! my $dest_pod_file = catfile( $DEST_DIR, $relative_pm_file ); $dest_pod_file =~ s/\.pm$/.pod/; check_path( $dest_pod_file ); ! open( MODPOD, '>', $dest_pod_file ) ! || die "Cannot open '$dest_pod_file': $!"; print MODPOD $pom; close( MODPOD ); ! $DEBUG && warn "Extracted POD from '$pm_file' to '$dest_pod_file' ok\n"; push @site_pod_files, $dest_pod_file; } *************** *** 126,132 **** # the output in the SPOPS tree AND in the site generation tree foreach my $orig_pod ( @MANUAL_FILES ) { my $new_pod = $orig_pod; ! $new_pod =~ s|^$MANUAL_DIR/|$DEST_DIR/OpenInteract2/|; check_path( $new_pod ); $template->process( $orig_pod, --- 126,138 ---- # the output in the SPOPS tree AND in the site generation tree + my $relocate_dest = $DEST_DIR; + $relocate_dest =~ s|\\|/|g; + my $relocate_lib = $LIB_DIR; + $relocate_lib =~ s|\\|/|g; + foreach my $orig_pod ( @MANUAL_FILES ) { my $new_pod = $orig_pod; ! $new_pod =~ s|^$MANUAL_DIR[\\/]||; ! $new_pod = catfile( $DEST_DIR, 'OpenInteract2', $new_pod ); check_path( $new_pod ); $template->process( $orig_pod, *************** *** 134,145 **** $new_pod ) || die $template->error(); ! $DEBUG && warn "Created manual file [$new_pod] ok\n"; push @site_pod_files, $new_pod; ! my $source_tree_pod = $new_pod; ! $source_tree_pod =~ s|$DEST_DIR/|$LIB_DIR/|; check_path( $source_tree_pod ); copy( $new_pod, $source_tree_pod ) ! || die "Failed to copy [$new_pod] -> [$source_tree_pod]: $!"; ! $DEBUG && warn "Copied created manual file to [$source_tree_pod] ok\n"; } --- 140,150 ---- $new_pod ) || die $template->error(); ! $DEBUG && warn "Created manual file '$new_pod' ok\n"; push @site_pod_files, $new_pod; ! my $source_tree_pod = relocate( $new_pod, $DEST_DIR, $LIB_DIR ); check_path( $source_tree_pod ); copy( $new_pod, $source_tree_pod ) ! || die "Failed to copy '$new_pod' -> '$source_tree_pod': $!"; ! $DEBUG && warn "Copied created manual file to '$source_tree_pod' ok\n"; } *************** *** 153,179 **** my $pom = $parser->parse_file( $site_pod_file ) || die $parser->error(), "\n"; ! my $dest_html_file = $site_pod_file; ! $dest_html_file =~ s/^$DEST_DIR/$HTML_DIR/; ! $dest_html_file =~ s/\.pod$/$DOC_EXT/; check_path( $dest_html_file ); ! open( SITE, "> $dest_html_file" ) ! || die "Cannot open [$dest_html_file]: $!"; my $title = $dest_html_file; ! $title =~ s|^$HTML_DIR/||; $title =~ s/$DOC_EXT$//; ! $title =~ s|/|::|g; print SITE header( $title ), $pom, footer( $VERSION ); close( SITE ); ! $DEBUG && warn "Generated HTML from [$site_pod_file] to [$dest_html_file] ok\n"; } # Finally, create the index page ! open( INDEXIN, "$MANUAL_DIR/index.html" ) ! || die "Cannot read index: $!"; ! open( INDEXOUT, "> $HTML_DIR/index$DOC_EXT" ) ! || die "Cannot open index for writing: $!"; print INDEXOUT header(), <INDEXIN>, footer( $VERSION ); close( INDEXOUT ); --- 158,184 ---- my $pom = $parser->parse_file( $site_pod_file ) || die $parser->error(), "\n"; ! my $dest_html_file = relocate( $site_pod_file, $DEST_DIR, $HTML_DIR ); check_path( $dest_html_file ); ! open( SITE, '>', $dest_html_file ) ! || die "Cannot open '$dest_html_file': $!"; my $title = $dest_html_file; ! $title =~ s|^$HTML_DIR\W||; $title =~ s/$DOC_EXT$//; ! $title =~ s|[\\/]|::|g; print SITE header( $title ), $pom, footer( $VERSION ); close( SITE ); ! $DEBUG && warn "Generated HTML from '$site_pod_file' to '$dest_html_file' ok\n"; } # Finally, create the index page ! my $index_in_file = catfile( $MANUAL_DIR, 'index.html' ); ! open( INDEXIN, '<', $index_in_file ) ! || die "Cannot read index from '$index_in_file': $!"; ! my $index_out_file = catfile( $HTML_DIR, "index$DOC_EXT" ); ! open( INDEXOUT, '>', $index_out_file ) ! || die "Cannot open index '$index_out_file' for writing: $!"; print INDEXOUT header(), <INDEXIN>, footer( $VERSION ); close( INDEXOUT ); *************** *** 181,186 **** } sub read_version { ! open( VER, 'VERSION' ) || die "Cannot open version doc: $!"; my $version = <VER>; chomp $version; --- 186,211 ---- } + sub relocate { + my ( $orig_location, $source_dir, $dest_dir ) = @_; + $orig_location =~ s|\\|/|g; + $source_dir =~ s|\\|/|g; + $dest_dir =~ s|\\|/|g; + my $new_location = $orig_location; + $new_location =~ s|^$source_dir|$dest_dir|; + if ( $orig_location eq $new_location ) { + die "A substitution didn't work property. We were supposed to relocate\n", + " $orig_location\n", + "from:\n", + " $source_dir\n", + "to:\n", + " $dest_dir\n", + "but it didn't work...\n"; + } + return $new_location; + } + + sub read_version { ! open( VER, '<', 'VERSION' ) || die "Cannot open version doc: $!"; my $version = <VER>; chomp $version; |
From: Chris W. <la...@us...> - 2004-09-27 13:45:59
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7920/lib/OpenInteract2 Modified Files: Context.pm Log Message: OIN-81: get rid of warning Index: Context.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Context.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Context.pm 26 Sep 2004 19:26:18 -0000 1.74 --- Context.pm 27 Sep 2004 13:45:49 -0000 1.75 *************** *** 454,458 **** $log_act->debug( "Try to find action name for URL '$action_url'" ); my $server_config = $self->server_config; ! my $action_name = $server_config->{action_url}{ $action_url }; $log_act->is_debug && $log_act->debug( "Found name '$action_name' for URL '$action_url'" ); --- 454,458 ---- $log_act->debug( "Try to find action name for URL '$action_url'" ); my $server_config = $self->server_config; ! my $action_name = $server_config->{action_url}{ $action_url } || ''; $log_act->is_debug && $log_act->debug( "Found name '$action_name' for URL '$action_url'" ); |
From: Chris W. <la...@us...> - 2004-09-27 13:25:10
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2291/lib/OpenInteract2/Config Modified Files: GlobalOverride.pm Ini.pm Log Message: OIN-81: remove warnings Index: GlobalOverride.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/GlobalOverride.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GlobalOverride.pm 27 Sep 2004 09:22:56 -0000 1.8 --- GlobalOverride.pm 27 Sep 2004 13:24:55 -0000 1.9 *************** *** 234,239 **** } ! $log->info( "Adding to '$key' with type '$type'; ", ! "existing value is '$item->{ $key }'" ); my $sv = join( ', ', @{ $rule->{value} } ); if ( $type eq 'list' ) { --- 234,242 ---- } ! $log->is_info && ! $log->info( "Adding to '$key' with type '$type'; ", ! "existing value is ", ! ( defined $item->{ $key } ! ? "'$item->{ $key }'" : 'not defined' ) ); my $sv = join( ', ', @{ $rule->{value} } ); if ( $type eq 'list' ) { Index: Ini.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/Ini.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Ini.pm 13 Jun 2004 16:15:42 -0000 1.15 --- Ini.pm 27 Sep 2004 13:24:55 -0000 1.16 *************** *** 310,313 **** --- 310,314 ---- $filename = "$filename.new"; } + $original_filename ||= ''; # Set 'Global' items from the config object root |
From: Chris W. <la...@us...> - 2004-09-27 13:25:10
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Datasource In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2291/lib/OpenInteract2/Datasource Modified Files: DBI.pm Log Message: OIN-81: remove warnings Index: DBI.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Datasource/DBI.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DBI.pm 11 Jun 2004 13:09:13 -0000 1.12 --- DBI.pm 27 Sep 2004 13:24:55 -0000 1.13 *************** *** 72,82 **** $db->{LongTruncOk} = $ds_info->{long_trunc_ok} || DEFAULT_TRUNC_OK; ! if ( $ds_info->{trace_level} ) { ! $db->trace( $ds_info->{trace_level} ); ! } $log->is_debug && $log->debug( "Extra parameters [LongReadLen: $db->{LongReadLen}] ", "[LongTruncOk: $db->{LongTruncOk}] ", ! "[Trace: $ds_info->{trace_level}]" ); $log->is_info && $log->info( "DBI connection [$ds_name] made ok" ); --- 72,82 ---- $db->{LongTruncOk} = $ds_info->{long_trunc_ok} || DEFAULT_TRUNC_OK; ! my $trace_level = $ds_info->{trace_level} || '0'; ! $db->trace( $trace_level ); ! $log->is_debug && $log->debug( "Extra parameters [LongReadLen: $db->{LongReadLen}] ", "[LongTruncOk: $db->{LongTruncOk}] ", ! "[Trace: $trace_level]" ); $log->is_info && $log->info( "DBI connection [$ds_name] made ok" ); |
From: Chris W. <la...@us...> - 2004-09-27 13:25:08
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2291/lib/OpenInteract2 Modified Files: DatasourceManager.pm Log Message: OIN-81: remove warnings Index: DatasourceManager.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/DatasourceManager.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DatasourceManager.pm 18 Feb 2004 05:25:26 -0000 1.14 --- DatasourceManager.pm 27 Sep 2004 13:24:54 -0000 1.15 *************** *** 35,38 **** --- 35,41 ---- if ( $log->is_debug ) { my @call_info = caller(2); + unless ( $call_info[0] ) { + @call_info = caller(1); + } $log->debug( "Trying to find datasource '$ds_name' from ", join( ' - ', $call_info[0], $call_info[3], $call_info[2] ) ); *************** *** 290,292 **** =head1 AUTHORS ! Chris Winters E<lt>ch...@cw...E<gt> \ No newline at end of file --- 293,295 ---- =head1 AUTHORS ! Chris Winters E<lt>ch...@cw...E<gt> |
From: Chris W. <la...@us...> - 2004-09-27 13:19:50
|
Update of /cvsroot/openinteract/OpenInteract2/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1077/t Modified Files: utils.pl Log Message: update package version Index: utils.pl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/utils.pl,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** utils.pl 26 Sep 2004 00:59:16 -0000 1.66 --- utils.pl 27 Sep 2004 13:19:40 -0000 1.67 *************** *** 49,53 **** base_group => '2.14', base_page => '2.23', ! base_security => '2.16', base_template => '3.12', base_theme => '2.09', --- 49,53 ---- base_group => '2.14', base_page => '2.23', ! base_security => '2.17', base_template => '3.12', base_theme => '2.09', |
From: Chris W. <la...@us...> - 2004-09-27 13:19:50
|
Update of /cvsroot/openinteract/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1077 Modified Files: MANIFEST Log Message: update package version Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/MANIFEST,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** MANIFEST 26 Sep 2004 23:54:48 -0000 1.87 --- MANIFEST 27 Sep 2004 13:19:40 -0000 1.88 *************** *** 162,166 **** pkg/base_group-2.14.zip pkg/base_page-2.23.zip ! pkg/base_security-2.16.zip pkg/base_template-3.12.zip pkg/base_theme-2.09.zip --- 162,166 ---- pkg/base_group-2.14.zip pkg/base_page-2.23.zip ! pkg/base_security-2.17.zip pkg/base_template-3.12.zip pkg/base_theme-2.09.zip |
From: Chris W. <la...@us...> - 2004-09-27 12:54:27
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28018/Filter Added Files: AllCaps.pm Log Message: OIN-83: add sample filter so we have something that always works --- NEW FILE: AllCaps.pm --- package OpenInteract2::Filter::AllCaps; # $Id: AllCaps.pm,v 1.1 2004/09/27 12:54:15 lachoy Exp $ use strict; use Log::Log4perl qw( get_logger ); use OpenInteract2::Constants qw( :log ); $OpenInteract2::Filter::AllCaps::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/); sub update { my ( $class, $action, $type, $content ) = @_; return unless ( $type eq 'filter' ); my $log = get_logger( LOG_APP ); $log->is_info && $log->info( "Running ALLCAPS filter on content" ); $$content =~ tr/a-z/A-Z/; } __END__ =head1 NAME OpenInteract2::Filter::AllCaps - Sample filter to translate content into all caps. =head1 SYNOPSIS # In $WEBSITE_DIR/conf/observer.ini # register the observer [observer] allcaps = OpenInteract2::Filter::AllCaps # map the observer to an action [observer action] allcaps = myaction =head1 DESCRIPTION Observer that transforms all content to upper case. =head1 COPYRIGHT Copyright (c) 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> |
From: Chris W. <la...@us...> - 2004-09-27 12:53:37
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27617 Added Files: Observer.pm Removed Files: Filter.pm Log Message: OIN-83: delete Filter.pm and add Observer.pm since filters are just a more specific form of observers --- NEW FILE: Observer.pm --- package OpenInteract2::Observer; # $Id: Observer.pm,v 1.1 2004/09/27 12:53:27 lachoy Exp $ use strict; use Log::Log4perl qw( get_logger ); use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context qw( CTX ); use OpenInteract2::Config::IniFile; $OpenInteract2::Observer::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/); my ( $log ); sub register_observer { my ( $class, $observer_name, $observer_info, $registry ) = @_; $log ||= get_logger( LOG_OI ); $log->is_info && $log->info( "Trying to register observer '$observer_name'" ); my ( $observer, $observer_type ); my $observer_class = ( ref $observer_info ) ? $observer_info->{class} : $observer_info; if ( $observer_class ) { my $error = $class->_require_module( $observer_class ); unless ( $error ) { $observer = $observer_class; $observer_type = 'class'; } } elsif ( my $observer_obj = $observer_info->{object} ) { my $error = $class->_require_module( $observer_obj ); unless ( $error ) { $observer = eval { $observer_obj->new }; if ( $@ ) { $log->error( "Failed to instantiate observer ", "object '$observer_obj'" ); } else { $log->is_info && $log->info( "Created object '$observer_obj' ok" ); $observer_type = 'object'; } } } elsif ( my $observer_sub = $observer_info->{sub} ) { $observer_sub =~ /^(.*)::(.*)$/; my ( $name_class, $name_sub ) = ( $1, $2 ); my $error = $class->_require_module( $name_class ); unless ( $error ) { no strict 'refs'; $observer = *{ $name_class . '::' . $name_sub }; $log->is_info && $log->info( "Seemed to assign anonymous sub ok" ); $observer_type = 'sub'; } } else { $log->error( "No observer registered for '$observer_name': must specify", " 'class', 'object' or 'sub' in observer information. ", "(See docs for OpenInteract2::Action under ", "'OBSERVABLE ACTIONS')" ); } if ( $observer ) { $registry->{ $observer_name } = $observer; } return $observer; } # Note: $action_item can be a name or an object sub add_observer_to_action { my ( $class, $observer_name, $action_item ) = @_; my $observer = CTX->lookup_observer( $observer_name ); return unless ( $observer ); if ( ref $observer and ref $observer ne 'CODE' ) { $observer = $observer->new; # create a new object } my $observed = $action_item; unless ( ref $observed ) { my $action_info = eval { CTX->lookup_action_info( $action_item ) }; return if ( $@ or ref $action_info ne 'HASH' ); $observed = $action_info->{class}; } $observed->add_observer( $observer ); $log->is_info && $log->info( "Added observer '$observer' to '$observed' ok" ); return $observer; } sub initialize { my ( $class ) = @_; my $li = get_logger( LOG_INIT ); my $observer_file = $class->create_observer_filename; return unless ( -f $observer_file ); my $observer_ini = OpenInteract2::Config::IniFile->read_config({ filename => $observer_file }); if ( $@ ) { $li->error( "Failed to read '$observer_file': $@" ); return; } $li->is_info && $li->info( "Read in '$observer_file' ok" ); my $observer_registry = $class->_register_initial_observers( $observer_ini->{observer}, CTX->packages ); $li->is_info && $li->info( "Registered internal observers ok" ); CTX->set_observer_registry( $observer_registry ); my $mappings = $observer_ini->{map}; if ( ref $mappings eq 'HASH' ) { while ( my ( $observer_name, $action_info ) = each %{ $mappings } ) { my @actions = ( ref $action_info ) ? @{ $action_info } : ( $action_info ); foreach my $action_name ( @actions ) { $li->is_info && $li->info( "Trying to add observer '$observer_name' to ", "action '$action_name'" ); $class->add_observer_to_action( $observer_name, $action_name ); } } } return; } sub create_observer_filename { my ( $class ) = @_; my $conf_dir = CTX->lookup_directory( 'config' ); return File::Spec->catfile( $conf_dir, 'observer.ini' ); } sub _register_initial_observers { my ( $class, $ini_observers, $packages ) = @_; my $li = get_logger( LOG_INIT ); my %observer_map = (); # First register observers in packages; entries in 'observer.ini' will # override packages since it's assumed people editing it know what # they're doing... foreach my $pkg ( @{ $packages } ) { my $pkg_observers = $pkg->config->observer; next unless ( ref $pkg_observers eq 'HASH' ); while ( my ( $observer_name, $observer_class ) = each %{ $pkg_observers } ) { $li->is_info && $li->info( "Registering observer '$observer_name' as ", "'$observer_class' from package ", $pkg->full_name ); $observer_map{ $observer_name } = $observer_class; } } # Now cycle through the INI and pull the info for each observer # (usually just a class name) while ( my ( $observer_name, $observer_info ) = each %{ $ini_observers } ) { $li->is_info && $li->info( "Registering observer '$observer_name' from ", "server config" ); if ( $observer_map{ $observer_name } ) { $li->warn( "WARNING: Overwriting observer '$observer_name', ", "previously '$observer_map{ $observer_name }'" ); } $observer_map{ $observer_name } = $observer_info; } my %observer_registry = (); # Now that they're collected, be sure we can # require/reference/instantiate each while ( my ( $observer_name, $observer_info ) = each %observer_map ) { $class->register_observer( $observer_name, $observer_info, \%observer_registry ); } return \%observer_registry; } sub _require_module { my ( $class, $to_require ) = @_; $log ||= get_logger( LOG_OI ); eval "require $to_require"; my $error = $@; if ( $error ) { $log->error( "Failed to require '$to_require': $error" ); } else { $log->is_info && $log->info( "Required module '$to_require' ok'" ); } return ( $error ) ? $error : undef; } 1; __END__ =head1 NAME OpenInteract2::Observer - Initialize and manage observers to OpenInteract components =head1 SYNOPSIS # Declare a filter 'allcaps' in the server-wide file for registering # observers, referring to a class somewhere in @INC # # File: $WEBSITE_DIR/conf/observer.ini [observer] allcaps = OpenInteract2::Filter::AllCaps # You can also declare it in your package's package.conf file # File: pkg/mypackage-2.00/package.conf name mypackage version 2.00 author Kilroy (ki...@wa...) observer allcaps OpenInteract2::Filter::AllCaps # Associate the filter with an action in the same file [map] allcaps = news # Create the filter -- see OpenInteract2::Filter::AllCaps shipped # with the distribution: package OpenInteract2::Filter::AllCaps; use strict; sub update { my ( $class, $action, $type, $content ) = @_; return unless ( $type eq 'filter' ); $$content =~ tr/a-z/A-Z/; } # Elsewhere, programmatically add a new observer CTX->add_observer( foobar => 'OpenInteract2::Observer::Foobar' ); =head1 DESCRIPTION This class provides methods for initializing observers and attaching them to action objects or action classes. =head1 METHODS All methods are class methods (for now). Note that when we discuss a 'observer' it could mean a class name, instantiated object or subroutine reference. (A filter is just an observer, see L<Class::Observable|Class::Observable> for what constitutes an observer.) B<create_observer_filename()> Returns the full path to the server observer file, normally C<$WEBSITE_DIR/conf/observer.ini>. B<add_observer_to_action( $observer_name, $action | $action_name )> Registers the observer referenced by C<$observer_name> to the action C<$action> or the action class referenced by C<$action_name>. If you pass in C<$action> the observer will go away when the object is disposed at the end of the request; with C<$action_name> the observer will persist until the server is shutdown. Returns: assigned observer B<register_observer( $observer_name, \%observer_info, \%observer_registry )> Creates a observer with the name C<$observer_name> and saves the information in C<\%observer_registry>. If the observer cannot be created (due to a library not being available or an object not being instantiable) an error is logged but no exception thrown. Returns: created observer, undef if an error encountered B<initialize()> Reads observers declared in packages and in the server C<conf/observer.ini> file, brings in the libraries referenced by the observers, creates a observer name-to-observer registry and saves it to the context. Note that observers declared at the server will override observers declared in a package if they share the same name. You will likely never call this as it is called from L<OpenInteract2::Setup|OpenInteract2::Setup> on the observers declared in packages or in the global observer file. Returns: nothing =head2 Configuring You can also register a particular subroutine or object instance The general configuration to declare a observer is: [observer filtername] observation-type = value The observation types are 'class', 'object' and 'sub' (see L<Class::Observable|Class::Observable> for what these mean and how they are setup), so you could have: [observer foo_obj] object = OpenInteract2::FooFilter [observer foo_sub] sub = OpenInteract2::FooFilter::other_sub [observer action] foo_obj = news foo_sub = page Most of the time you will use the class shortcut since it is the easiest. =head1 SEE ALSO L<Class::Observable> =head1 COPYRIGHT Copyright (c) 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> --- Filter.pm DELETED --- |
From: Chris W. <la...@us...> - 2004-09-27 12:52:12
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26967/Filter Log Message: Directory /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Filter added to the repository |
From: Salve J. N. <sj...@us...> - 2004-09-27 10:42:09
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/TT2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21923/lib/OpenInteract2/TT2 Modified Files: Plugin.pm Log Message: Fix content-generator typo in show_all_plugins() Index: Plugin.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/TT2/Plugin.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Plugin.pm 6 Jun 2004 04:38:02 -0000 1.11 --- Plugin.pm 27 Sep 2004 10:41:54 -0000 1.12 *************** *** 72,76 **** sub show_all_plugins { my ( $self ) = @_; ! my $generator = CTX->content_generator( 'tt' ); # Yes, this is relying on a private data structure... --- 72,76 ---- sub show_all_plugins { my ( $self ) = @_; ! my $generator = CTX->content_generator( 'TT' ); # Yes, this is relying on a private data structure... |
From: Salve J. N. <sj...@us...> - 2004-09-27 09:23:08
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2884/lib/OpenInteract2/Config Modified Files: GlobalOverride.pm Log Message: Typo fixes Index: GlobalOverride.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/GlobalOverride.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GlobalOverride.pm 13 Jun 2004 02:03:21 -0000 1.7 --- GlobalOverride.pm 27 Sep 2004 09:22:56 -0000 1.8 *************** *** 244,252 **** my $queue = $rule->{queue} || 'back'; if ( $queue eq 'front' ) { ! $log->info( "Addding values to front of list: $sv" ); unshift @{ $item->{ $key } }, @{ $rule->{value} }; } else { ! $log->info( "Addding values to back of list: $sv" ); push @{ $item->{ $key } }, @{ $rule->{value} }; } --- 244,252 ---- my $queue = $rule->{queue} || 'back'; if ( $queue eq 'front' ) { ! $log->info( "Adding values to front of list: $sv" ); unshift @{ $item->{ $key } }, @{ $rule->{value} }; } else { ! $log->info( "Adding values to back of list: $sv" ); push @{ $item->{ $key } }, @{ $rule->{value} }; } |
From: Chris W. <la...@us...> - 2004-09-27 05:19:01
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15295/doc/Manual Modified Files: Changes.pod Log Message: latest changes Index: Changes.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/Changes.pod,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Changes.pod 26 Sep 2004 23:53:57 -0000 1.47 --- Changes.pod 27 Sep 2004 05:18:53 -0000 1.48 *************** *** 155,158 **** --- 155,176 ---- tasks within the action. + =item * + + OIN-47: Expose the action's package via the 'package_name' method and + its associated L<OpenInteract2::Package> object via the 'package' + method. + + =back + + L<OpenInteract2::Action::Common> + + =over 4 + + =item * + + OIN-43: When retrieving the ID field for the object we're working on + also check to see whether any mapped field is also available. (Mostly + used for LDAP.) + =back *************** *** 538,541 **** --- 556,569 ---- =back + C<script/oi2_manage> + + =over 4 + + =item * + + OIN-80: Never re-use the website logging configuration/file, even if + it is absolutely available. It's just too confusing. + + =back =head2 Package Updates |
From: Chris W. <la...@us...> - 2004-09-27 05:02:46
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12503/lib/OpenInteract2 Modified Files: Action.pm Log Message: OIN-47: expose an Action's package by a property (it's always been set in the action table at server startup) Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Action.pm 26 Sep 2004 23:51:47 -0000 1.54 --- Action.pm 27 Sep 2004 05:01:56 -0000 1.55 *************** *** 31,35 **** my %PROPS = map { $_ => 1 } qw( ! controller content_generator action_type class method message_name task task_default task_valid task_invalid --- 31,35 ---- my %PROPS = map { $_ => 1 } qw( ! controller content_generator package_name action_type class method message_name task task_default task_valid task_invalid *************** *** 742,745 **** --- 742,754 ---- } + # read-only + + sub package { + my ( $self ) = @_; + my $package_name = $self->package_name; + return undef unless ( $package_name ); + return CTX->repository->fetch_package( $package_name ); + } + # Assign the object properties from the params passed in; the rest of # the parameters are instance parameters that we won't know in |
From: Chris W. <la...@us...> - 2004-09-27 05:02:46
|
Update of /cvsroot/openinteract/OpenInteract2/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12503/t Modified Files: action.t Log Message: OIN-47: expose an Action's package by a property (it's always been set in the action table at server startup) Index: action.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/action.t,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** action.t 25 Sep 2004 17:27:55 -0000 1.16 --- action.t 27 Sep 2004 05:01:57 -0000 1.17 *************** *** 7,11 **** require 'utils.pl'; use SPOPS::Secure qw( :level ); ! use Test::More tests => 72; require_ok( 'OpenInteract2::Action' ); --- 7,11 ---- require 'utils.pl'; use SPOPS::Secure qw( :level ); ! use Test::More tests => 74; require_ok( 'OpenInteract2::Action' ); *************** *** 124,127 **** --- 124,128 ---- username => 'mario', city => 'Pittsburgh', + package_name => 'mypackage', cache_expire => { foo => '10m' } } ) *************** *** 130,133 **** --- 131,136 ---- is( ref $empty_p, 'OpenInteract2::Action', '...of the right class' ); + is( $empty_p->package_name, 'mypackage', + '...got property "package_name"' ); is( $empty_p->task, 'foo', '...got property "task"' ); *************** *** 154,157 **** --- 157,162 ---- is( ref $named, 'OpenInteract2::Action::Page', '...of the right class' ); + is( $named->package_name, 'base_page', + '...of the right package' ); is( $named->is_secure, 1, '...is_secure property set' ); |
From: Chris W. <la...@us...> - 2004-09-27 04:48:58
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10177/lib/OpenInteract2/Action Modified Files: Common.pm Log Message: OIN-43: if a class has its ID field in a field_map, check whether the mapped fieldname is available from the request if we cannot find a value in the original ID field Index: Common.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action/Common.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Common.pm 15 Jun 2004 00:02:21 -0000 1.16 --- Common.pm 27 Sep 2004 04:48:44 -0000 1.17 *************** *** 77,86 **** if ( $self->param( $key ) ) { $log->is_debug && ! $log->debug( "NOT settting default for [$tag]: [$key], value ", ! "already exists [", $self->param( $key ), "]" ); } else { $log->is_debug && ! $log->debug( "Setting default for [$tag]: [$key] [$value]" ); $self->param( $key, $value ); } --- 77,86 ---- if ( $self->param( $key ) ) { $log->is_debug && ! $log->debug( "NOT settting default for '$tag' = '$key', value ", ! "already exists '", $self->param( $key ), "'" ); } else { $log->is_debug && ! $log->debug( "Setting default for '$tag' = '$key' '$value'" ); $self->param( $key, $value ); } *************** *** 107,111 **** my $object_class = eval { CTX->lookup_object( $object_type ) }; if ( $@ or ! $object_class ) { ! $log->warn( "No object class for [$object_type]" ); my $msg = join( '', "Class for given object type '$object_type' ", "is undefined. Maybe a typo in your action ", --- 107,111 ---- my $object_class = eval { CTX->lookup_object( $object_type ) }; if ( $@ or ! $object_class ) { ! $log->warn( "No object class for '$object_type'" ); my $msg = join( '', "Class for given object type '$object_type' ", "is undefined. Maybe a typo in your action ", *************** *** 125,129 **** my $id_field = eval { $object_class->id_field }; if ( ! $id_field or $@ ) { ! $log->warn( "No ID field for [$object_class]" ); my $msg = join( '', "Object ID field is undefined. We cannot know ", "how to fetch an existing object without it. ", --- 125,129 ---- my $id_field = eval { $object_class->id_field }; if ( ! $id_field or $@ ) { ! $log->warn( "No ID field for '$object_class'" ); my $msg = join( '', "Object ID field is undefined. We cannot know ", "how to fetch an existing object without it. ", *************** *** 155,171 **** } my $id_field = $self->param( 'c_id_field' ); if ( ! defined $id and $id_field ) { $id = $self->param( $id_field ) ! || CTX->request->param( $id_field ) ! || CTX->request->param( 'id' ); } if ( defined $id ) { $self->param( c_id => $id ); } else { ! $log->warn( "No ID found in action/request '$id_field'" ); ! my $msg = join( '', "No value found in action parameters or ", ! "request for ID field '$id_field'." ); $self->param_add( error_msg => $msg ); return 1; --- 155,191 ---- } + my $request = CTX->request; my $id_field = $self->param( 'c_id_field' ); + my ( $alt_id_field ); if ( ! defined $id and $id_field ) { $id = $self->param( $id_field ) ! || $request->param( $id_field ) ! || $request->param( 'id' ); } + + # If it's not found using that ID field, see if we've got another + # field mapped to the given ID field in the SPOPS object + + unless ( defined $id ) { + my $object_class = $self->param( 'c_object_class' ); + my $field_map = eval { $object_class->CONFIG->{field_map} } || {}; + $alt_id_field = $field_map->{ $id_field }; + if ( $alt_id_field ) { + $id = $self->param( $alt_id_field ) + || $request->param( $alt_id_field ); + } + } + if ( defined $id ) { $self->param( c_id => $id ); } else { ! my $msg = "No value found in action parameters or " . ! "request for ID field '$id_field'"; ! if ( $alt_id_field ) { ! $msg .= " or alternative ID field '$alt_id_field'"; ! } ! $msg .= '.'; ! $log->warn( $msg ); $self->param_add( error_msg => $msg ); return 1; *************** *** 182,186 **** next unless ( $_ ); unless ( $self->param( $_ ) ) { ! $log->warn( "No value in template parameter [$_]" ); my $msg = join( '', "No template found in '$_' key. This " . "template is mandatory for the task to ", --- 202,206 ---- next unless ( $_ ); unless ( $self->param( $_ ) ) { ! $log->warn( "No value in template parameter '$_'" ); my $msg = join( '', "No template found in '$_' key. This " . "template is mandatory for the task to ", *************** *** 200,204 **** for ( @params ) { unless ( $self->param( $_ ) ) { ! $log->warn( "No value in parameter [$_]" ); my $msg = join( '', "Action parameter '$_' is undefined but ", "required for the task to function." ); --- 220,224 ---- for ( @params ) { unless ( $self->param( $_ ) ) { ! $log->warn( "No value in parameter '$_'" ); my $msg = join( '', "Action parameter '$_' is undefined but ", "required for the task to function." ); *************** *** 223,230 **** next unless ( $field ); $log->is_debug && ! $log->debug( "Setting standard [$field] in object from request" ); eval { $object->{ $field } = $request->param( $field ) }; if ( $@ ) { ! $log->warn( "Failed to set object value for [$field]: $@" ); } } --- 243,250 ---- next unless ( $field ); $log->is_debug && ! $log->debug( "Setting standard '$field' in object from request" ); eval { $object->{ $field } = $request->param( $field ) }; if ( $@ ) { ! $log->warn( "Failed to set object value for '$field': $@" ); } } *************** *** 235,242 **** next unless ( $field ); $log->is_debug && ! $log->debug( "Setting toggled [$field] in object from request" ); eval { $object->{ $field } = $request->param_toggled( $field ) }; if ( $@ ) { ! $log->warn( "Failed to set object toggle for [$field]: $@" ); } } --- 255,262 ---- next unless ( $field ); $log->is_debug && ! $log->debug( "Setting toggled '$field' in object from request" ); eval { $object->{ $field } = $request->param_toggled( $field ) }; if ( $@ ) { ! $log->warn( "Failed to set object toggle for '$field': $@" ); } } *************** *** 247,251 **** next unless ( $field ); $log->is_debug && ! $log->debug( "Setting date [$field] in object from request" ); eval { $object->{ $field }= $request->param_date( --- 267,271 ---- next unless ( $field ); $log->is_debug && ! $log->debug( "Setting date '$field' in object from request" ); eval { $object->{ $field }= $request->param_date( *************** *** 253,257 **** }; if ( $@ ) { ! $log->warn( "Failed to set object date for [$field]: $@" ); } } --- 273,277 ---- }; if ( $@ ) { ! $log->warn( "Failed to set object date for '$field': $@" ); } } *************** *** 262,266 **** next unless ( $field ); $log->is_debug && ! $log->debug( "Setting datetime [$field] in object from request" ); eval { $object->{ $field } = $request->param_datetime( --- 282,286 ---- next unless ( $field ); $log->is_debug && ! $log->debug( "Setting datetime '$field' in object from request" ); eval { $object->{ $field } = $request->param_datetime( *************** *** 268,272 **** }; if ( $@ ) { ! $log->warn( "Failed to set object datetime for [$field]: $@" ); } } --- 288,292 ---- }; if ( $@ ) { ! $log->warn( "Failed to set object datetime for '$field': $@" ); } } *************** *** 290,294 **** } $log->is_debug && ! $log->debug( "Trying to fetch [$object_class: $id]" ); my $object = eval { $object_class->fetch( $id ) }; if ( $@ ) { --- 310,314 ---- } $log->is_debug && ! $log->debug( "Trying to fetch '$object_class': '$id'" ); my $object = eval { $object_class->fetch( $id ) }; if ( $@ ) { |
From: Chris W. <la...@us...> - 2004-09-27 04:16:16
|
Update of /cvsroot/openinteract/OpenInteract2/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3834/t Modified Files: config_package_changes.t Log Message: OIN-66: fix spacing/display issues when generating Changes file after reading in a previous one; this includes ensuring that empty comments aren't spaced oddly and word-wrapping works properly Index: config_package_changes.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/config_package_changes.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config_package_changes.t 25 May 2004 00:13:30 -0000 1.6 --- config_package_changes.t 27 Sep 2004 04:16:07 -0000 1.7 *************** *** 24,28 **** my @all_entries = $changes->entries; ! is( scalar @all_entries, 17, "All entries fetched" ); is( $all_entries[0]->{version}, '2.03', 'First entry version (file)' ); --- 24,28 ---- my @all_entries = $changes->entries; ! is( scalar @all_entries, 19, "All entries fetched" ); is( $all_entries[0]->{version}, '2.03', 'First entry version (file)' ); *************** *** 30,35 **** is( $all_entries[-1]->{version}, '1.50', 'Last entry version (file)' ); is( $all_entries[-1]->{date}, 'Tue Apr 2 00:36:48 EST 2002', 'Last entry date (file)' ); ! is( $all_entries[4]->{version}, '1.62', 'Middle entry version (file)' ); ! is( $all_entries[4]->{date}, 'Wed Feb 26 06:55:17 EST 2003', 'Middle entry date (file)' ); my ( $new_entry ) = $changes->latest(1); --- 30,35 ---- is( $all_entries[-1]->{version}, '1.50', 'Last entry version (file)' ); is( $all_entries[-1]->{date}, 'Tue Apr 2 00:36:48 EST 2002', 'Last entry date (file)' ); ! is( $all_entries[4]->{version}, '1.64', 'Middle entry version (file)' ); ! is( $all_entries[4]->{date}, 'Wed Mar 4 17:12:29 EST 2003', 'Middle entry date (file)' ); my ( $new_entry ) = $changes->latest(1); *************** *** 63,66 **** --- 63,68 ---- is( $before_entries[3]->{version}, '1.57', "Entries before version, last (file)" ); + $changes->write_config( 'foo' ); + chdir( $pwd ); } *************** *** 73,81 **** my @all_entries = $changes->entries; ! is( scalar @all_entries, 17, "All entries fetched" ); is( $all_entries[0]->{version}, '2.03', "First entry version (dir)" ); is( $all_entries[-1]->{version}, '1.50', "Last entry version (dir)" ); ! is( $all_entries[4]->{version}, '1.62', "Middle entry version (dir)" ); my ( $new_entry ) = $changes->latest(1); --- 75,83 ---- my @all_entries = $changes->entries; ! is( scalar @all_entries, 19, "All entries fetched" ); is( $all_entries[0]->{version}, '2.03', "First entry version (dir)" ); is( $all_entries[-1]->{version}, '1.50', "Last entry version (dir)" ); ! is( $all_entries[4]->{version}, '1.64', "Middle entry version (dir)" ); my ( $new_entry ) = $changes->latest(1); *************** *** 90,103 **** my @since_entries = $changes->since( '1.51' ); ! is( scalar @since_entries, 16, "Entries since version (dir)" ); is( $since_entries[0]->{version}, '2.03', 'Entries since version, first (dir)' ); is( $since_entries[-1]->{version}, '1.51', 'Entries since version, last (dir)' ); my @before_entries = $changes->before( '2.00' ); ! is( scalar @before_entries, 14, "Entries before version (dir)" ); is( $before_entries[0]->{version}, '2.00', "Entries before version, first (dir)" ); ! is( $before_entries[1]->{version}, '1.62', "Entries before version, first (dir)" ); ! is( $before_entries[2]->{version}, '1.61', "Entries before version, third (dir)" ); ! is( $before_entries[3]->{version}, '1.60', "Entries before version, last (dir)" ); } --- 92,105 ---- my @since_entries = $changes->since( '1.51' ); ! is( scalar @since_entries, 18, "Entries since version (dir)" ); is( $since_entries[0]->{version}, '2.03', 'Entries since version, first (dir)' ); is( $since_entries[-1]->{version}, '1.51', 'Entries since version, last (dir)' ); my @before_entries = $changes->before( '2.00' ); ! is( scalar @before_entries, 16, "Entries before version (dir)" ); is( $before_entries[0]->{version}, '2.00', "Entries before version, first (dir)" ); ! is( $before_entries[1]->{version}, '1.64', "Entries before version, first (dir)" ); ! is( $before_entries[2]->{version}, '1.63', "Entries before version, third (dir)" ); ! is( $before_entries[3]->{version}, '1.62', "Entries before version, last (dir)" ); } |
From: Chris W. <la...@us...> - 2004-09-27 04:16:16
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3834/lib/OpenInteract2/Config Modified Files: PackageChanges.pm Log Message: OIN-66: fix spacing/display issues when generating Changes file after reading in a previous one; this includes ensuring that empty comments aren't spaced oddly and word-wrapping works properly Index: PackageChanges.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/PackageChanges.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PackageChanges.pm 27 Sep 2004 03:35:14 -0000 1.10 --- PackageChanges.pm 27 Sep 2004 04:16:06 -0000 1.11 *************** *** 57,60 **** --- 57,61 ---- LINE: for ( @content ) { + chomp; if ( /^(\d+.\d+)(.*)$/ ) { my $this_version = $1; *************** *** 66,70 **** } $last_entry{version} = $this_version; - chomp $this_date; $this_date =~ s/^\s+//; $this_date =~ s/\s+$//; --- 67,70 ---- *************** *** 80,86 **** } ! # Get rid of leading whitespace in the message... ! s/^\s+//; $last_entry{message} .= $_; } --- 80,87 ---- } ! # Get rid of leading/trailing whitespace in the message... ! s/^\s+/ /; ! s/\s+$/ /; $last_entry{message} .= $_; } *************** *** 89,93 **** push @entries, { %last_entry }; $self->{_entries} = \@entries; ! $self->comments( join( '', @comments ) ); return $self; } --- 90,94 ---- push @entries, { %last_entry }; $self->{_entries} = \@entries; ! $self->comments( join( "\n", @comments ) ); return $self; } *************** *** 137,145 **** || oi_error "Cannot write to '$outfile': $!"; if ( my $comments = $self->comments ) { ! print OUT $comments; } foreach my $entry ( $self->entries ) { ! print OUT $entry->{version}, ' ', $entry->{date}, "\n\n", ! wrap( ' ', ' ', $entry->{message} ), "\n\n"; } } --- 138,150 ---- || oi_error "Cannot write to '$outfile': $!"; if ( my $comments = $self->comments ) { ! print OUT $comments, "\n"; } foreach my $entry ( $self->entries ) { ! print OUT $entry->{version}, ' ', $entry->{date}, "\n\n"; ! if ( $entry->{message} ) { ! my $msg = $entry->{message}; ! $msg =~ s/^\s+//; ! print OUT wrap( ' ', ' ', $msg ), "\n\n"; ! } } } |
From: Chris W. <la...@us...> - 2004-09-27 04:01:05
|
Update of /cvsroot/openinteract/OpenInteract2/t/use In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1295 Modified Files: Changes Log Message: OIN-66: add some empty entries Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/use/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changes 13 Apr 2003 00:20:21 -0000 1.1 --- Changes 27 Sep 2004 04:00:49 -0000 1.2 *************** *** 18,22 **** Initial OI2 conversion. ! 1.62 Wed Feb 26 06:55:17 EST 2003 Add 'autologin' action key. Set to 'yes' if you want new users --- 18,26 ---- Initial OI2 conversion. ! 1.64 Wed Mar 4 17:12:29 EST 2003 ! ! 1.63 Wed Feb 28 06:41:11 EST 2003 ! ! 1.62 Wed Feb 26 06:55:53 EST 2003 Add 'autologin' action key. Set to 'yes' if you want new users |