From e12fb19916d803aef89ac20a20af7b2e7f10ec06 Mon Sep 17 00:00:00 2001 From: ambs Date: Sun, 12 Jun 2011 15:53:17 +0100 Subject: [PATCH 1/6] Fix wrong number of tests in skip --- lib/Dancer/Test.pm | 2 +- t/03_route_handler/24_named_captures.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Dancer/Test.pm b/lib/Dancer/Test.pm index b057d032c..4eb8fa103 100644 --- a/lib/Dancer/Test.pm +++ b/lib/Dancer/Test.pm @@ -323,7 +323,7 @@ Content-Type: text/plain $l = length $content if defined $content; open my $in, '<', \$content; $ENV{'CONTENT_LENGTH'} = $l; - $ENV{'CONTENT_TYPE'} = $content_type; + $ENV{'CONTENT_TYPE'} = $content_type || ""; $ENV{'psgi.input'} = $in; } diff --git a/t/03_route_handler/24_named_captures.t b/t/03_route_handler/24_named_captures.t index f8754411a..cd6e4f28d 100644 --- a/t/03_route_handler/24_named_captures.t +++ b/t/03_route_handler/24_named_captures.t @@ -8,7 +8,7 @@ use Dancer::Test; plan tests => 2; SKIP: { - skip "Need perl >= 5.10", 3 unless $] >= 5.010; + skip "Need perl >= 5.10", 2 unless $] >= 5.010; my $route_regex = "/(? user | content | post )/(? delete | find )/(? \\d+ )"; From f5c34147ea8484ebbbc1625b8199a1d15f766101 Mon Sep 17 00:00:00 2001 From: ambs Date: Sun, 12 Jun 2011 16:06:19 +0100 Subject: [PATCH 2/6] Fix http://www.cpantesters.org/cpan/report/287474ca-9476-11e0-b30f-8a2c038aab15 --- t/14_serializer/01_helpers.t | 6 +++--- t/14_serializer/06_api.t | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/t/14_serializer/01_helpers.t b/t/14_serializer/01_helpers.t index 1c044ead1..44885a8fe 100644 --- a/t/14_serializer/01_helpers.t +++ b/t/14_serializer/01_helpers.t @@ -43,7 +43,7 @@ SKIP: { } SKIP: { - skip 'JSON is needed to run this test', 17 + skip 'JSON is needed to run this test', 16 unless Dancer::ModuleLoader->load('JSON'); # helpers syntax @@ -154,10 +154,10 @@ SKIP: { } SKIP: { - skip 'YAML is needed to run this test', 1 + skip 'YAML is needed to run this test', 7 unless Dancer::ModuleLoader->load('YAML'); - skip 'JSON is needed to run this test', 1 + skip 'JSON is needed to run this test', 7 unless Dancer::ModuleLoader->load('JSON'); setting( 'serializer' => 'Mutable' ); diff --git a/t/14_serializer/06_api.t b/t/14_serializer/06_api.t index 2209456f0..3d2a5a6f7 100644 --- a/t/14_serializer/06_api.t +++ b/t/14_serializer/06_api.t @@ -48,7 +48,7 @@ SKIP: { "application/json is not supported" ); } -{ +SKIP: { skip 'JSON is needed to run this test', 3 unless Dancer::ModuleLoader->load('JSON'); skip 'YAML is needed to run this test', 3 @@ -92,7 +92,7 @@ SKIP: { } # handler helper -{ +SKIP: { skip 'JSON is needed to run this test', 3 unless Dancer::ModuleLoader->load('JSON'); @@ -108,6 +108,7 @@ SKIP: { my $expected_params = { foo => '42', }; + # --- my $req = Dancer::Request->new( env => $env); is $req->body, $body, "body is untouched"; From fd927a216e548ab2661284e71a050ce0aec42c06 Mon Sep 17 00:00:00 2001 From: ambs Date: Sun, 12 Jun 2011 16:08:09 +0100 Subject: [PATCH 3/6] fix http://www.cpantesters.org/cpan/report/154e2de2-9475-11e0-92a5-c348c9b7ec30 --- t/14_serializer/99_bugs.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/14_serializer/99_bugs.t b/t/14_serializer/99_bugs.t index cbfc22c9e..4418bdd1a 100644 --- a/t/14_serializer/99_bugs.t +++ b/t/14_serializer/99_bugs.t @@ -8,7 +8,7 @@ use HTTP::Request; plan tests => 13; # issue 57829 -{ +SKIP: { skip 'JSON is needed to run this test', 2 unless Dancer::ModuleLoader->load('JSON'); @@ -21,7 +21,7 @@ plan tests => 13; } # issue gh-106 -{ +SKIP: { skip 'JSON is needed to run this test', 1 unless Dancer::ModuleLoader->load('JSON'); @@ -38,7 +38,7 @@ plan tests => 13; } # issue gh-299 -{ +SKIP: { skip 'JSON is needed to run this test', 5 unless Dancer::ModuleLoader->load('JSON'); @@ -59,7 +59,7 @@ plan tests => 13; # # Serializer issue: params hash not populated when the Content-Type is a # supported media type with additional parameters -{ +SKIP: { skip 'JSON is needed to run this test', 3 unless Dancer::ModuleLoader->load('JSON'); @@ -88,12 +88,12 @@ plan tests => 13; } # show errors -{ +SKIP: { skip 'JSON is needed to run this test', 2 unless Dancer::ModuleLoader->load('JSON'); set environment => 'production'; - + get '/with_errors' => sub { setting show_errors => 1; # bam! From c491ac81205fecba30cefd46f941994ec8b99188 Mon Sep 17 00:00:00 2001 From: ambs Date: Sun, 12 Jun 2011 16:11:07 +0100 Subject: [PATCH 4/6] Correct test bugs --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index f9c4bb6cd..5a47abb4c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ + + [ BUG FIXES ] + * Fix a bunch of cpan testers reports (Alberto Simões) + 1.3059_03 11.06.2011 [ BUG FIXES ] From 8cb5f239f279884c6f48d274ece62d37cdb79db7 Mon Sep 17 00:00:00 2001 From: Alexis Sukrieh Date: Sun, 12 Jun 2011 19:27:31 +0200 Subject: [PATCH 5/6] Update CHANGES --- CHANGES | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5a47abb4c..9f86c51d6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ +1.3059_04 12.06.2011 [ BUG FIXES ] - * Fix a bunch of cpan testers reports (Alberto Simões) + * Fix a bunch of cpan testers reports + (Alberto Simões) 1.3059_03 11.06.2011 From 3dc673a20b1ab3521c566d541dee29f04843aecd Mon Sep 17 00:00:00 2001 From: Alexis Sukrieh Date: Sun, 12 Jun 2011 19:27:46 +0200 Subject: [PATCH 6/6] Bump version in Dancer.pm --- lib/Dancer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Dancer.pm b/lib/Dancer.pm index d5326dc25..9c2127391 100644 --- a/lib/Dancer.pm +++ b/lib/Dancer.pm @@ -5,7 +5,7 @@ use warnings; use Carp; use Cwd 'realpath'; -our $VERSION = '1.3059_03'; +our $VERSION = '1.3059_04'; our $AUTHORITY = 'SUKRIA'; use Dancer::App;