r61957 - in /branches/upstream/libdancer-perl/current: CHANGES MANIFEST META.yml lib/Dancer.pm lib/Dancer/Plugin/WebSocket.pm lib/Dancer/Route/Registry.pm t/08_session/07_session_expires.t

poisonbit-guest at users.alioth.debian.org poisonbit-guest at users.alioth.debian.org
Tue Aug 24 09:43:52 UTC 2010


Author: poisonbit-guest
Date: Tue Aug 24 09:43:38 2010
New Revision: 61957

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=61957
Log:
[svn-upgrade] Integrating new upstream version, libdancer-perl (1.1808)

Added:
    branches/upstream/libdancer-perl/current/lib/Dancer/Plugin/WebSocket.pm
Modified:
    branches/upstream/libdancer-perl/current/CHANGES
    branches/upstream/libdancer-perl/current/MANIFEST
    branches/upstream/libdancer-perl/current/META.yml
    branches/upstream/libdancer-perl/current/lib/Dancer.pm
    branches/upstream/libdancer-perl/current/lib/Dancer/Route/Registry.pm
    branches/upstream/libdancer-perl/current/t/08_session/07_session_expires.t

Modified: branches/upstream/libdancer-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/CHANGES?rev=61957&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/CHANGES (original)
+++ branches/upstream/libdancer-perl/current/CHANGES Tue Aug 24 09:43:38 2010
@@ -1,3 +1,10 @@
+Dancer 1.1808
+
+    [ Alexis Sukrieh ]
+    * FIX test failures 
+      - t/08_session/07_session_expires.t
+      - t/08_session/07_session_expires.t
+
 Dancer 1.1807
 
     [ Sawyer X ]

Modified: branches/upstream/libdancer-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/MANIFEST?rev=61957&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/MANIFEST (original)
+++ branches/upstream/libdancer-perl/current/MANIFEST Tue Aug 24 09:43:38 2010
@@ -30,6 +30,7 @@
 lib/Dancer/Object.pm
 lib/Dancer/Plugin.pm
 lib/Dancer/Plugin/Ajax.pm
+lib/Dancer/Plugin/WebSocket.pm
 lib/Dancer/Plugins.pod
 lib/Dancer/Renderer.pm
 lib/Dancer/Request.pm

Modified: branches/upstream/libdancer-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/META.yml?rev=61957&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/META.yml (original)
+++ branches/upstream/libdancer-perl/current/META.yml Tue Aug 24 09:43:38 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Dancer
-version:            1.1807
+version:            1.1808
 abstract:           A minimal-effort oriented web application framework
 author:  []
 license:            perl

Modified: branches/upstream/libdancer-perl/current/lib/Dancer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/lib/Dancer.pm?rev=61957&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer.pm (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer.pm Tue Aug 24 09:43:38 2010
@@ -30,7 +30,7 @@
 use base 'Exporter';
 
 $AUTHORITY = 'SUKRIA';
-$VERSION   = '1.1807';
+$VERSION   = '1.1808';
 @EXPORT    = qw(
   after
   any

Added: branches/upstream/libdancer-perl/current/lib/Dancer/Plugin/WebSocket.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/lib/Dancer/Plugin/WebSocket.pm?rev=61957&op=file
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer/Plugin/WebSocket.pm (added)
+++ branches/upstream/libdancer-perl/current/lib/Dancer/Plugin/WebSocket.pm Tue Aug 24 09:43:38 2010
@@ -1,0 +1,28 @@
+package Dancer::Plugin::WebSocket;
+
+use strict;
+use warnings;
+
+use Dancer ':syntax';
+use Dancer::Plugin;
+
+register websocket => \&websocket;
+
+BEGIN {
+    die "Plack is required for WebSocket support"
+      unless Dancer::ModuleLoader->load('Plack::Builder');
+}
+
+sub websocket {
+    my ($pattern, $code) = @_;
+
+    my $compiled_route = sub {
+        my $res = $code->();
+        $res;
+    };
+    get $pattern => $compiled_route;
+}
+
+register_plugin;
+
+1;

Modified: branches/upstream/libdancer-perl/current/lib/Dancer/Route/Registry.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/lib/Dancer/Route/Registry.pm?rev=61957&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer/Route/Registry.pm (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer/Route/Registry.pm Tue Aug 24 09:43:38 2010
@@ -80,6 +80,11 @@
     my @registered = @{$self->{routes}{$route->method}};
     my $last       = $registered[-1];
     $route->set_previous($last) if defined $last;
+
+    # if the route have options, we store the route at the begining
+    # of the routes. This way, we can have the following routes:
+    # get '/' => sub {} and ajax '/' => sub {}
+    # and the user won't have to declare the ajax route before the get
     if (keys %{$route->{options}}) {
         unshift @{$self->{routes}{$route->method}}, $route;
     }

Modified: branches/upstream/libdancer-perl/current/t/08_session/07_session_expires.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/08_session/07_session_expires.t?rev=61957&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/t/08_session/07_session_expires.t (original)
+++ branches/upstream/libdancer-perl/current/t/08_session/07_session_expires.t Tue Aug 24 09:43:38 2010
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Test::More tests => 4, import => ['!pass'];
+use Test::More import => ['!pass'];
 use Dancer::ModuleLoader;
 use Dancer;
 use Dancer::Cookie;
@@ -10,6 +10,7 @@
 plan skip_all => "Test::TCP is needed for this test"
   unless Dancer::ModuleLoader->load("Test::TCP");
 
+plan tests => 4;
 
 my $check_expires = Dancer::Cookie::_epoch_to_gmtstring(time + 42);
 




More information about the Pkg-perl-cvs-commits mailing list