Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2017-03-13 15:28:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious" Mon Mar 13 15:28:00 2017 rev:64 rq:477881 version:7.28 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2017-03-03 14:36:02.481663204 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2017-03-13 15:28:02.472426173 +0100 @@ -1,0 +2,12 @@ +Wed Mar 8 07:08:26 UTC 2017 - co...@suse.com + +- updated to 7.28 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 7.28 2017-03-07 + - Added copy_to, realpath and sibling methods to Mojo::File. + - Added dir option to list_tree method in Mojo::File. + - Improved app generator command to generate a config file. + (tudorconstantin) + +------------------------------------------------------------------- Old: ---- Mojolicious-7.27.tar.gz New: ---- Mojolicious-7.28.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.kCHs29/_old 2017-03-13 15:28:03.232318771 +0100 +++ /var/tmp/diff_new_pack.kCHs29/_new 2017-03-13 15:28:03.236318206 +0100 @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 7.27 +Version: 7.28 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework ++++++ Mojolicious-7.27.tar.gz -> Mojolicious-7.28.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/Changes new/Mojolicious-7.28/Changes --- old/Mojolicious-7.27/Changes 2017-02-27 12:53:24.000000000 +0100 +++ new/Mojolicious-7.28/Changes 2017-03-07 22:17:16.000000000 +0100 @@ -1,4 +1,10 @@ +7.28 2017-03-07 + - Added copy_to, realpath and sibling methods to Mojo::File. + - Added dir option to list_tree method in Mojo::File. + - Improved app generator command to generate a config file. + (tudorconstantin) + 7.27 2017-02-27 - Added support for UNIX domain sockets. (sri, salva) - Improved Mojo::UserAgent to complain about unsupported protocols. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/META.json new/Mojolicious-7.28/META.json --- old/Mojolicious-7.27/META.json 2017-02-27 18:01:40.000000000 +0100 +++ new/Mojolicious-7.28/META.json 2017-03-07 22:35:59.000000000 +0100 @@ -58,6 +58,6 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "7.27", + "version" : "7.28", "x_serialization_backend" : "JSON::PP version 2.27400" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/META.yml new/Mojolicious-7.28/META.yml --- old/Mojolicious-7.27/META.yml 2017-02-27 18:01:40.000000000 +0100 +++ new/Mojolicious-7.28/META.yml 2017-03-07 22:35:59.000000000 +0100 @@ -31,5 +31,5 @@ homepage: http://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/kraih/mojo.git -version: '7.27' +version: '7.28' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojo/File.pm new/Mojolicious-7.28/lib/Mojo/File.pm --- old/Mojolicious-7.27/lib/Mojo/File.pm 2017-02-06 00:47:22.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojo/File.pm 2017-03-07 22:17:16.000000000 +0100 @@ -10,9 +10,9 @@ use Cwd 'getcwd'; use Exporter 'import'; use File::Basename (); -use File::Copy (); -use File::Find (); -use File::Path (); +use File::Copy qw(copy move); +use File::Find 'find'; +use File::Path (); use File::Spec::Functions qw(abs2rel canonpath catfile file_name_is_absolute rel2abs splitdir); use File::Temp (); @@ -21,10 +21,16 @@ our @EXPORT_OK = ('path', 'tempdir', 'tempfile'); -sub basename { scalar File::Basename::basename ${$_[0]}, @_ } +sub basename { File::Basename::basename ${$_[0]}, @_ } sub child { $_[0]->new(@_) } +sub copy_to { + my ($self, $to) = @_; + copy($$self, $to) or croak qq{Can't copy file "$$self" to "$to": $!}; + return $self->new(-d $to ? ($to, File::Basename::basename $self) : $to); +} + sub dirname { $_[0]->new(scalar File::Basename::dirname ${$_[0]}) } sub is_abs { file_name_is_absolute ${shift()} } @@ -48,14 +54,14 @@ # This may break in the future, but is worth it for performance local $File::Find::skip_pattern = qr/^\./ unless $options->{hidden}; - my %files; - my $w = sub { $files{$File::Find::name}++ }; - my $p = sub { delete $files{$File::Find::dir} }; - File::Find::find {wanted => $w, postprocess => $p, no_chdir => 1}, $$self - if -d $$self; + my %all; + my $wanted = {wanted => sub { $all{$File::Find::name}++ }, no_chdir => 1}; + $wanted->{postprocess} = sub { delete $all{$File::Find::dir} } + unless $options->{dir}; + find $wanted, $$self if -d $$self; + delete $all{$$self}; - return Mojo::Collection->new(map { $self->new(canonpath($_)) } - sort keys %files); + return Mojo::Collection->new(map { $self->new(canonpath $_) } sort keys %all); } sub make_path { @@ -66,9 +72,8 @@ sub move_to { my ($self, $to) = @_; - File::Copy::move($$self, $to) - or croak qq{Can't move file "$$self" to "$to": $!}; - return $self; + move($$self, $to) or croak qq{Can't move file "$$self" to "$to": $!}; + return $self->new(-d $to ? ($to, File::Basename::basename $self) : $to); } sub new { @@ -86,12 +91,19 @@ sub path { __PACKAGE__->new(@_) } +sub realpath { $_[0]->new(Cwd::realpath ${$_[0]}) } + sub remove_tree { my $self = shift; File::Path::remove_tree $$self, @_; return $self; } +sub sibling { + my $self = shift; + return $self->new(scalar File::Basename::dirname($self), @_); +} + sub slurp { my $self = shift; @@ -140,8 +152,9 @@ # Portably deal with file system paths my $path = Mojo::File->new('/home/sri/.vimrc'); say $path->slurp; + say $path->dirname; say $path->basename; - say $path->dirname->child('.bashrc'); + say $path->sibling('.bashrc'); # Use the alternative constructor use Mojo::File 'path'; @@ -223,6 +236,14 @@ # "/home/sri/.vimrc" (on UNIX) path('/home')->child('sri', '.vimrc'); +=head2 copy_to + + my $destination = $path->copy_to('/home/sri'); + my $destination = $path->copy_to('/home/sri/.vimrc.backup'); + +Copy file with L<File::Copy> and return the destination as a L<Mojo::File> +object. + =head2 dirname my $name = $path->dirname; @@ -291,6 +312,12 @@ =over 2 +=item dir + + dir => 1 + +Include directories. + =item hidden hidden => 1 @@ -309,9 +336,11 @@ =head2 move_to - $path = $path->move_to('/home/sri/.vimrc.backup'); + my $destination = $path->move_to('/home/sri'); + my $destination = $path->move_to('/home/sri/.vimrc.backup'); -Move the file with L<File::Copy>. +Move file with L<File::Copy> and return the destination as a L<Mojo::File> +object. =head2 new @@ -340,6 +369,12 @@ use Fcntl qw(O_CREAT O_EXCL O_RDWR); my $handle = path('/home/sri/test.pl')->open(O_RDWR | O_CREAT | O_EXCL); +=head2 realpath + + my $realpath = $path->realpath; + +Resolve the path with L<Cwd> and return the result as a L<Mojo::File> object. + =head2 remove_tree $path = $path->remove_tree; @@ -348,6 +383,18 @@ Delete this directory and any files and subdirectories it may contain, any additional arguments are passed through to L<File::Path>. +=head2 sibling + + my $sibling = $path->sibling('.vimrc'); + +Return a new L<Mojo::File> object relative to the directory part of the path. + + # "/home/sri/.vimrc" (on UNIX) + path('/home/sri/.bashrc')->sibling('.vimrc'); + + # "/home/sri/.ssh/known_hosts" (on UNIX) + path('/home/sri/.bashrc')->sibling('.ssh', 'known_hosts'); + =head2 slurp my $bytes = $path->slurp; @@ -371,7 +418,8 @@ my $absolute = $path->to_abs; -Return the canonical path as a L<Mojo::File> object. +Return absolute path as a L<Mojo::File> object, the path does not need to exist +on the file system. =head2 to_array diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojo/Home.pm new/Mojolicious-7.28/lib/Mojo/Home.pm --- old/Mojolicious-7.27/lib/Mojo/Home.pm 2017-02-22 10:42:34.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojo/Home.pm 2017-03-05 23:05:41.000000000 +0100 @@ -38,7 +38,7 @@ ->to_array; } -sub mojo_lib_dir { shift->new(__FILE__)->dirname->child('..') } +sub mojo_lib_dir { shift->new(__FILE__)->sibling('..') } # DEPRECATED! sub parse { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojo/IOLoop/TLS.pm new/Mojolicious-7.28/lib/Mojo/IOLoop/TLS.pm --- old/Mojolicious-7.27/lib/Mojo/IOLoop/TLS.pm 2017-02-15 18:20:16.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojo/IOLoop/TLS.pm 2017-03-05 23:05:14.000000000 +0100 @@ -16,8 +16,8 @@ # To regenerate the certificate run this command (18.04.2012) # openssl req -new -x509 -keyout server.key -out server.crt -nodes -days 7300 -my $CERT = path(__FILE__)->dirname->child('resources', 'server.crt')->to_string; -my $KEY = path(__FILE__)->dirname->child('resources', 'server.key')->to_string; +my $CERT = path(__FILE__)->sibling('resources', 'server.crt')->to_string; +my $KEY = path(__FILE__)->sibling('resources', 'server.key')->to_string; sub DESTROY { shift->_cleanup } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojo/Loader.pm new/Mojolicious-7.28/lib/Mojo/Loader.pm --- old/Mojolicious-7.27/lib/Mojo/Loader.pm 2017-01-09 18:47:43.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojo/Loader.pm 2017-03-04 19:33:34.000000000 +0100 @@ -171,9 +171,9 @@ my $e = load_class 'Foo::Bar'; Load a class and catch exceptions, returns a false value if loading was -successful, a true value if the class has already been loaded, or a -L<Mojo::Exception> object if loading failed. Note that classes are checked for a -C<new> method to see if they are already loaded. +successful, a true value if the class was not found, or a L<Mojo::Exception> +object if loading failed. Note that classes are checked for a C<new> method to +see if they are already loaded. # Handle exceptions if (my $e = load_class 'Foo::Bar') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojo/Server/Hypnotoad.pm new/Mojolicious-7.28/lib/Mojo/Server/Hypnotoad.pm --- old/Mojolicious-7.27/lib/Mojo/Server/Hypnotoad.pm 2017-02-22 14:59:01.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojo/Server/Hypnotoad.pm 2017-03-05 23:04:56.000000000 +0100 @@ -49,7 +49,7 @@ # Preload application and configure server my $prefork = $self->prefork->cleanup(0); $prefork->load_app($app)->config->{hypnotoad}{pid_file} - //= path($ENV{HYPNOTOAD_APP})->dirname->child('hypnotoad.pid')->to_string; + //= path($ENV{HYPNOTOAD_APP})->sibling('hypnotoad.pid')->to_string; $self->configure('hypnotoad'); weaken $self; $prefork->on(wait => sub { $self->_manage }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojolicious/Command/generate/app.pm new/Mojolicious-7.28/lib/Mojolicious/Command/generate/app.pm --- old/Mojolicious-7.27/lib/Mojolicious/Command/generate/app.pm 2017-01-19 11:06:12.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojolicious/Command/generate/app.pm 2017-03-05 20:01:27.000000000 +0100 @@ -25,6 +25,9 @@ my $app = class_to_path $class; $self->render_to_rel_file('appclass', "$name/lib/$app", $class); + # Config file + $self->render_to_rel_file('config', "$name/$name.conf"); + # Controller my $controller = "${class}::Controller::Example"; my $path = class_to_path $controller; @@ -133,8 +136,11 @@ sub startup { my $self = shift; + # Load configuration from hash returned by "my_app.conf" + my $config = $self->plugin('Config'); + # Documentation browser under "/perldoc" - $self->plugin('PODRenderer'); + $self->plugin('PODRenderer') if $config->{perldoc}; # Router my $r = $self->routes; @@ -196,9 +202,20 @@ %% layout 'default'; %% title 'Welcome'; <h2><%%= $msg %></h2> -This page was generated from the template "templates/example/welcome.html.ep" -and the layout "templates/layouts/default.html.ep", -<%%= link_to 'click here' => url_for %> to reload the page or -<%%= link_to 'here' => '/index.html' %> to move forward to a static page. To -learn more, you can also browse through the documentation -<%%= link_to 'here' => '/perldoc' %>. +<p> + This page was generated from the template "templates/example/welcome.html.ep" + and the layout "templates/layouts/default.html.ep", + <%%= link_to 'click here' => url_for %> to reload the page or + <%%= link_to 'here' => '/index.html' %> to move forward to a static page. + %% if (config 'perldoc') { + To learn more, you can also browse through the documentation + <%%= link_to 'here' => '/perldoc' %>. + %% } +</p> + +@@ config +% use Mojo::Util qw(sha1_sum steady_time); +{ + perldoc => 1, + secrets => ['<%= sha1_sum $$ . steady_time . rand %>'] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojolicious/Guides/Cookbook.pod new/Mojolicious-7.28/lib/Mojolicious/Guides/Cookbook.pod --- old/Mojolicious-7.27/lib/Mojolicious/Guides/Cookbook.pod 2017-02-24 16:06:34.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojolicious/Guides/Cookbook.pod 2017-03-05 23:07:49.000000000 +0100 @@ -1686,7 +1686,7 @@ my $self = shift; # Switch to installable home directory - $self->home(Mojo::Home->new(path(__FILE__)->dirname->child('MyApp'))); + $self->home(Mojo::Home->new(path(__FILE__)->sibling('MyApp'))); # Switch to installable "public" directory $self->static->paths->[0] = $self->home->child('public'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojolicious/Guides/Rendering.pod new/Mojolicious-7.28/lib/Mojolicious/Guides/Rendering.pod --- old/Mojolicious-7.27/lib/Mojolicious/Guides/Rendering.pod 2017-02-04 12:38:21.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojolicious/Guides/Rendering.pod 2017-03-05 23:05:31.000000000 +0100 @@ -1159,7 +1159,7 @@ my ($self, $app) = @_; # Append "templates" and "public" directories - my $base = path(__FILE__)->dirname->child('AlertAssets'); + my $base = path(__FILE__)->sibling('AlertAssets'); push @{$app->renderer->paths}, $base->child('templates')->to_string; push @{$app->static->paths}, $base->child('public')->to_string; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/lib/Mojolicious.pm new/Mojolicious-7.28/lib/Mojolicious.pm --- old/Mojolicious-7.27/lib/Mojolicious.pm 2017-02-22 17:28:45.000000000 +0100 +++ new/Mojolicious-7.28/lib/Mojolicious.pm 2017-03-05 22:38:27.000000000 +0100 @@ -58,7 +58,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Doughnut'; -our $VERSION = '7.27'; +our $VERSION = '7.28'; sub AUTOLOAD { my $self = shift; @@ -1074,6 +1074,8 @@ Tomas Znamenacek +Tudor Constantin + Ulrich Habel Ulrich Kautz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/t/mojo/file.t new/Mojolicious-7.28/t/mojo/file.t --- old/Mojolicious-7.27/t/mojo/file.t 2017-02-24 11:37:37.000000000 +0100 +++ new/Mojolicious-7.28/t/mojo/file.t 2017-03-07 22:17:16.000000000 +0100 @@ -1,7 +1,7 @@ use Mojo::Base -strict; use Test::More; -use Cwd 'getcwd'; +use Cwd qw(getcwd realpath); use Fcntl 'O_RDONLY'; use File::Basename qw(basename dirname); use File::Spec::Functions qw(abs2rel canonpath catfile rel2abs splitdir); @@ -24,6 +24,10 @@ is path('foo', 'bar')->child('baz', 'yada'), catfile(catfile('foo', 'bar'), 'baz', 'yada'), 'same path'; +# Siblings +is path('foo', 'bar')->sibling('baz', 'yada'), + catfile(scalar dirname(catfile('foo', 'bar')), 'baz', 'yada'), 'same path'; + # Array is_deeply path('foo', 'bar')->to_array, [splitdir catfile('foo', 'bar')], 'same structure'; @@ -37,13 +41,17 @@ is path('test.txt')->to_abs->to_rel(getcwd), abs2rel(rel2abs('test.txt'), getcwd), 'same path'; +# Resolved +is path('.')->realpath, realpath('.'), 'same path'; + # Basename is path('file.t')->to_abs->basename, basename(rel2abs 'file.t'), 'same path'; is path('file.t')->to_abs->basename('.t'), basename(rel2abs('file.t'), '.t'), 'same path'; # Dirname -is path('file.t')->to_abs->dirname, dirname(rel2abs 'file.t'), 'same path'; +is path('file.t')->to_abs->dirname, scalar dirname(rel2abs 'file.t'), + 'same path'; # Checks ok path(__FILE__)->to_abs->is_abs, 'path is absolute'; @@ -116,14 +124,40 @@ my $source = $dir->child('src.txt')->spurt('works!'); ok -f $source, 'file exists'; ok !-f $destination, 'file does not exists'; -ok !-f $source->move_to($destination), 'file no longer exists'; +is $source->move_to($destination)->to_string, $destination, 'same path'; +ok !-f $source, 'file no longer exists'; ok -f $destination, 'file exists'; is $destination->slurp, 'works!', 'right content'; +$subdir = $dir->child('test')->make_path; +my $destination2 = $destination->move_to($subdir); +is $destination2, $subdir->child($destination->basename), 'same path'; +ok !-f $destination, 'file no longer exists'; +ok -f $destination2, 'file exists'; +is $destination2->slurp, 'works!', 'right content'; + +# Copy to +$dir = tempdir; +$destination = $dir->child('dest.txt'); +$source = $dir->child('src.txt')->spurt('works!'); +ok -f $source, 'file exists'; +ok !-f $destination, 'file does not exists'; +is $source->copy_to($destination)->to_string, $destination, 'same path'; +ok -f $source, 'file still exists'; +ok -f $destination, 'file also exists now'; +is $source->slurp, 'works!', 'right content'; +is $destination->slurp, 'works!', 'right content'; +$subdir = $dir->child('test')->make_path; +$destination2 = $destination->copy_to($subdir); +is $destination2, $subdir->child($destination->basename), 'same path'; +ok -f $destination, 'file still exists'; +ok -f $destination2, 'file also exists now'; +is $destination->slurp, 'works!', 'right content'; +is $destination2->slurp, 'works!', 'right content'; # List is_deeply path('does_not_exist')->list->to_array, [], 'no files'; is_deeply path(__FILE__)->list->to_array, [], 'no files'; -my $lib = path(__FILE__)->dirname->child('lib', 'Mojo'); +my $lib = path(__FILE__)->sibling('lib', 'Mojo'); my @files = map { path($lib)->child(split '/') } ( 'DeprecationTest.pm', 'LoaderException.pm', 'LoaderException2.pm', 'TestConnectProxy.pm' @@ -159,6 +193,18 @@ '.test/hidden.txt'; is_deeply path($lib)->list_tree({hidden => 1})->map('to_string')->to_array, [@hidden, @files], 'right files'; +my @all = map { path($lib)->child(split '/') } ( + '.hidden.txt', '.test', + '.test/hidden.txt', 'BaseTest', + 'BaseTest/Base1.pm', 'BaseTest/Base2.pm', + 'BaseTest/Base3.pm', 'DeprecationTest.pm', + 'LoaderException.pm', 'LoaderException2.pm', + 'LoaderTest', 'LoaderTest/A.pm', + 'LoaderTest/B.pm', 'LoaderTest/C.pm', + 'TestConnectProxy.pm' +); +is_deeply path($lib)->list_tree({dir => 1, hidden => 1})->map('to_string') + ->to_array, [@all], 'right files'; # I/O $dir = tempdir; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/t/mojo/prefork.t new/Mojolicious-7.28/t/mojo/prefork.t --- old/Mojolicious-7.27/t/mojo/prefork.t 2017-01-09 18:47:43.000000000 +0100 +++ new/Mojolicious-7.28/t/mojo/prefork.t 2017-03-05 23:08:00.000000000 +0100 @@ -29,7 +29,7 @@ ok !-e $file, 'file has been cleaned up'; # Bad PID file -my $bad = path(__FILE__)->dirname->child('does_not_exist', 'test.pid'); +my $bad = path(__FILE__)->sibling('does_not_exist', 'test.pid'); $prefork = Mojo::Server::Prefork->new(pid_file => $bad); $prefork->app->log->level('fatal'); my $log = ''; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/t/mojo/template.t new/Mojolicious-7.28/t/mojo/template.t --- old/Mojolicious-7.27/t/mojo/template.t 2017-01-20 21:31:57.000000000 +0100 +++ new/Mojolicious-7.28/t/mojo/template.t 2017-03-05 23:08:22.000000000 +0100 @@ -1125,13 +1125,13 @@ # File $mt = Mojo::Template->new; -my $file = path(__FILE__)->dirname->child('templates', 'test.mt'); +my $file = path(__FILE__)->sibling('templates', 'test.mt'); $output = $mt->render_file($file, 3); like $output, qr/23\nHello World!/, 'file'; # Exception in file $mt = Mojo::Template->new; -$file = path(__FILE__)->dirname->child('templates', 'exception.mt'); +$file = path(__FILE__)->sibling('templates', 'exception.mt'); $output = $mt->render_file($file); isa_ok $output, 'Mojo::Exception', 'right exception'; like $output->message, qr/exception\.mt line 2/, 'message contains filename'; @@ -1161,7 +1161,7 @@ # Exception with UTF-8 context $mt = Mojo::Template->new; -$file = path(__FILE__)->dirname->child('templates', 'utf8_exception.mt'); +$file = path(__FILE__)->sibling('templates', 'utf8_exception.mt'); $output = $mt->render_file($file); isa_ok $output, 'Mojo::Exception', 'right exception'; ok $output->verbose, 'verbose exception'; @@ -1182,7 +1182,7 @@ # Different encodings $mt = Mojo::Template->new(encoding => 'shift_jis'); -$file = path(__FILE__)->dirname->child('templates', 'utf8_exception.mt'); +$file = path(__FILE__)->sibling('templates', 'utf8_exception.mt'); ok !eval { $mt->render_file($file) }, 'file not rendered'; like $@, qr/invalid encoding/, 'right error'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/t/mojolicious/commands.t new/Mojolicious-7.28/t/mojolicious/commands.t --- old/Mojolicious-7.27/t/mojolicious/commands.t 2017-02-05 01:29:00.000000000 +0100 +++ new/Mojolicious-7.28/t/mojolicious/commands.t 2017-03-05 19:39:47.000000000 +0100 @@ -252,6 +252,7 @@ ok -e $app->rel_file('my_app/lib/MyApp.pm'), 'application class exists'; ok -e $app->rel_file('my_app/lib/MyApp/Controller/Example.pm'), 'controller exists'; +ok -e $app->rel_file('my_app/my_app.conf'), 'config file exists'; ok -e $app->rel_file('my_app/t/basic.t'), 'test exists'; ok -e $app->rel_file('my_app/public/index.html'), 'static file exists'; ok -e $app->rel_file('my_app/templates/layouts/default.html.ep'), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.27/t/mojolicious/json_config_lite_app.t new/Mojolicious-7.28/t/mojolicious/json_config_lite_app.t --- old/Mojolicious-7.27/t/mojolicious/json_config_lite_app.t 2017-01-09 18:47:43.000000000 +0100 +++ new/Mojolicious-7.28/t/mojolicious/json_config_lite_app.t 2017-03-05 23:08:31.000000000 +0100 @@ -21,8 +21,7 @@ # Load plugins my $config = plugin j_s_o_n_config => {default => {foo => 'baz', hello => 'there'}}; -my $path - = path(__FILE__)->to_abs->dirname->child('json_config_lite_app_abs.json'); +my $path = path(__FILE__)->to_abs->sibling('json_config_lite_app_abs.json'); plugin JSONConfig => {file => $path}; is $config->{foo}, 'bar', 'right value'; is $config->{hello}, 'there', 'right value';