Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2016-05-25 21:29:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2016-04-12 19:38:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2016-05-25 21:29:34.000000000 +0200 @@ -1,0 +2,37 @@ +Mon May 23 12:13:08 UTC 2016 - [email protected] + +- updated to 6.62 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 6.62 2016-05-14 + - Removed deprecated is_debug, is_error, is_info and is_warn methods from + Mojo::Log. + - Improved support for Ubuntu on Windows. + +------------------------------------------------------------------- +Thu May 5 09:41:15 UTC 2016 - [email protected] + +- updated to 6.61 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 6.61 2016-04-30 + - Improved Mojo::Server::Daemon to no longer log when a connection has been + closed prematurely. + - Fixed bug in Mojo::Content where the drain event would not always be emitted + for dynamically generated content with a Content-Length header. + + 6.60 2016-04-25 + - Fixed bug in Mojo::IOLoop where stopping gracefully would sometimes result + in connections getting closed too early. (anparker, sri) + + 6.59 2016-04-22 + - Removed deprecated xss_escape function from Mojo::Util. + - Improved HTML Living Standard compliance of Mojo::DOM::HTML. + - Improved Mojo::Server::Daemon to log when a connection has been closed + prematurely. + - Improved Mojo::Server::Prefork to log when the manager process has been + stopped. + - Fixed a few tests to keep up with breaking changes in IO::Socket::SSL. + - Fixed a few timing bugs in tests. + +------------------------------------------------------------------- Old: ---- Mojolicious-6.58.tar.gz New: ---- Mojolicious-6.62.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.rW9ZvI/_old 2016-05-25 21:29:35.000000000 +0200 +++ /var/tmp/diff_new_pack.rW9ZvI/_new 2016-05-25 21:29:35.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 6.58 +Version: 6.62 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework @@ -61,6 +61,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc Changes CONTRIBUTING.md examples LICENSE README.md +%doc Changes examples LICENSE README.md %changelog ++++++ Mojolicious-6.58.tar.gz -> Mojolicious-6.62.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/CONTRIBUTING.md new/Mojolicious-6.62/CONTRIBUTING.md --- old/Mojolicious-6.58/CONTRIBUTING.md 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Please read the guide for [contributing to Mojolicious](http://mojolicious.org/perldoc/Mojolicious/Guides/Contributing). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/Changes new/Mojolicious-6.62/Changes --- old/Mojolicious-6.58/Changes 2016-04-10 19:07:57.000000000 +0200 +++ new/Mojolicious-6.62/Changes 2016-05-14 16:19:21.000000000 +0200 @@ -1,4 +1,29 @@ +6.62 2016-05-14 + - Removed deprecated is_debug, is_error, is_info and is_warn methods from + Mojo::Log. + - Improved support for Ubuntu on Windows. + +6.61 2016-04-30 + - Improved Mojo::Server::Daemon to no longer log when a connection has been + closed prematurely. + - Fixed bug in Mojo::Content where the drain event would not always be emitted + for dynamically generated content with a Content-Length header. + +6.60 2016-04-25 + - Fixed bug in Mojo::IOLoop where stopping gracefully would sometimes result + in connections getting closed too early. (anparker, sri) + +6.59 2016-04-22 + - Removed deprecated xss_escape function from Mojo::Util. + - Improved HTML Living Standard compliance of Mojo::DOM::HTML. + - Improved Mojo::Server::Daemon to log when a connection has been closed + prematurely. + - Improved Mojo::Server::Prefork to log when the manager process has been + stopped. + - Fixed a few tests to keep up with breaking changes in IO::Socket::SSL. + - Fixed a few timing bugs in tests. + 6.58 2016-04-09 - Removed deprecated build_frame and parse_frame methods from Mojo::Transaction::WebSocket. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/MANIFEST new/Mojolicious-6.62/MANIFEST --- old/Mojolicious-6.58/MANIFEST 2016-04-10 19:11:02.000000000 +0200 +++ new/Mojolicious-6.62/MANIFEST 2016-05-14 23:04:45.000000000 +0200 @@ -1,6 +1,5 @@ .perltidyrc Changes -CONTRIBUTING.md examples/chat.pl examples/connect-proxy.pl examples/entities.pl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/META.json new/Mojolicious-6.62/META.json --- old/Mojolicious-6.58/META.json 2016-04-10 19:11:02.000000000 +0200 +++ new/Mojolicious-6.62/META.json 2016-05-14 23:04:45.000000000 +0200 @@ -4,7 +4,7 @@ "Sebastian Riedel <[email protected]>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001", + "generated_by" : "ExtUtils::MakeMaker version 7.1001, CPAN::Meta::Converter version 2.150005", "license" : [ "artistic_2" ], @@ -58,5 +58,6 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "6.58" + "version" : "6.62", + "x_serialization_backend" : "JSON::PP version 2.27300" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/META.yml new/Mojolicious-6.62/META.yml --- old/Mojolicious-6.58/META.yml 2016-04-10 19:11:02.000000000 +0200 +++ new/Mojolicious-6.62/META.yml 2016-05-14 23:04:45.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001' +generated_by: 'ExtUtils::MakeMaker version 7.1001, CPAN::Meta::Converter version 2.150005' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -31,4 +31,5 @@ homepage: http://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/kraih/mojo.git -version: '6.58' +version: '6.62' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Content.pm new/Mojolicious-6.62/lib/Mojo/Content.pm --- old/Mojolicious-6.58/lib/Mojo/Content.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Content.pm 2016-04-30 13:31:03.000000000 +0200 @@ -38,8 +38,10 @@ sub generate_body_chunk { my ($self, $offset) = @_; - $self->emit(drain => $offset) unless length($self->{body_buffer} // ''); - my $chunk = delete $self->{body_buffer} // ''; + $self->emit(drain => $offset) unless length($self->{body_buffer} //= ''); + my $len = $self->headers->content_length; + return '' if looks_like_number $len && $len == $offset; + my $chunk = delete $self->{body_buffer}; return $self->{eof} ? '' : undef unless length $chunk; return $chunk; @@ -59,7 +61,7 @@ sub is_compressed { lc(shift->headers->content_encoding // '') eq 'gzip' } -sub is_dynamic { $_[0]{dynamic} && !defined $_[0]->headers->content_length } +sub is_dynamic { !!$_[0]{dynamic} } sub is_finished { (shift->{state} // '') eq 'finished' } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/DOM/HTML.pm new/Mojolicious-6.62/lib/Mojo/DOM/HTML.pm --- old/Mojolicious-6.58/lib/Mojo/DOM/HTML.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/DOM/HTML.pm 2016-04-29 16:10:41.000000000 +0200 @@ -77,7 +77,7 @@ qw(a abbr area audio b bdi bdo br button canvas cite code data datalist), qw(del dfn em embed i iframe img input ins kbd keygen label link map mark), qw(math meta meter noscript object output picture progress q ruby s samp), - qw(script select small span strong sub sup svg template textarea time u), + qw(script select slot small span strong sub sup svg template textarea time u), qw(var video wbr) ); my @OBSOLETE = qw(acronym applet basefont big font strike tt); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Home.pm new/Mojolicious-6.62/lib/Mojo/Home.pm --- old/Mojolicious-6.58/lib/Mojo/Home.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Home.pm 2016-05-13 04:02:55.000000000 +0200 @@ -2,10 +2,9 @@ use Mojo::Base -base; use overload bool => sub {1}, '""' => sub { shift->to_string }, fallback => 1; -use Cwd 'abs_path'; +use Cwd qw(abs_path getcwd); use File::Basename 'dirname'; use File::Spec::Functions qw(abs2rel catdir catfile splitdir); -use FindBin; use Mojo::Util qw(class_to_path files); has parts => sub { [] }; @@ -16,7 +15,7 @@ # Environment variable return $self->parts([splitdir abs_path $ENV{MOJO_HOME}]) if $ENV{MOJO_HOME}; - # Try to find home from lib directory + # Location of the application class if ($class && (my $path = $INC{my $file = class_to_path $class})) { $path =~ s/\Q$file\E$//; my @home = splitdir $path; @@ -28,8 +27,8 @@ return $self->parts([splitdir abs_path catdir(@home) || '.']); } - # FindBin fallback - return $self->parts([split '/', $FindBin::Bin]); + # Current working directory + return $self->parts([splitdir getcwd]); } sub lib_dir { @@ -98,8 +97,8 @@ $home = $home->detect; $home = $home->detect('My::App'); -Detect home directory from the value of the C<MOJO_HOME> environment variable -or application class. +Detect home directory from the value of the C<MOJO_HOME> environment variable, +location of the application class, or the current working directory. =head2 lib_dir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/IOLoop.pm new/Mojolicious-6.62/lib/Mojo/IOLoop.pm --- old/Mojolicious-6.58/lib/Mojo/IOLoop.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/IOLoop.pm 2016-04-29 16:10:41.000000000 +0200 @@ -111,6 +111,8 @@ weaken $self; $server->on( accept => sub { + my $stream = Mojo::IOLoop::Stream->new(pop); + $self->$cb($stream, $self->_stream($stream, $self->_id, 1)); # Enforce connection limit (randomize to improve load balancing) if (my $max = $self->max_accepts) { @@ -118,9 +120,6 @@ $self->stop_gracefully if ($self->{accepts} -= 1) <= 0; } - my $stream = Mojo::IOLoop::Stream->new(pop); - $self->$cb($stream, $self->_stream($stream, $self->_id, 1)); - # Stop accepting if connection limit has been reached $self->_not_accepting if $self->_limit; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Log.pm new/Mojolicious-6.62/lib/Mojo/Log.pm --- old/Mojolicious-6.58/lib/Mojo/Log.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Log.pm 2016-05-07 20:14:01.000000000 +0200 @@ -3,7 +3,7 @@ use Carp 'croak'; use Fcntl ':flock'; -use Mojo::Util qw(deprecated encode monkey_patch); +use Mojo::Util qw(encode monkey_patch); has format => sub { \&_format }; has handle => sub { @@ -23,15 +23,6 @@ # Supported log levels my %LEVEL = (debug => 1, info => 2, warn => 3, error => 4, fatal => 5); -# DEPRECATED! -for my $name (qw(debug error info warn)) { - monkey_patch __PACKAGE__, "is_$name", sub { - deprecated - "Mojo::Log::is_$name is DEPRECATED in favor of Mojo::Log::is_level"; - shift->is_level($name); - }; -} - sub append { my ($self, $msg) = @_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Server/Daemon.pm new/Mojolicious-6.62/lib/Mojo/Server/Daemon.pm --- old/Mojolicious-6.58/lib/Mojo/Server/Daemon.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Server/Daemon.pm 2016-04-30 01:06:11.000000000 +0200 @@ -116,10 +116,7 @@ sub _close { my ($self, $id) = @_; - - # Finish gracefully if (my $tx = $self->{connections}{$id}{tx}) { $tx->closed } - delete $self->{connections}{$id}; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Server/Hypnotoad.pm new/Mojolicious-6.62/lib/Mojo/Server/Hypnotoad.pm --- old/Mojolicious-6.58/lib/Mojo/Server/Hypnotoad.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Server/Hypnotoad.pm 2016-05-07 20:13:06.000000000 +0200 @@ -3,6 +3,7 @@ # "Bender: I was God once. # God: Yes, I saw. You were doing well, until everyone died." +use Config; use Cwd 'abs_path'; use File::Basename 'dirname'; use File::Spec::Functions 'catfile'; @@ -33,8 +34,8 @@ sub run { my ($self, $app) = @_; - # No Windows support - _exit('Hypnotoad is not available for Windows.') if $^O eq 'MSWin32'; + # No fork emulation support + _exit('Hypnotoad does not support fork emulation.') if $Config{d_pseudofork}; # Remember executable and application for later $ENV{HYPNOTOAD_EXE} ||= $0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Server/Prefork.pm new/Mojolicious-6.62/lib/Mojo/Server/Prefork.pm --- old/Mojolicious-6.58/lib/Mojo/Server/Prefork.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Server/Prefork.pm 2016-05-07 20:13:09.000000000 +0200 @@ -1,6 +1,7 @@ package Mojo::Server::Prefork; use Mojo::Base 'Mojo::Server::Daemon'; +use Config; use File::Spec::Functions qw(catfile tmpdir); use Mojo::Util 'steady_time'; use POSIX 'WNOHANG'; @@ -59,8 +60,9 @@ sub run { my $self = shift; - # No Windows support - say 'Preforking is not available for Windows.' and exit 0 if $^O eq 'MSWin32'; + # No fork emulation support + say 'Preforking does not support fork emulation.' and exit 0 + if $Config{d_pseudofork}; # Pipe for worker communication pipe($self->{reader}, $self->{writer}) or die "Can't create pipe: $!"; @@ -86,6 +88,7 @@ $self->ioloop->max_accepts($self->accepts); $self->{running} = 1; $self->_manage while $self->{running}; + $self->app->log->info("Manager $$ stopped"); } sub _heartbeat { shift->{writer}->syswrite("$$:$_[0]\n") or exit 0 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Transaction/WebSocket.pm new/Mojolicious-6.62/lib/Mojo/Transaction/WebSocket.pm --- old/Mojolicious-6.58/lib/Mojo/Transaction/WebSocket.pm 2016-04-10 19:08:43.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Transaction/WebSocket.pm 2016-05-07 20:07:52.000000000 +0200 @@ -2,7 +2,6 @@ use Mojo::Base 'Mojo::Transaction'; use Compress::Raw::Zlib 'Z_SYNC_FLUSH'; -use Config; use List::Util 'first'; use Mojo::JSON qw(encode_json j); use Mojo::Util qw(decode encode trim); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojo/Util.pm new/Mojolicious-6.62/lib/Mojo/Util.pm --- old/Mojolicious-6.58/lib/Mojo/Util.pm 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojo/Util.pm 2016-04-29 16:10:41.000000000 +0200 @@ -61,9 +61,6 @@ qw(unquote url_escape url_unescape xml_escape xor_encode) ); -# DEPRECATED! -push @EXPORT_OK, 'xss_escape'; - # Aliases monkey_patch(__PACKAGE__, 'b64_decode', \&decode_base64); monkey_patch(__PACKAGE__, 'b64_encode', \&encode_base64); @@ -348,13 +345,6 @@ return $output .= $buffer ^ substr($key, 0, length $buffer, ''); } -# DEPRECATED! -sub xss_escape { - deprecated - 'Mojo::Util::xss_escape is DEPRECATED in favor of Mojo::Util::xml_escape'; - xml_escape(@_); -} - sub _adapt { my ($delta, $numpoints, $firsttime) = @_; use integer; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojolicious/Guides/Contributing.pod new/Mojolicious-6.62/lib/Mojolicious/Guides/Contributing.pod --- old/Mojolicious-6.58/lib/Mojolicious/Guides/Contributing.pod 2016-03-30 17:52:59.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojolicious/Guides/Contributing.pod 2016-04-29 16:10:41.000000000 +0200 @@ -176,13 +176,21 @@ =head1 SPONSORSHIP -Please consider sponsoring the ongoing development of L<Mojolicious>, especially -if your company benefits from this project. We welcome your patronage on +L<Mojolicious> is open source and free to use. However, the amount of effort +needed to maintain the project and develop new features for it is not +sustainable without proper financial backing. You can support the ongoing +development of L<Mojolicious> through L<Gratipay|https://gratipay.com/mojolicious>, L<Bountysource|https://www.bountysource.com/teams/mojolicious>, -L<PayPal|https://www.paypal.me/kraih> or through Bitcoin +L<PayPal|https://www.paypal.me/kraih> or Bitcoin (C<1Cid78CmK4hvf78Ry8K2XeDx8pQHNh4hbz>). +If you run a business and use L<Mojolicious> in a revenue generating product, it +makes business sense to sponsor L<Mojolicious> development. Because it ensures +that the project your product relies on stays healthy and actively maintained. +It can also help your exposure within the community and will make it easier to +attract L<Mojolicious> developers. + Grants for contiguous full-time development, over the period of a few days, can also have a huge impact. They allow us to tackle complex issues that are otherwise left to linger until somebody can't afford to not fix them. To arrange diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojolicious/Guides/FAQ.pod new/Mojolicious-6.62/lib/Mojolicious/Guides/FAQ.pod --- old/Mojolicious-6.58/lib/Mojolicious/Guides/FAQ.pod 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojolicious/Guides/FAQ.pod 2016-05-09 16:51:21.000000000 +0200 @@ -66,7 +66,7 @@ First of all, you need to be aware that according to the L<perlpolicy>, only the two most recent stable release series of Perl are supported by the -community and receive bug fixes, which are currently 5.22.x and 5.20.x. +community and receive bug fixes, which are currently 5.24.x and 5.22.x. L<Mojolicious> follows this model and fully supports these two release series. In addition we will also keep the distribution installable up to a certain legacy version that we deem worthy of supporting, but not specifically optimize diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/lib/Mojolicious.pm new/Mojolicious-6.62/lib/Mojolicious.pm --- old/Mojolicious-6.58/lib/Mojolicious.pm 2016-04-08 13:57:52.000000000 +0200 +++ new/Mojolicious-6.62/lib/Mojolicious.pm 2016-05-02 19:31:30.000000000 +0200 @@ -43,7 +43,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Clinking Beer Mugs'; -our $VERSION = '6.58'; +our $VERSION = '6.62'; sub AUTOLOAD { my $self = shift; @@ -783,6 +783,8 @@ Anatoly Sharifulin +Andre Parker + Andre Vieth Andreas Jaekel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/home.t new/Mojolicious-6.62/t/mojo/home.t --- old/Mojolicious-6.58/t/mojo/home.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/home.t 2016-05-13 04:02:04.000000000 +0200 @@ -3,7 +3,7 @@ BEGIN { $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll' } use Test::More; -use Cwd qw(cwd realpath); +use Cwd qw(getcwd realpath); use File::Spec::Functions qw(canonpath catdir catfile splitdir); use FindBin; use List::Util 'first'; @@ -11,30 +11,24 @@ use Mojo::Home; # ENV detection -my $target = canonpath realpath cwd; +my $target = canonpath realpath getcwd; { local $ENV{MOJO_HOME} = '.'; my $home = Mojo::Home->new->detect; - is_deeply [split /\\|\//, canonpath($home->to_string)], - [split /\\|\//, $target], 'right path detected'; + is_deeply [splitdir canonpath($home->to_string)], [splitdir $target], + 'right path detected'; } -# Class detection -my $original = catdir splitdir $FindBin::Bin; +# Current working directory +my $original = catdir splitdir getcwd; my $home = Mojo::Home->new->detect; -is_deeply [split /\\|\//, realpath $original], [split /\\|\//, $home], - 'right path detected'; +is_deeply [splitdir realpath getcwd], [splitdir $home], 'right path detected'; # Specific class detection $INC{'MyClass.pm'} = 'MyClass.pm'; $home = Mojo::Home->new->detect('MyClass'); -is_deeply [split /\\|\//, canonpath($home->to_string)], - [split /\\|\//, $target], 'right path detected'; - -# FindBin detection -$home = Mojo::Home->new->detect(undef); -is_deeply [split /\\|\//, catdir(splitdir($FindBin::Bin))], - [split /\\|\//, $home], 'right path detected'; +is_deeply [splitdir canonpath($home->to_string)], [splitdir $target], + 'right path detected'; # Path generation $home = Mojo::Home->new($FindBin::Bin); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/hypnotoad.t new/Mojolicious-6.62/t/mojo/hypnotoad.t --- old/Mojolicious-6.58/t/mojo/hypnotoad.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/hypnotoad.t 2016-04-29 16:10:41.000000000 +0200 @@ -130,8 +130,10 @@ plugin Config => { default => { hypnotoad => { + accepts => 2, inactivity_timeout => 3, listen => ['http://127.0.0.1:$port1', 'http://127.0.0.1:$port2'], + requests => 1, workers => 1 } } @@ -174,7 +176,7 @@ # Application has been reloaded $tx = $ua->get("http://127.0.0.1:$port1/hello"); ok $tx->is_finished, 'transaction is finished'; -ok $tx->keep_alive, 'connection will be kept alive'; +ok !$tx->keep_alive, 'connection will not be kept alive'; ok !$tx->kept_alive, 'connection was not kept alive'; is $tx->res->code, 200, 'right status'; is $tx->res->body, 'Hello World!', 'right content'; @@ -182,7 +184,7 @@ # Application has been reloaded (second port) $tx = $ua->get("http://127.0.0.1:$port2/hello"); ok $tx->is_finished, 'transaction is finished'; -ok $tx->keep_alive, 'connection will be kept alive'; +ok !$tx->keep_alive, 'connection will not be kept alive'; ok !$tx->kept_alive, 'connection was not kept alive'; is $tx->res->code, 200, 'right status'; is $tx->res->body, 'Hello World!', 'right content'; @@ -190,16 +192,16 @@ # Same result $tx = $ua->get("http://127.0.0.1:$port1/hello"); ok $tx->is_finished, 'transaction is finished'; -ok $tx->keep_alive, 'connection will be kept alive'; -ok $tx->kept_alive, 'connection was kept alive'; +ok !$tx->keep_alive, 'connection will not be kept alive'; +ok !$tx->kept_alive, 'connection was not kept alive'; is $tx->res->code, 200, 'right status'; is $tx->res->body, 'Hello World!', 'right content'; # Same result (second port) $tx = $ua->get("http://127.0.0.1:$port2/hello"); ok $tx->is_finished, 'transaction is finished'; -ok $tx->keep_alive, 'connection will be kept alive'; -ok $tx->kept_alive, 'connection was kept alive'; +ok !$tx->keep_alive, 'connection will not be kept alive'; +ok !$tx->kept_alive, 'connection was not kept alive'; is $tx->res->code, 200, 'right status'; is $tx->res->body, 'Hello World!', 'right content'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/ioloop_tls.t new/Mojolicious-6.62/t/mojo/ioloop_tls.t --- old/Mojolicious-6.58/t/mojo/ioloop_tls.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/ioloop_tls.t 2016-04-29 16:10:41.000000000 +0200 @@ -306,7 +306,7 @@ tls => 1, tls_ca => 't/mojo/certs/ca.crt', tls_cert => 't/mojo/certs/server.crt', - tls_ciphers => 'RC4-SHA:ALL', + tls_ciphers => 'AES256-SHA:ALL', tls_key => 't/mojo/certs/server.key', tls_verify => 0x00, sub { @@ -333,7 +333,7 @@ is $server, 'accepted', 'right result'; is $client, 'connected', 'right result'; ok !$client_err, 'no error'; -is $cipher, 'RC4-SHA', 'RC4-SHA has been negotiatied'; +is $cipher, 'AES256-SHA', 'AES256-SHA has been negotiatied'; # Ignore missing client certificate ($server, $client, $client_err) = (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/prefork.t new/Mojolicious-6.62/t/mojo/prefork.t --- old/Mojolicious-6.58/t/mojo/prefork.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/prefork.t 2016-04-30 15:53:21.000000000 +0200 @@ -55,13 +55,13 @@ } ); is $prefork->workers, 4, 'start with four workers'; -my (@spawn, @reap, $worker, $tx, $graceful, $healthy); +my (@spawn, @reap, $worker, $tx, $graceful); $prefork->on(spawn => sub { push @spawn, pop }); $prefork->on( heartbeat => sub { my ($prefork, $pid) = @_; $worker = $pid; - return if ($healthy = $prefork->healthy) < 4; + return if $prefork->healthy < 4; $tx = Mojo::UserAgent->new->get("http://127.0.0.1:$port"); kill 'QUIT', $$; } @@ -72,7 +72,6 @@ $cb = $prefork->app->log->on(message => sub { $log .= pop }); is $prefork->healthy, 0, 'no healthy workers'; $prefork->run; -is $healthy, 4, 'healthy workers'; is scalar @spawn, 4, 'four workers spawned'; is scalar @reap, 4, 'four workers reaped'; ok !!grep { $worker eq $_ } @spawn, 'worker has a heartbeat'; @@ -85,6 +84,7 @@ like $log, qr/Creating process id file/, 'right message'; like $log, qr/Stopping worker $spawn[0] gracefully/, 'right message'; like $log, qr/Worker $spawn[0] stopped/, 'right message'; +like $log, qr/Manager $$ stopped/, 'right message'; $prefork->app->log->unsubscribe(message => $cb); # Process id file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/reactor_ev.t new/Mojolicious-6.62/t/mojo/reactor_ev.t --- old/Mojolicious-6.58/t/mojo/reactor_ev.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/reactor_ev.t 2016-04-29 16:10:41.000000000 +0200 @@ -129,13 +129,16 @@ ok !$timer, 'timer was not triggered'; ok !$recurring, 'recurring was not triggered again'; ($readable, $writable, $timer, $recurring) = (); +my $next_tick; +is $reactor->next_tick(sub { $next_tick++ }), undef, 'returned undef'; $id = $reactor->recurring(0 => sub { $recurring++ }); -is $reactor->next_tick(sub { shift->stop }), undef, 'returned undef'; +$reactor->timer(0.025 => sub { shift->stop }); $reactor->start; ok $readable, 'handle is readable again'; ok $writable, 'handle is writable again'; ok !$timer, 'timer was not triggered'; ok $recurring, 'recurring was triggered again'; +ok $next_tick, 'next tick was triggered'; # Reset $reactor->next_tick(sub { die 'Reset failed' }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/reactor_poll.t new/Mojolicious-6.62/t/mojo/reactor_poll.t --- old/Mojolicious-6.58/t/mojo/reactor_poll.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/reactor_poll.t 2016-04-29 16:10:41.000000000 +0200 @@ -126,13 +126,16 @@ ok !$timer, 'timer was not triggered'; ok !$recurring, 'recurring was not triggered again'; ($readable, $writable, $timer, $recurring) = (); +my $next_tick; +is $reactor->next_tick(sub { $next_tick++ }), undef, 'returned undef'; $id = $reactor->recurring(0 => sub { $recurring++ }); -is $reactor->next_tick(sub { shift->stop }), undef, 'returned undef'; +$reactor->timer(0.025 => sub { shift->stop }); $reactor->start; ok $readable, 'handle is readable again'; ok $writable, 'handle is writable again'; ok !$timer, 'timer was not triggered'; ok $recurring, 'recurring was triggered again'; +ok $next_tick, 'next tick was triggered'; # Reset $reactor->next_tick(sub { die 'Reset failed' }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/response.t new/Mojolicious-6.62/t/mojo/response.t --- old/Mojolicious-6.58/t/mojo/response.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/response.t 2016-04-30 12:26:52.000000000 +0200 @@ -966,7 +966,7 @@ } $res->fix_headers; is $res->headers->connection, undef, 'no "Connection" value'; -ok !$res->content->is_dynamic, 'no dynamic content'; +ok $res->content->is_dynamic, 'dynamic content'; is $count, length($body), 'right length'; is $full, $body, 'right content'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojo/user_agent_tls.t new/Mojolicious-6.62/t/mojo/user_agent_tls.t --- old/Mojolicious-6.58/t/mojo/user_agent_tls.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojo/user_agent_tls.t 2016-04-29 16:10:41.000000000 +0200 @@ -84,7 +84,7 @@ . '?cert=t/mojo/certs/server.crt' . '&key=t/mojo/certs/server.key' . '&ca=t/mojo/certs/ca.crt' - . '&ciphers=RC4-SHA:ALL' + . '&ciphers=AES256-SHA:ALL' . '&verify=0x00' . '&version=SSLv3'; $daemon->listen([$listen])->start; @@ -97,8 +97,8 @@ $tx = $ua->get("https://127.0.0.1:$port"); ok $tx->success, 'successful'; ok !$tx->error, 'no error'; -is $ua->ioloop->stream($tx->connection)->handle->get_cipher, 'RC4-SHA', - 'RC4-SHA has been negotiatied'; +is $ua->ioloop->stream($tx->connection)->handle->get_cipher, 'AES256-SHA', + 'AES256-SHA has been negotiatied'; is $ua->ioloop->stream($tx->connection)->handle->get_sslversion, 'SSLv3', 'SSLv3 has been negotiatied'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojolicious/command.t new/Mojolicious-6.62/t/mojolicious/command.t --- old/Mojolicious-6.58/t/mojolicious/command.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojolicious/command.t 2016-05-13 03:49:39.000000000 +0200 @@ -3,7 +3,7 @@ BEGIN { $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll' } use Test::More; -use Cwd 'cwd'; +use Cwd 'getcwd'; use File::Spec::Functions 'catdir'; use File::Temp 'tempdir'; use Mojolicious::Command; @@ -14,7 +14,7 @@ isa_ok $command->app, 'Mojolicious', 'right application'; # Generating files -my $cwd = cwd; +my $cwd = getcwd; my $dir = tempdir CLEANUP => 1; chdir $dir; $command->create_rel_dir('foo/bar'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojolicious/commands.t new/Mojolicious-6.62/t/mojolicious/commands.t --- old/Mojolicious-6.58/t/mojolicious/commands.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojolicious/commands.t 2016-05-13 03:49:53.000000000 +0200 @@ -10,7 +10,7 @@ use FindBin; use lib "$FindBin::Bin/lib"; -use Cwd 'cwd'; +use Cwd 'getcwd'; use File::Temp 'tempdir'; package Mojolicious::Command::my_fake_test_command; @@ -239,7 +239,7 @@ $app = Mojolicious::Command::generate::app->new; ok $app->description, 'has a description'; like $app->usage, qr/app/, 'has usage information'; -my $cwd = cwd; +my $cwd = getcwd; my $dir = tempdir CLEANUP => 1; chdir $dir; $buffer = ''; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/mojolicious/longpolling_lite_app.t new/Mojolicious-6.62/t/mojolicious/longpolling_lite_app.t --- old/Mojolicious-6.58/t/mojolicious/longpolling_lite_app.t 2016-03-28 10:55:05.000000000 +0200 +++ new/Mojolicious-6.62/t/mojolicious/longpolling_lite_app.t 2016-04-30 13:30:43.000000000 +0200 @@ -72,7 +72,11 @@ Mojo::IOLoop->timer( 0.25 => sub { $c->on(finish => sub { shift->stash->{finished}++ }); - $c->write('there plain,' => sub { shift->write(' whats up?') }); + $c->write( + 'there plain,' => sub { + shift->write(' whats up?' => sub { shift->stash->{drain}++ }); + } + ); } ); }; @@ -246,9 +250,12 @@ is $buffer, 'hi ', 'right content'; # Stream with delay and content length +$stash = undef; +$t->app->plugins->once(before_dispatch => sub { $stash = shift->stash }); $t->get_ok('/longpoll/length')->status_is(200) ->header_is(Server => 'Mojolicious (Perl)')->content_type_is('text/plain') ->content_is('hi there plain, whats up?'); +is $stash->{drain}, 1, 'drain event has been emitted once'; # Stream with delay and finish $t->get_ok('/longpoll/nolength')->status_is(200) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.58/t/pod_coverage.t new/Mojolicious-6.62/t/pod_coverage.t --- old/Mojolicious-6.58/t/pod_coverage.t 2016-04-10 19:08:14.000000000 +0200 +++ new/Mojolicious-6.62/t/pod_coverage.t 2016-04-29 16:10:41.000000000 +0200 @@ -12,8 +12,7 @@ 'Mojo::IOLoop::Server' => {also_private => ['multi_accept']}, 'Mojo::Server::Daemon' => {also_private => ['multi_accept']}, 'Mojo::Server::Morbo' => {also_private => ['check']}, - 'Mojo::Template' => {also_private => ['build', 'compile', 'interpret']}, - 'Mojo::Util' => {also_private => ['xss_escape']} + 'Mojo::Template' => {also_private => ['build', 'compile', 'interpret']} ); pod_coverage_ok($_, $RULES{$_} || {}) for all_modules();
