r62077 - in /branches/upstream/libdancer-perl/current: ./ lib/ lib/Dancer/ script/ t/03_route_handler/ t/17_apps/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Aug 27 23:02:47 UTC 2010
Author: gregoa
Date: Fri Aug 27 23:02:23 2010
New Revision: 62077
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62077
Log:
[svn-upgrade] new version libdancer-perl (1.1809)
Modified:
branches/upstream/libdancer-perl/current/CHANGES
branches/upstream/libdancer-perl/current/META.yml
branches/upstream/libdancer-perl/current/lib/Dancer.pm
branches/upstream/libdancer-perl/current/lib/Dancer/Cookbook.pod
branches/upstream/libdancer-perl/current/lib/Dancer/Deployment.pod
branches/upstream/libdancer-perl/current/lib/Dancer/Route.pm
branches/upstream/libdancer-perl/current/script/dancer
branches/upstream/libdancer-perl/current/t/03_route_handler/24_named_captures.t
branches/upstream/libdancer-perl/current/t/17_apps/02_load_app.t
branches/upstream/libdancer-perl/current/t/17_apps/04_issue_91.t
Modified: branches/upstream/libdancer-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/CHANGES?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/CHANGES (original)
+++ branches/upstream/libdancer-perl/current/CHANGES Fri Aug 27 23:02:23 2010
@@ -1,3 +1,13 @@
+Dancer 1.1809
+
+ [ Franck Cuny ]
+ * update Deployement.pod and Cookbook.pod
+ * fix bug in route building with prefix
+ * don't use app.psgi anymore in generated scripts
+
+ [ Alexis Sukrieh ]
+ * fix plan for t/03_route_handler/24_named_captures.t
+
Dancer 1.1808
[ Alexis Sukrieh ]
Modified: branches/upstream/libdancer-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/META.yml?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/META.yml (original)
+++ branches/upstream/libdancer-perl/current/META.yml Fri Aug 27 23:02:23 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Dancer
-version: 1.1808
+version: 1.1809
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=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer.pm (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer.pm Fri Aug 27 23:02:23 2010
@@ -30,7 +30,7 @@
use base 'Exporter';
$AUTHORITY = 'SUKRIA';
-$VERSION = '1.1808';
+$VERSION = '1.1809';
@EXPORT = qw(
after
any
Modified: branches/upstream/libdancer-perl/current/lib/Dancer/Cookbook.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/lib/Dancer/Cookbook.pod?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer/Cookbook.pod (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer/Cookbook.pod Fri Aug 27 23:02:23 2010
@@ -451,6 +451,21 @@
template 'index.tt', {}, { layout => undef };
+If your application is not mounted under root (B</>), instead to
+hardocre the full path to your application path for the CSS, images,
+javascript, ... you can do this in your application:
+
+ before_template sub {
+ my $tokens = shift; $tokens->{uri_base} =
+ request->base;
+ };
+
+THen in your layout, modify your css inclusion as follows:
+
+ <link rel="stylesheet" href="<% uri_base %>/css/style.css" />
+
+From now on, you can mount your application wherever you want, without
+any further modification of the css inclusion
=head3 template and unicode
Modified: branches/upstream/libdancer-perl/current/lib/Dancer/Deployment.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/lib/Dancer/Deployment.pod?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer/Deployment.pod (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer/Deployment.pod Fri Aug 27 23:02:23 2010
@@ -20,6 +20,12 @@
http://localhost/myapp/dispatch.cgi/
200 OK - Right
+
+Start by adding the following to your apache configuration:
+
+ <VirtualHost *:80>
+ ScriptAlias /myapp /path/to/app/public/dispatch.cgi/
+ </VirtualHost>
Enable Pretty-URLs if your web server supports .htaccess files and mod_rewrite.
Place this code in a file called .htaccess in your application's root folder:
@@ -384,9 +390,15 @@
=head3 Running on lighttpd (FastCGI)
Make sure mod_fcgi is enabled. You also must install the FCGI module from
-CPAN. This example uses a port based virtual host.
-
- $SERVER["socket"] == ":5000" {
+CPAN.
+
+=head4 Script
+
+This example uses a script based virtual host.
+
+Your lighttpd configuration:
+
+ $HTTP["url"] == "^/app" {
fastcgi.server += (
".fcgi" => ((
"bin-path" => "/path/to/myapp/public/dispatch.fcgi",
@@ -396,4 +408,45 @@
alias.url += ("" => "/path/to/myapp/public/dispatch.fcgi")
}
-
+=head4 TCP/IP
+
+This example uses TCP/IP.
+
+Your lighttpd configuration:
+
+ $HTTP["url"] == "^/app" {
+ fastcgi.server += (
+ "/app" => (
+ "" => (
+ "host" => "127.0.0.1",
+ "port" => "5000",
+ "check-local" => "disable",
+ )
+ )
+ )
+ }
+
+Launch your application
+
+ plackup -s FCGI --port 8080 app.pl
+
+=head4 Unix socket
+
+This example uses a socket.
+
+Your lighttpd configuration:
+
+ $HTTP["url"] =~ "^/app" {
+ fastcgi.server += (
+ "/app" => (
+ "" => (
+ "socket" => "/tmp/fcgi.sock",
+ "check-local" => "disable",
+ )
+ )
+ )
+ }
+
+Launch your application:
+
+ plackup -s FCGI --listen /tmp/fcgi.sock app.pl
Modified: branches/upstream/libdancer-perl/current/lib/Dancer/Route.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/lib/Dancer/Route.pm?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/lib/Dancer/Route.pm (original)
+++ branches/upstream/libdancer-perl/current/lib/Dancer/Route.pm Fri Aug 27 23:02:23 2010
@@ -70,7 +70,7 @@
my $path = $request->path_info;
my %params;
- Dancer::Logger::core("trying to match `$path' "
+ Dancer::Logger::debug("trying to match `$path' "
. "against /"
. $self->{_compiled_regexp}
. "/");
@@ -216,8 +216,11 @@
}
}
else {
+ my $original_pattern = $self->pattern;
$self->{pattern} = $prefix . $self->pattern;
- $self->{pattern} =~ s/\/$//; # remove trailing slash
+ $self->{pattern} =~ s/\/$//
+ unless $original_pattern eq
+ '/'; # remove trailing slash unless the path is /
}
return $prefix;
Modified: branches/upstream/libdancer-perl/current/script/dancer
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/script/dancer?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/script/dancer (original)
+++ branches/upstream/libdancer-perl/current/script/dancer Fri Aug 27 23:02:23 2010
@@ -257,14 +257,14 @@
"dispatch.cgi" =>
"$PERL_INTERPRETER
use Plack::Runner;
-Plack::Runner->run('[% appdir %]/app.psgi');
+Plack::Runner->run('[% appdir %]/$DANCER_SCRIPT.pl');
",
"dispatch.fcgi" =>
"$PERL_INTERPRETER
use Plack::Handler::FCGI;
-my \$app = do('[% appdir %]/app.psgi');
+my \$app = do('[% appdir %]/$DANCER_SCRIPT.pl');
my \$server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);
\$server->run(\$app);
",
@@ -576,7 +576,6 @@
+ mywebapp/environments/development.yml
+ mywebapp/mywebapp.pm
+ mywebapp/mywebapp.pl
- + mywebapp/app.psgi
+ mywebapp/favicon.ico
The application is ready to serve:
Modified: branches/upstream/libdancer-perl/current/t/03_route_handler/24_named_captures.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/03_route_handler/24_named_captures.t?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/t/03_route_handler/24_named_captures.t (original)
+++ branches/upstream/libdancer-perl/current/t/03_route_handler/24_named_captures.t Fri Aug 27 23:02:23 2010
@@ -1,12 +1,13 @@
use strict;
use warnings;
-use Test::More import => ['!pass'], tests => 3;
+use Test::More import => ['!pass'];
use Dancer ':syntax';
use Dancer::Test;
# perl <= 5.8.x doesn't support named captures
plan skip_all => 'Need perl >= 5.10' if $] < 5.010;
+plan tests => 3;
my $route_regex = "/(?<class> user | content | post )/(?<action> delete | find )/(?<id> \\d+ )";
Modified: branches/upstream/libdancer-perl/current/t/17_apps/02_load_app.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/17_apps/02_load_app.t?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/t/17_apps/02_load_app.t (original)
+++ branches/upstream/libdancer-perl/current/t/17_apps/02_load_app.t Fri Aug 27 23:02:23 2010
@@ -31,4 +31,4 @@
"9 routes are defined in main app";
response_content_is [GET => "/forum/index"], "forum index";
-response_content_is [GET => "/forum"], "root";
+response_content_is [GET => "/forum/"], "root";
Modified: branches/upstream/libdancer-perl/current/t/17_apps/04_issue_91.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdancer-perl/current/t/17_apps/04_issue_91.t?rev=62077&op=diff
==============================================================================
--- branches/upstream/libdancer-perl/current/t/17_apps/04_issue_91.t (original)
+++ branches/upstream/libdancer-perl/current/t/17_apps/04_issue_91.t Fri Aug 27 23:02:23 2010
@@ -9,6 +9,6 @@
use Dancer ':syntax';
response_content_is [GET => "/"], "mainapp";
-response_content_is [GET => "/foo"], "before block in foo";
-response_content_is [GET => "/foo"], "before block in foo";
+response_content_is [GET => "/foo/"], "before block in foo";
+response_content_is [GET => "/foo/"], "before block in foo";
response_content_is [GET => "/"], "mainapp";
More information about the Pkg-perl-cvs-commits
mailing list