Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cd976ea79 | ||
|
|
1708622c49 | ||
|
|
380cea8aa2 | ||
|
|
9217818ad2 | ||
|
|
02fce2bfdd |
@@ -2,6 +2,12 @@ Revision history for Mojolicious::Plugin::TtRenderer
|
|||||||
|
|
||||||
{{$NEXT}}
|
{{$NEXT}}
|
||||||
|
|
||||||
|
1.41 February 23, 2013
|
||||||
|
- Additional testing diagnostics
|
||||||
|
|
||||||
|
1.40 February 20, 2013
|
||||||
|
- Added diagnostic for IO loop implementation in testing
|
||||||
|
|
||||||
1.39 January 28, 2013
|
1.39 January 28, 2013
|
||||||
- Documentation updates.
|
- Documentation updates.
|
||||||
|
|
||||||
|
|||||||
@@ -42,18 +42,16 @@ sub _init {
|
|||||||
# take and process options :-)
|
# take and process options :-)
|
||||||
|
|
||||||
my @renderer_paths = $app ? map { abs_path($_) } grep { -d $_ } @{ $app->renderer->paths } : ();
|
my @renderer_paths = $app ? map { abs_path($_) } grep { -d $_ } @{ $app->renderer->paths } : ();
|
||||||
|
push @renderer_paths, 'templates';
|
||||||
|
|
||||||
my %config = (
|
my %config = (
|
||||||
( @renderer_paths > 0
|
INCLUDE_PATH => \@renderer_paths,
|
||||||
? (INCLUDE_PATH => [@renderer_paths, 'templates'])
|
COMPILE_EXT => '.ttc',
|
||||||
: (INCLUDE_PATH => ['templates'])
|
COMPILE_DIR => ($dir || abs_path(File::Spec->tmpdir)),
|
||||||
),
|
UNICODE => 1,
|
||||||
COMPILE_EXT => '.ttc',
|
ENCODING => 'utf-8',
|
||||||
COMPILE_DIR => ($dir || abs_path(File::Spec->tmpdir)),
|
CACHE_SIZE => 128,
|
||||||
UNICODE => 1,
|
RELATIVE => 1,
|
||||||
ENCODING => 'utf-8',
|
|
||||||
CACHE_SIZE => 128,
|
|
||||||
RELATIVE => 1,
|
|
||||||
%{$args{template_options} || {}},
|
%{$args{template_options} || {}},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Test::More tests => 1;
|
||||||
|
use Mojo::IOLoop;
|
||||||
|
|
||||||
|
my $loop = eval { Mojo::IOLoop->singleton };
|
||||||
|
diag $@ if $@;
|
||||||
|
ok $loop;
|
||||||
|
diag ref eval { $loop->reactor };
|
||||||
|
diag $@ if $@;
|
||||||
|
|
||||||
@@ -21,11 +21,14 @@ $t->get_ok('/')
|
|||||||
->status_is(500)
|
->status_is(500)
|
||||||
->content_like(qr{foo});
|
->content_like(qr{foo});
|
||||||
|
|
||||||
|
$t->app->log->on(message => sub {
|
||||||
|
my($log, $level, @lines) = @_;
|
||||||
|
diag @lines if $level eq 'error';
|
||||||
|
});
|
||||||
|
|
||||||
$t->get_ok('/bar')
|
$t->get_ok('/bar')
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
->content_like(qr{bar});
|
->content_like(qr{sometimes, the bar,});
|
||||||
|
|
||||||
#note $t->tx->res->to_string;
|
|
||||||
|
|
||||||
__DATA__
|
__DATA__
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user