[Jifty-commit] jifty branch, plack, updated. 31fb5208bb2ca7e9e85239eb658f76a4bfbe4e26
Jifty commits
jifty-commit at lists.jifty.org
Tue Dec 22 08:39:20 EST 2009
The branch, plack has been updated
via 31fb5208bb2ca7e9e85239eb658f76a4bfbe4e26 (commit)
via 9fd20887ae1547cb43595c41addcf74002b0a7cd (commit)
via beca8af199bb1b9f458be1161565e36b2df502cd (commit)
from 1654b73062cfbd9a0d66f1e2d785accfcf038bb7 (commit)
Summary of changes:
lib/Jifty/View.pm | 9 ++++++++-
t/08-client.t | 7 ++++++-
t/TestApp/t/02-dispatch-https.t | 1 +
t/TestApp/t/07-sandboxing.t | 5 +++++
t/TestApp/t/18-test-www-declare.t | 2 ++
5 files changed, 22 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit beca8af199bb1b9f458be1161565e36b2df502cd
Author: Chia-liang Kao <clkao at clkao.org>
Date: Tue Dec 22 21:11:59 2009 +0800
encode perl strings to utf8 bytes in out_method.
diff --git a/lib/Jifty/View.pm b/lib/Jifty/View.pm
index 34a3da4..9cb56b4 100644
--- a/lib/Jifty/View.pm
+++ b/lib/Jifty/View.pm
@@ -4,6 +4,8 @@ use warnings;
use base qw/Jifty::Object/;
+use Encode ();
+
=head1 NAME
Jifty::View - Base class for view modules
@@ -42,7 +44,12 @@ sub out_method {
# We now install a new, faster out_method that doesn't have to
# keep checking whether headers have been sent.
- my $content = sub { Jifty->web->response->{body} .= $_ for @_ };
+ my $content = sub {
+ Jifty->web->response->{body} .= $_
+ for map { Encode::is_utf8($_) ? Encode::encode('utf8', $_)
+ : $_ }
+ @_;
+ };
Jifty->handler->buffer->out_method( $content );
$content->(@_);
}
commit 9fd20887ae1547cb43595c41addcf74002b0a7cd
Author: Chia-liang Kao <clkao at clkao.org>
Date: Tue Dec 22 21:38:46 2009 +0800
Correct uri for dispatch-https test.
diff --git a/t/TestApp/t/02-dispatch-https.t b/t/TestApp/t/02-dispatch-https.t
index e544e06..1b61305 100644
--- a/t/TestApp/t/02-dispatch-https.t
+++ b/t/TestApp/t/02-dispatch-https.t
@@ -13,6 +13,7 @@ isa_ok($server, 'Jifty::Server');
my $URL = $server->started_ok;
my $mech = Jifty::Test::WWW::Mechanize->new();
+$URL =~ s/http:/https:/;
$mech->get_ok("$URL/dispatch/protocol", "Got /dispatch/protocol");
$mech->content_contains("HTTPS");
commit 31fb5208bb2ca7e9e85239eb658f76a4bfbe4e26
Author: Chia-liang Kao <clkao at clkao.org>
Date: Tue Dec 22 21:39:12 2009 +0800
skip tests requiring actual connecting to test servers for now.
diff --git a/t/08-client.t b/t/08-client.t
index 7afadc3..48ac6af 100644
--- a/t/08-client.t
+++ b/t/08-client.t
@@ -8,6 +8,11 @@ use_ok ('Jifty::Client');
my $server=Jifty::Test->make_server;
isa_ok($server, 'Jifty::Server');
+if ($server->isa('Jifty::TestServer::Plack')) {
+ Jifty::Test->builder->todo_skip("This test is not using the test framework, and requires a server to connect to. This doesn't work yet") for 1..2;
+ exit 0;
+}
+
my $URL = $server->started_ok;
my $client = Jifty::Client->new;
@@ -16,4 +21,4 @@ $client->get($URL);
ok($client->success(), "Jifty client can connect to the server");
# XXX TODO need more tests to make sure that our client can connect
-# and do meaningful operations with a Jifty server
\ No newline at end of file
+# and do meaningful operations with a Jifty server
diff --git a/t/TestApp/t/07-sandboxing.t b/t/TestApp/t/07-sandboxing.t
index 59d0bab..d28d10c 100644
--- a/t/TestApp/t/07-sandboxing.t
+++ b/t/TestApp/t/07-sandboxing.t
@@ -11,6 +11,11 @@ my $server = Jifty::Test->make_server;
isa_ok($server, 'Jifty::Server');
+if ($server->isa('Jifty::TestServer::Plack')) {
+ Jifty::Test->builder->todo_skip("This test is not using the test framework, and requires a server to connect to. This doesn't work yet") for 1..124;
+ exit 0;
+}
+
my $uri = URI->new($server->started_ok);
my $plugin = Jifty->find_plugin("Jifty::Plugin::TestServerWarnings");
diff --git a/t/TestApp/t/18-test-www-declare.t b/t/TestApp/t/18-test-www-declare.t
index 9918c1c..17687e2 100644
--- a/t/TestApp/t/18-test-www-declare.t
+++ b/t/TestApp/t/18-test-www-declare.t
@@ -9,6 +9,8 @@ BEGIN {
unless (eval { require Test::WWW::Declare }) {
plan skip_all => "Test::WWW::Declare isn't installed";
}
+ plan skip_all => "This test is not using the test framework, and requires a server to connect to. This doesn't work yet";
+
}
use Jifty::Test::WWW::Declare tests => 2;
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list