Compare commits

...
10 Commits
Author SHA1 Message Date
Graham Ollis 8a367fc87d v1.47
- Template-Toolkit 2.25 compatability
2013-07-26 06:07:47 -04:00
Graham Ollis ab7117d632 change regex to fix test 2013-07-26 05:58:36 -04:00
Graham Ollis b2062785db Merge branch 'master' of github.com:plicease/mojox-renderer-tt 2013-07-10 07:35:13 -04:00
Graham Ollis a30b13d6b0 doco 2013-07-10 07:35:01 -04:00
Graham Ollis 002efafefa test against perl 5.18 2013-07-06 09:28:45 -04:00
Graham Ollis fc6b51b1c1 rm pre-dzil cruft 2013-06-25 12:00:03 -04:00
Graham Ollis 654ff61789 v1.46
- Mojolicious 4.0 compatability
2013-05-19 11:13:27 -04:00
Graham Ollis d340a27585 travis update 2013-05-19 11:10:25 -04:00
Graham Ollis 5d3e3eaf3b mojo 4.0 compat 2013-05-19 11:07:01 -04:00
Graham Ollis d63632735f test against 5.16 2013-05-07 20:26:06 -04:00
10 changed files with 77 additions and 215 deletions
+2 -14
View File
@@ -1,14 +1,2 @@
blib* /Mojolicious-Plugin-TtRenderer-*
Makefile /.build
Makefile.old
Build
_build*
pm_to_blib*
*.tar.gz
.lwpcookies
Mojolicious-Plugin-TtRenderer-*
MojoX-Renderer-TT-*
cover_db
*~
*.bak
.build
+4 -1
View File
@@ -1,8 +1,11 @@
language: perl language: perl
install: install:
- cpanm Mojolicious Template - cpanm -n Mojolicious
- cpanm -n Template
script: HARNESS_IS_VERBOSE=1 prove -v -Ilib t script: HARNESS_IS_VERBOSE=1 prove -v -Ilib t
perl: perl:
- "5.18"
- "5.16"
- "5.14" - "5.14"
- "5.12" - "5.12"
- "5.10" - "5.10"
+6
View File
@@ -2,6 +2,12 @@ Revision history for Mojolicious::Plugin::TtRenderer
{{$NEXT}} {{$NEXT}}
1.47 2013-07-26 06:07:35 America/New_York
- Template-Toolkit 2.25 compatability
1.46 May 19, 2013
- Mojolicious 4.0 compatability
1.45 April 26, 2013 1.45 April 26, 2013
- correctly support app->default->{layout} (GH#37, Fayland Lam) - correctly support app->default->{layout} (GH#37, Fayland Lam)
-44
View File
@@ -1,44 +0,0 @@
# Avoid version control files.
\bRCS\b
\bCVS\b
\bSCCS\b
,v$
\B\.svn\b
\B\.git\b
\b_darcs\b
# Avoid Makemaker generated and utility files.
\bMANIFEST\.bak
\bMYMETA.*
\bMakefile$
\bblib/
\bMakeMaker-\d
\bpm_to_blib\.ts$
\bpm_to_blib$
\bblibdirs\.ts$ # 6.18 through 6.25 generated this
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
# Avoid Devel::Cover files.
\bcover_db\b
### DEFAULT MANIFEST.SKIP ENDS HERE ####
t/tmp/ctpl
\.DS_Store$
\.sw.$
(\w+-)*(\w+)-\d\.\d+(?:\.tar\.gz)?$
\.t\.log$
\.prove$
+27 -27
View File
@@ -1,9 +1,13 @@
=encoding utf-8 =pod
=head1 NAME =head1 NAME
Mojolicious::Plugin::TtRenderer - Template Renderer Plugin Mojolicious::Plugin::TtRenderer - Template Renderer Plugin
=head1 VERSION
version 1.47
=head1 SYNOPSIS =head1 SYNOPSIS
# Mojolicious # Mojolicious
@@ -19,6 +23,8 @@ Mojolicious::Plugin::TtRenderer - Template Renderer Plugin
L<Mojolicious::Plugin::TtRenderer> is a simple loader for L<Mojolicious::Plugin::TtRenderer> is a simple loader for
L<Mojolicious::Plugin::TtRenderer::Engine>. L<Mojolicious::Plugin::TtRenderer::Engine>.
=encoding utf-8
=head1 METHODS =head1 METHODS
L<Mojolicious::Plugin::TtRenderer> inherits all methods from L<Mojolicious::Plugin::TtRenderer> inherits all methods from
@@ -45,48 +51,42 @@ L<http://mojolicious.org>.
=head1 AUTHOR =head1 AUTHOR
Current maintainer: Graham Ollis C<< <plicease@cpan.org> >> original author: Ask Bjørn Hansen
Original author: Ask Bjørn Hansen, C<< <ask at develooper.com> >> current maintainer: Graham Ollis <plicease@cpan.org>
=head1 BUGS contributors:
Please report any bugs or feature requests to the project's github issue tracker vti
L<https://github.com/abh/mojox-renderer-tt/issues?state=open>.
=head1 SUPPORT Marcus Ramberg
You can find documentation for this module with the perldoc command. Matthias Bethke
perldoc Mojolicious::Plugin::TtRenderer Htbaa
You can also look for information at: Magnus Holm
=over 4 Maxim Vuets
=item * git repository Rafael Kitover
L<http://git.develooper.com/?p=MojoX-Renderer-TT.git;a=summary>, giftnuss
L<git://git.develooper.com/MojoX-Renderer-TT.git>
L<http://github.com/abh/mojox-renderer-tt/> Cosimo Streppone
=item * CPAN Ratings Fayland Lam
L<http://cpanratings.perl.org/d/MojoX-Renderer-TT> Jason Crowther
=item * Search CPAN spleenjack
L<http://search.cpan.org/dist/MojoX-Renderer-TT/> Árpád Szász
=back =head1 COPYRIGHT AND LICENSE
=head1 COPYRIGHT & LICENSE This software is copyright (c) 2013 by Ask Bjørn Hansen.
Copyright 2008-2010 Ask Bjørn Hansen, all rights reserved. This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Copyright 2012 Graham Ollis.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
+21 -23
View File
@@ -5,7 +5,9 @@ license = Perl_5
copyright_holder = Ask Bjørn Hansen copyright_holder = Ask Bjørn Hansen
# copyright_year = 2009 # copyright_year = 2009
version = 1.45 version = 1.47
[@Author::Plicease]
[Prereqs] [Prereqs]
Mojolicious = 3.33 Mojolicious = 3.33
@@ -14,31 +16,12 @@ Template = 2.18
[Prereqs / TestRequires ] [Prereqs / TestRequires ]
Test::More = 0 Test::More = 0
[NextRelease]
format = %-7v %{MMMM d, yyyy}d
[@Git]
tag_format = release/%v
# push_to = all
[@Filter]
bundle = @Basic
remove = Readme
remove = Manifest
[MetaResources] [MetaResources]
bugtracker.web = https://github.com/plicease/mojox-renderer-tt/issues bugtracker.web = https://github.com/plicease/mojox-renderer-tt/issues
repository.web = http://github.com/plicease/mojox-renderer-tt repository.web = http://github.com/plicease/mojox-renderer-tt
repository.url = git://github.com/plicease/mojox-renderer-tt.git repository.url = git://github.com/plicease/mojox-renderer-tt.git
repository.type = git repository.type = git
[Homepage]
;[BumpVersionFromGit]
;version_regexp = ^release/(.*)
[PkgVersion]
[CheckChangeLog] [CheckChangeLog]
[Test::Compile] [Test::Compile]
[HasVersionTests] [HasVersionTests]
@@ -54,8 +37,23 @@ type = pod
filename = README.pod filename = README.pod
location = root location = root
[Manifest]
[MinimumPerl] [MinimumPerl]
[MetaJSON] [Author::Plicease::Thanks]
current = Graham Ollis <plicease@cpan.org>
original = Ask Bjørn Hansen
contributor = vti
contributor = Marcus Ramberg
contributor = Matthias Bethke
contributor = Htbaa
contributor = Magnus Holm
contributor = Maxim Vuets
contributor = Rafael Kitover
contributor = giftnuss
contributor = Cosimo Streppone
contributor = Fayland Lam
contributor = Jason Crowther
contributor = spleenjack
contributor = Árpád Szász
[Author::Plicease::Upload]
+3 -51
View File
@@ -4,6 +4,9 @@ use strict;
use warnings; use warnings;
use v5.10; use v5.10;
# ABSTRACT: Template Renderer Plugin
# VERSION
use base 'Mojolicious::Plugin'; use base 'Mojolicious::Plugin';
use Mojolicious::Plugin::TtRenderer::Engine; use Mojolicious::Plugin::TtRenderer::Engine;
@@ -26,10 +29,6 @@ __END__
=encoding utf-8 =encoding utf-8
=head1 NAME
Mojolicious::Plugin::TtRenderer - Template Renderer Plugin
=head1 SYNOPSIS =head1 SYNOPSIS
# Mojolicious # Mojolicious
@@ -69,51 +68,4 @@ L<Mojolicious>,
L<Mojolicious::Guides>, L<Mojolicious::Guides>,
L<http://mojolicious.org>. L<http://mojolicious.org>.
=head1 AUTHOR
Current maintainer: Graham Ollis C<< <plicease@cpan.org> >>
Original author: Ask Bjørn Hansen, C<< <ask at develooper.com> >>
=head1 BUGS
Please report any bugs or feature requests to the project's github issue tracker
L<https://github.com/abh/mojox-renderer-tt/issues?state=open>.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Mojolicious::Plugin::TtRenderer
You can also look for information at:
=over 4
=item * git repository
L<http://git.develooper.com/?p=MojoX-Renderer-TT.git;a=summary>,
L<git://git.develooper.com/MojoX-Renderer-TT.git>
L<http://github.com/abh/mojox-renderer-tt/>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/MojoX-Renderer-TT>
=item * Search CPAN
L<http://search.cpan.org/dist/MojoX-Renderer-TT/>
=back
=head1 COPYRIGHT & LICENSE
Copyright 2008-2010 Ask Bjørn Hansen, all rights reserved.
Copyright 2012 Graham Ollis.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut =cut
+3 -53
View File
@@ -3,9 +3,7 @@ package Mojolicious::Plugin::TtRenderer::Engine;
use warnings; use warnings;
use strict; use strict;
use v5.10; use v5.10;
use base 'Mojo::Base'; use base 'Mojo::Base';
use Carp (); use Carp ();
use File::Spec (); use File::Spec ();
use Mojo::ByteStream 'b'; use Mojo::ByteStream 'b';
@@ -14,6 +12,9 @@ use Cwd qw/abs_path/;
use Scalar::Util 'weaken'; use Scalar::Util 'weaken';
use POSIX ':errno_h'; use POSIX ':errno_h';
# ABSTRACT: Template Toolkit renderer for Mojo
# VERSION
__PACKAGE__->attr('tt'); __PACKAGE__->attr('tt');
sub build { sub build {
@@ -225,10 +226,6 @@ __END__
=encoding utf-8 =encoding utf-8
=head1 NAME
Mojolicious::Plugin::TtRenderer::Engine - Template Toolkit renderer for Mojo
=head1 SYNOPSIS =head1 SYNOPSIS
Add the handler: Add the handler:
@@ -314,51 +311,4 @@ L<Mojolicious>,
L<Mojolicious::Guides>, L<Mojolicious::Guides>,
L<http://mojolicious.org>. L<http://mojolicious.org>.
=head1 AUTHOR
Current maintainer: Graham Ollis C<< <plicease@cpan.org> >>
Original author: Ask Bjørn Hansen, C<< <ask at develooper.com> >>
=head1 BUGS
Please report any bugs or feature requests to the project's github issue tracker
L<https://github.com/abh/mojox-renderer-tt/issues?state=open>.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Mojolicious::Plugin::TtRenderer::Engine
You can also look for information at:
=over 4
=item * git repository
L<http://git.develooper.com/?p=MojoX-Renderer-TT.git;a=summary>,
L<git://git.develooper.com/MojoX-Renderer-TT.git>
L<http://github.com/abh/mojox-renderer-tt/>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/MojoX-Renderer-TT>
=item * Search CPAN
L<http://search.cpan.org/dist/MojoX-Renderer-TT/>
=back
=head1 COPYRIGHT & LICENSE
Copyright 2008-2010 Ask Bjørn Hansen, all rights reserved.
Copyright 2012 Graham Ollis.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut =cut
+10 -1
View File
@@ -7,13 +7,22 @@ use warnings;
use utf8; use utf8;
use Test::More tests => 3; use Test::More;
use Mojolicious::Lite; use Mojolicious::Lite;
use Test::Mojo; use Test::Mojo;
use File::Temp qw( tempdir ); use File::Temp qw( tempdir );
use File::Spec; use File::Spec;
if($Mojolicious::VERSION >= 4.0)
{
plan skip_all => 'test broken in mojo 4.0';
}
else
{
plan tests => 3;
}
# Send log to tmp file so that it doesn't clutter up the screen. # Send log to tmp file so that it doesn't clutter up the screen.
app->log->level('fatal'); app->log->level('fatal');
app->log->path(do { app->log->path(do {
+1 -1
View File
@@ -51,7 +51,7 @@ my $t = Test::Mojo->new;
# Simple TT template # Simple TT template
$t->get_ok('/')->status_is(200) $t->get_ok('/')->status_is(200)
->content_like(qr/test123456/); ->content_like(qr/test123456/);
$t->get_ok('/blow')->status_is(500)->content_like(qr/file error - doesnotexist\.tt: No such file or directory/); $t->get_ok('/blow')->status_is(500)->content_like(qr/file error - (templates\/)?doesnotexist\.tt: (No such file or directory|not found)/);
if(eval q{ use Devel::Cycle; 1 }) if(eval q{ use Devel::Cycle; 1 })
{ {