r65072 - in /branches/upstream/libdancer-perl/current: CHANGES MANIFEST META.yml lib/Dancer.pm t/01_config/05_serialiers.t t/01_config/05_serializers.t t/03_route_handler/02_before_filter.t t/03_route_handler/30_bug_gh190.t t/12_response/03_charset.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat Nov 20 14:04:48 UTC 2010


Author: dmn
Date: Sat Nov 20 14:04:40 2010
New Revision: 65072

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65072
Log:
[svn-upgrade] new version libdancer-perl (1.2000)

Added:
    branches/upstream/libdancer-perl/current/t/01_config/05_serializers.t
    branches/upstream/libdancer-perl/current/t/03_route_handler/30_bug_gh190.t
Removed:
    branches/upstream/libdancer-perl/current/t/01_config/05_serialiers.t
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/t/03_route_handler/02_before_filter.t
    branches/upstream/libdancer-perl/current/t/12_response/03_charset.t

Modified: branches/upstream/libdancer-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/CHANGES?rev=65072&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/CHANGES (original)
+++ branches/upstream/libdancer-perl/current/CHANGES Sat Nov 20 14:04:40 2010
@@ -1,3 +1,18 @@
+Dancer 1.2000
+    ** 1.2 is a stable release of Dancer **
+    ** We assure consistency and stability for this release and the following **
+    ** 1.2xxx releases; you should not have issues updating to any 1.2xxx     **
+    ** version because of it.                                                 **
+
+    ++ A very special thanks goes to the Dancer community who improved and    ++
+    ++ perfected this release and worked hard on reporting bugs, fixing them, ++
+    ++ improving the stability, providing important features and everything   ++
+    ++ else which makes Dancer so attractive - and above all: its community   ++
+    ++ so thank you!                                                          ++
+
+    [ Sawyer X ]
+    * Fixing some more XML tests with missing preqreqs.
+
 Dancer 1.1999_04 (RC4)
     [ Sawyer X ]
     * Load Plack::Loader dynamically in test.

Modified: branches/upstream/libdancer-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/MANIFEST?rev=65072&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/MANIFEST (original)
+++ branches/upstream/libdancer-perl/current/MANIFEST Sat Nov 20 14:04:40 2010
@@ -90,7 +90,7 @@
 t/01_config/02_mime_type.t
 t/01_config/03_logger.t
 t/01_config/04_config_file.t
-t/01_config/05_serialiers.t
+t/01_config/05_serializers.t
 t/01_config/06_stack_trace.t
 t/01_config/environments/development.pl
 t/01_config/yaml_dependency.t
@@ -140,6 +140,7 @@
 t/03_route_handler/27_issue_77_pass_breaks_routes.t
 t/03_route_handler/28_plack_mount.t
 t/03_route_handler/29_redirect_immediatly.t
+t/03_route_handler/30_bug_gh190.t
 t/03_route_handler/public/404.html
 t/03_route_handler/views/hello.tt
 t/04_static_file/001_base.t

Modified: branches/upstream/libdancer-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/META.yml?rev=65072&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/META.yml (original)
+++ branches/upstream/libdancer-perl/current/META.yml Sat Nov 20 14:04:40 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Dancer
-version:            1.1999_04
+version:            1.2000
 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=65072&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer.pm (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer.pm Sat Nov 20 14:04:40 2010
@@ -31,7 +31,7 @@
 use base 'Exporter';
 
 $AUTHORITY = 'SUKRIA';
-$VERSION   = '1.1999_04';
+$VERSION   = '1.2000';
 @EXPORT    = qw(
   after
   any

Added: branches/upstream/libdancer-perl/current/t/01_config/05_serializers.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/01_config/05_serializers.t?rev=65072&op=file
==============================================================================
--- branches/upstream/libdancer-perl/current/t/01_config/05_serializers.t (added)
+++ branches/upstream/libdancer-perl/current/t/01_config/05_serializers.t Sat Nov 20 14:04:40 2010
@@ -1,0 +1,42 @@
+use Test::More import => ['!pass'];
+
+use strict;
+use warnings;
+
+use Dancer ':syntax';
+use Dancer::ModuleLoader;
+
+plan tests => 9;
+
+my $struct = {eris => 23};
+
+SKIP: {
+    skip 'YAML is needed to run this test', 3
+      unless Dancer::ModuleLoader->load('YAML');
+    ok my $test         = to_yaml($struct), 'to yaml';
+    ok my $final_struct = from_yaml($test), 'from yaml';
+    is_deeply $final_struct, $struct, 'from => to works';
+
+}
+
+SKIP: {
+    skip 'JSON is needed to run this test', 3
+      unless Dancer::ModuleLoader->load('JSON');
+    ok my $test         = to_json($struct), 'to json';
+    ok my $final_struct = from_json($test), 'from json';
+    is_deeply $final_struct, $struct, 'from => to works';
+
+}
+
+SKIP: {
+    skip 'XML::Simple is needed to run this test', 3
+      unless Dancer::ModuleLoader->load('XML::Simple');
+
+    skip 'XML::Parser or XML::SAX are needed to run this test', 3
+        unless Dancer::ModuleLoader->load('XML::Parser') or
+               Dancer::ModuleLoader->load('XML::SAX');
+
+    ok my $test         = to_xml($struct), 'to xml';
+    ok my $final_struct = from_xml($test), 'from xml';
+    is_deeply $final_struct, $struct, 'from => to works';
+}

Modified: branches/upstream/libdancer-perl/current/t/03_route_handler/02_before_filter.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/03_route_handler/02_before_filter.t?rev=65072&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/t/03_route_handler/02_before_filter.t (original)
+++ branches/upstream/libdancer-perl/current/t/03_route_handler/02_before_filter.t Sat Nov 20 14:04:40 2010
@@ -1,21 +1,46 @@
 use strict;
 use warnings;
 
-use Test::More tests => 13, import => ['!pass'];
+use Test::More tests => 16, import => ['!pass'];
 use Dancer ':syntax';
 use Dancer::Test;
 
-ok(before(sub {
-    params->{number} = 42;
-    var notice => "I am here";
-    request->path_info('/');
-}), 'before filter is defined');
+my $i = 0;
 
-ok(get('/' => sub {
-    is(params->{number}, 42, "params->{number} is set");
-    is("I am here", vars->{notice}, "vars->{notice} is set");
-    return 'index';
-}), 'index route is defined');
+ok(
+    before(
+        sub {
+            if ( request->path_info eq '/redirect_from' ) {
+                redirect('/redirect_to');
+            }
+            else {
+                params->{number} = 42;
+                var notice => "I am here";
+                request->path_info('/');
+            }
+        }
+    ),
+    'before filter is defined'
+);
+
+ok(
+    get(
+        '/' => sub {
+            is( params->{number}, 42,             "params->{number} is set" );
+            is( "I am here",      vars->{notice}, "vars->{notice} is set" );
+            return 'index';
+        }
+    ),
+    'index route is defined'
+);
+
+ok(
+    get(
+        '/redirect_from' => sub {
+            $i++;
+        }
+    )
+);
 
 route_exists [GET => '/'];
 response_exists [GET => '/'];
@@ -31,3 +56,9 @@
 
 response_content_is $request, 'index', 
     "which is the result of a redirection to /";
+
+response_headers_are_deeply [GET => '/redirect_from'], [
+    'Location' => 'http://localhost/redirect_to',
+];
+
+is $i, 0, 'never gone to redirect_from';

Added: branches/upstream/libdancer-perl/current/t/03_route_handler/30_bug_gh190.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/03_route_handler/30_bug_gh190.t?rev=65072&op=file
==============================================================================
--- branches/upstream/libdancer-perl/current/t/03_route_handler/30_bug_gh190.t (added)
+++ branches/upstream/libdancer-perl/current/t/03_route_handler/30_bug_gh190.t Sat Nov 20 14:04:40 2010
@@ -1,0 +1,18 @@
+use strict;
+use warnings;
+
+use Test::More tests => 6, import => ['!pass'];
+use Dancer ':syntax';
+use Dancer::Test;
+
+my $i = 0;
+
+ok( before( sub { redirect '/somewhere' } ) );
+
+ok( get( '/', sub { $i++; 'Hello' } ) );
+
+route_exists                [ GET => '/' ];
+response_headers_are_deeply [ GET => '/' ],
+  [ 'Location' => 'http://localhost/somewhere' ];
+response_content_is [ GET => '/' ], '';
+is $i, 0;

Modified: branches/upstream/libdancer-perl/current/t/12_response/03_charset.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/12_response/03_charset.t?rev=65072&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/t/12_response/03_charset.t (original)
+++ branches/upstream/libdancer-perl/current/t/12_response/03_charset.t Sat Nov 20 14:04:40 2010
@@ -70,6 +70,10 @@
     skip "XML::Simple is needed for this test" , 1
         unless Dancer::ModuleLoader->load('XML::Simple');
 
+    skip "XML::Parser or XML::SAX are needed to run this test", 1
+        unless Dancer::ModuleLoader->load('XML::Parser') or
+               Dancer::ModuleLoader->load('XML::SAX');
+
     setting serializer => 'XML';
     $res->{content_type} = 'text/xml';
     $res->{content} = { key => "\x{0429}" };




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