[Jifty-commit] r5843 - in jifty/trunk: . lib/Jifty lib/Jifty/Subs

Jifty commits jifty-commit at lists.jifty.org
Tue Sep 16 03:30:50 EDT 2008


Author: sartak
Date: Tue Sep 16 03:30:46 2008
New Revision: 5843

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/Makefile.PL
   jifty/trunk/lib/Jifty/Manual/Tutorial.pod
   jifty/trunk/lib/Jifty/Manual/UsingCSSandJS.pod
   jifty/trunk/lib/Jifty/Subs.pm
   jifty/trunk/lib/Jifty/Subs/Render.pm
   jifty/trunk/lib/Jifty/Test.pm
   jifty/trunk/lib/Jifty/Web.pm

Log:


Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL	(original)
+++ jifty/trunk/Makefile.PL	Tue Sep 16 03:30:46 2008
@@ -193,47 +193,28 @@
 install_script('bin/jifty');
 install_share;
 
-# INSTALLDIRS need to be set before Makefile if you want to change default install path
-# debian packaging use :
-#  INSTALLDIRS=vendor $(PERL) Makefile.PL --skipdeps INSTALLDIRS=vendor 
-#
-# TODO?: JIFTY_PLUGINS=ALL
-# ls plugins -> Authentication-CAS Authentication-Ldap  Multipage  TabView
 my @plugins = defined $ENV{JIFTY_PLUGINS} ? split(/ /, $ENV{JIFTY_PLUGINS}) : qw(TabView);
 
-
 # Test all of our sub-dist tests too
-tests(join(' ', qw(t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t), map { "plugins/$_/t/*.t plugins/$_/t/*/*/*.t"} @plugins));
+tests(join(' ', qw(t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t), map { "plugins/$_/t/*.t"} @plugins));
+
 
 for (@plugins) {
     die unless -d "plugins/$_";
 #    install_share("plugins/$_/share");
     chdir("plugins/$_");
-    system("$^X -I../../lib Makefile.PL INSTALLDIRS=".$ENV{INSTALLDIRS});
+    system("$^X -I../../lib Makefile.PL");
     chdir('../..');
 
 }
 
 postamble(<<"END");
 
-all ::
-@{[ join("\n", map { "\tcd plugins/$_;".' $(MAKE) ' } @plugins)   ]}
-
 install ::
-@{[ join("\n", map { "\tcd plugins/$_;".' $(MAKE) install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX)' } @plugins)   ]}
-
-distclean :: realclean
-@{[ "\t".'$(NOECHO) $(NOOP)']}
+@{[ join("\n", map { "\tcd plugins/$_; make install" } @plugins)   ]}
 
-realclean :: 
-@{[ join("\n", map { "\tcd plugins/$_;".' $(MAKE) realclean' } @plugins)   ]}
-
-INST_LIB= blib/lib
-
-INST_ARCHLIB= @{[ join("','", map { "plugins/$_/blib/lib"} @plugins) ]}
 
 END
 
-
 WriteAll;
 

Modified: jifty/trunk/lib/Jifty/Manual/Tutorial.pod
==============================================================================
--- jifty/trunk/lib/Jifty/Manual/Tutorial.pod	(original)
+++ jifty/trunk/lib/Jifty/Manual/Tutorial.pod	Tue Sep 16 03:30:46 2008
@@ -246,8 +246,8 @@
   INFO - Using MyWeblog::Model::Post, as it appears to be new.
   INFO - Using Jifty::Model::Session, as it appears to be new.
   INFO - Using Jifty::Model::Metadata, as it appears to be new.
-  INFO - Set up version 0.0.1, jifty version 0.80913
-  Jifty version 0.80913 up to date.
+  INFO - Set up version 0.0.1, jifty version 0.80408
+  Jifty version 0.80408 up to date.
   ...
   MyWeblog version 0.0.1 up to date.
 

Modified: jifty/trunk/lib/Jifty/Manual/UsingCSSandJS.pod
==============================================================================

Modified: jifty/trunk/lib/Jifty/Subs.pm
==============================================================================

Modified: jifty/trunk/lib/Jifty/Subs/Render.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Subs/Render.pm	(original)
+++ jifty/trunk/lib/Jifty/Subs/Render.pm	Tue Sep 16 03:30:46 2008
@@ -56,27 +56,6 @@
             # XXX - We don't yet use $timestamp here.
             my ( $timestamp, $msg ) = @$rv;
 
-            for my $render_info (values %{$render->{$channel}}) {
-                if ($render_info->{coalesce} and $render_info->{mode} eq "Replace") {
-                    my $hash = Digest::MD5::md5_hex( YAML::Dump([$render_info->{region}, $render_info->{render_with}] ) );
-                    Jifty->log->debug("Coalesced duplicate region @{[$render_info->{region}]} with @{[$render_info->{render_with}]} from $channel event $msg") if exists $coalesce{$hash};
-                    $coalesce{$hash} = [ $timestamp, $event_class, $msg, $render_info ] unless $coalesce{$hash} and $coalesce{$hash}[0] > $timestamp;
-                } else {
-                    Jifty->log->debug("Rendering $channel event $msg in @{[$render_info->{region}]} with @{[$render_info->{render_with}]}");
-                    render_single( $event_class, $msg, $render_info, $callback );
-                    $sent++;
-                }
-            }
-        }
-    }
-
-    for my $c (values %coalesce) {
-        my (undef, $event_class, $msg, $render_info) = @{$c};
-        Jifty->log->debug("Rendering @{[$render_info->{region}]} with @{[$render_info->{render_with}]} for $event_class");
-        render_single( $event_class, $msg, $render_info, $callback );
-        $sent++;
-    }
-
     return ($sent);
 }
 
@@ -84,33 +63,30 @@
 
 Renders a single region, based on the region information in C<INFO>.
 
-=cut
-
-sub render_single {
-    my ($class, $msg, $render_info, $callback) = @_;
-
-    my $region = Jifty::Web::PageRegion->new(
-        name => $render_info->{region},
-        path => $render_info->{render_with},
-    );
-    # So we don't warn about "duplicate region"s
-    delete Jifty->web->{'regions'}{ $region->qualified_name };
-
-    my $event_object   = $class->new($msg);
-    # Region's arguments come from explicit arguments only
-    $region->arguments( $render_info->{arguments} );
-
-    my $region_content = '';
-    $region->enter;
-    # Also provide an 'event' argument, and fill in the render
-    # arguments.  These don't show up in the region's arguments if
-    # inspected, but do show up in the request.
-    $region->render_as_subrequest(
-        \$region_content,
-        { %{$region->arguments}, event => $event_object, $event_object->render_arguments },
-    );
-    $callback->( $render_info->{mode}, $region->qualified_name, $region_content, $render_info->{attrs} );
-    $region->exit;
+            for my $render_info (values %{$render->{$channel}}) {
+                my $region      = Jifty::Web::PageRegion->new(
+                    name => $render_info->{region},
+                    path => $render_info->{render_with},
+                );
+                delete Jifty->web->{'regions'}{ $region->qualified_name };
+
+                # Finally render the region.  In addition to the user-supplied arguments
+                # in $render_info, we always pass the target $region and the event object
+                # into its %ARGS.
+                my $region_content = '';
+                my $event_object   = $event_class->new($msg);
+                $region->render_as_subrequest( \$region_content,
+                    {   %{ $render_info->{arguments} || {} },
+                        event => $event_object,
+                        $event_object->render_arguments,
+                    }
+                );
+                $callback->( $render_info->{mode}, $region->qualified_name, $region_content);
+                $sent++;
+            }
+        }
+    }
+    return ($sent);
 }
 
 1;

Modified: jifty/trunk/lib/Jifty/Test.pm
==============================================================================

Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================


More information about the Jifty-commit mailing list