Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2015-12-09 19:54:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-12-03 13:31:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2015-12-09 22:28:13.000000000 +0100 @@ -1,0 +2,35 @@ +Wed Dec 9 09:23:47 UTC 2015 - [email protected] + +- updated to 6.36 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 6.36 2015-12-08 + - Improved Mojo::JSON performance slightly. (haarg) + - Improved inactivity_timeout helper to return the current controller object. + +------------------------------------------------------------------- +Sat Dec 5 10:18:57 UTC 2015 - [email protected] + +- updated to 6.35 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 6.35 2015-12-04 + - Removed deprecated collecting method from Mojo::UserAgent::CookieJar. + - Fixed warnings in Mojo::Cookie::Response. + +------------------------------------------------------------------- +Wed Dec 2 09:56:26 UTC 2015 - [email protected] + +- updated to 6.34 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 6.34 2015-12-01 + - Improved Hypnotoad to report problems that have occured during the creation + of listen sockets. + - Fixed bug in Mojo::DOM where the wrap method would attempt to wrap an + HTML/XML fragment around the content of root nodes. + - Fixed bug in Mojo::DOM where the wrap_content method would attempt to wrap + an HTML/XML fragment around nodes that do not have children. + - Fixed a few small formatting bugs in Mojolicious::Plugin::PODRenderer. + +------------------------------------------------------------------- Old: ---- Mojolicious-6.33.tar.gz New: ---- Mojolicious-6.36.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.CCr3Og/_old 2015-12-09 22:28:14.000000000 +0100 +++ /var/tmp/diff_new_pack.CCr3Og/_new 2015-12-09 22:28:14.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 6.33 +Version: 6.36 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework @@ -45,7 +45,7 @@ %prep %setup -q -n %{cpan_name}-%{version} -find . -type f -print0 | xargs -0 chmod 644 +find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 %build %{__perl} Makefile.PL INSTALLDIRS=vendor ++++++ Mojolicious-6.33.tar.gz -> Mojolicious-6.36.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/Changes new/Mojolicious-6.36/Changes --- old/Mojolicious-6.33/Changes 2015-11-22 00:10:36.000000000 +0100 +++ new/Mojolicious-6.36/Changes 2015-12-08 15:54:16.000000000 +0100 @@ -1,4 +1,21 @@ +6.36 2015-12-08 + - Improved Mojo::JSON performance slightly. (haarg) + - Improved inactivity_timeout helper to return the current controller object. + +6.35 2015-12-04 + - Removed deprecated collecting method from Mojo::UserAgent::CookieJar. + - Fixed warnings in Mojo::Cookie::Response. + +6.34 2015-12-01 + - Improved Hypnotoad to report problems that have occured during the creation + of listen sockets. + - Fixed bug in Mojo::DOM where the wrap method would attempt to wrap an + HTML/XML fragment around the content of root nodes. + - Fixed bug in Mojo::DOM where the wrap_content method would attempt to wrap + an HTML/XML fragment around nodes that do not have children. + - Fixed a few small formatting bugs in Mojolicious::Plugin::PODRenderer. + 6.33 2015-11-22 - Updated IO::Socket::IP requirement to 0.37 for certain bug fixes. - Improved renderer not to require a return value from handlers. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/MANIFEST new/Mojolicious-6.36/MANIFEST --- old/Mojolicious-6.33/MANIFEST 2015-11-22 17:46:23.000000000 +0100 +++ new/Mojolicious-6.36/MANIFEST 2015-12-09 02:09:49.000000000 +0100 @@ -258,6 +258,7 @@ t/mojolicious/lib/MojoliciousTest/Foo/Bar.pm t/mojolicious/lib/MojoliciousTest/Plugin/Test/SomePlugin2.pm t/mojolicious/lib/MojoliciousTest/Plugin/UPPERCASETestPlugin.pm +t/mojolicious/lib/MojoliciousTest/PODTest.pm t/mojolicious/lib/MojoliciousTest/SyntaxError.pm t/mojolicious/lib/MojoliciousTest2/Foo.pm t/mojolicious/lib/MojoliciousTest3/Bar.pm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/META.json new/Mojolicious-6.36/META.json --- old/Mojolicious-6.33/META.json 2015-11-22 17:46:23.000000000 +0100 +++ new/Mojolicious-6.36/META.json 2015-12-09 02:09:49.000000000 +0100 @@ -58,5 +58,5 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "6.33" + "version" : "6.36" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/META.yml new/Mojolicious-6.36/META.yml --- old/Mojolicious-6.33/META.yml 2015-11-22 17:46:23.000000000 +0100 +++ new/Mojolicious-6.36/META.yml 2015-12-09 02:09:49.000000000 +0100 @@ -31,4 +31,4 @@ homepage: http://mojolicio.us license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/kraih/mojo.git -version: '6.33' +version: '6.36' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Collection.pm new/Mojolicious-6.36/lib/Mojo/Collection.pm --- old/Mojolicious-6.33/lib/Mojo/Collection.pm 2015-11-17 05:42:01.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Collection.pm 2015-11-28 08:24:25.000000000 +0100 @@ -177,7 +177,7 @@ my @elements = $collection->each; $collection = $collection->each(sub {...}); -Evaluate callback for each element in collection or return all elements as a +Evaluate callback for each element in collection, or return all elements as a list if none has been provided. The element will be the first argument passed to the callback and is also available as C<$_>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Cookie/Response.pm new/Mojolicious-6.36/lib/Mojo/Cookie/Response.pm --- old/Mojolicious-6.33/lib/Mojo/Cookie/Response.pm 2015-11-17 05:42:03.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Cookie/Response.pm 2015-11-30 22:29:42.000000000 +0100 @@ -19,8 +19,8 @@ while (my ($name, $value) = splice @$pairs, 0, 2) { next unless $ATTRS{my $attr = lc $name}; - $value =~ s/^\.// if $attr eq 'domain'; - $value = Mojo::Date->new($value)->epoch if $attr eq 'expires'; + $value =~ s/^\.// if $attr eq 'domain' && defined $value; + $value = Mojo::Date->new($value // '')->epoch if $attr eq 'expires'; $value = 1 if $attr eq 'secure' || $attr eq 'httponly'; $cookies[-1]{$attr eq 'max-age' ? 'max_age' : $attr} = $value; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/DOM.pm new/Mojolicious-6.36/lib/Mojo/DOM.pm --- old/Mojolicious-6.33/lib/Mojo/DOM.pm 2015-11-21 23:35:35.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/DOM.pm 2015-11-26 10:35:34.000000000 +0100 @@ -351,8 +351,8 @@ sub _wrap { my ($self, $content, $new) = @_; - $content = 1 if (my $tree = $self->tree)->[0] eq 'root'; - $content = 0 if $tree->[0] ne 'root' && $tree->[0] ne 'tag'; + return $self if (my $tree = $self->tree)->[0] eq 'root' && !$content; + return $self if $tree->[0] ne 'root' && $tree->[0] ne 'tag' && $content; # Find innermost tag my $current; @@ -500,7 +500,7 @@ $dom = $dom->append('<p>I ♥ Mojolicious!</p>'); -Append HTML/XML fragment to this node. +Append HTML/XML fragment to this node (for all node types other than C<root>). # "<div><h1>Test</h1><h2>123</h2></div>" $dom->parse('<div><h1>Test</h1></div>') @@ -776,7 +776,7 @@ $dom = $dom->prepend('<p>I ♥ Mojolicious!</p>'); -Prepend HTML/XML fragment to this node. +Prepend HTML/XML fragment to this node (for all node types other than C<root>). # "<div><h1>Test</h1><h2>123</h2></div>" $dom->parse('<div><h2>123</h2></div>') @@ -980,8 +980,8 @@ $dom = $dom->wrap('<div></div>'); -Wrap HTML/XML fragment around this node, placing it as the last child of the -first innermost element. +Wrap HTML/XML fragment around this node (for all node types other than C<root>), +placing it as the last child of the first innermost element. # "<p>123<b>Test</b></p>" $dom->parse('<b>Test</b>')->at('b')->wrap('<p>123</p>')->root; @@ -999,8 +999,8 @@ $dom = $dom->wrap_content('<div></div>'); -Wrap HTML/XML fragment around this node's content, placing it as the last -children of the first innermost element. +Wrap HTML/XML fragment around this node's content (for C<root> and C<tag> +nodes), placing it as the last children of the first innermost element. # "<p><b>123Test</b></p>" $dom->parse('<p>Test<p>')->at('p')->wrap_content('<b>123</b>')->root; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/JSON.pm new/Mojolicious-6.36/lib/Mojo/JSON.pm --- old/Mojolicious-6.33/lib/Mojo/JSON.pm 2015-11-17 05:42:09.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/JSON.pm 2015-12-06 14:19:31.000000000 +0100 @@ -1,7 +1,6 @@ package Mojo::JSON; use Mojo::Base -strict; -use B; use Carp 'croak'; use Exporter 'import'; use JSON::PP (); @@ -249,9 +248,10 @@ # Null return 'null' unless defined $value; - # Number + # Number (bitwise operators change behavior based on the internal value type) + my $check = (my $dummy = "0") & $value; return $value - if B::svref_2object(\$value)->FLAGS & (B::SVp_IOK | B::SVp_NOK) + if (!($check ^ $check) && length $check) && 0 + $value eq $value && $value * 0 == 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Server/Daemon.pm new/Mojolicious-6.36/lib/Mojo/Server/Daemon.pm --- old/Mojolicious-6.33/lib/Mojo/Server/Daemon.pm 2015-11-21 00:56:42.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Server/Daemon.pm 2015-11-30 17:53:49.000000000 +0100 @@ -47,7 +47,7 @@ } # Start listening - else { $self->_listen($_) for @{$self->listen} } + elsif (!@{$self->acceptors}) { $self->_listen($_) for @{$self->listen} } return $self; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Server/Hypnotoad.pm new/Mojolicious-6.36/lib/Mojo/Server/Hypnotoad.pm --- old/Mojolicious-6.33/lib/Mojo/Server/Hypnotoad.pm 2015-11-17 05:42:13.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Server/Hypnotoad.pm 2015-11-27 17:55:15.000000000 +0100 @@ -68,6 +68,7 @@ $self->_hot_deploy unless $ENV{HYPNOTOAD_PID}; # Daemonize as early as possible (but not for restarts) + $prefork->start; $prefork->daemonize if !$ENV{HYPNOTOAD_FOREGROUND} && $ENV{HYPNOTOAD_REV} < 3; # Start accepting connections diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Transaction/HTTP.pm new/Mojolicious-6.36/lib/Mojo/Transaction/HTTP.pm --- old/Mojolicious-6.33/lib/Mojo/Transaction/HTTP.pm 2015-11-20 23:18:06.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Transaction/HTTP.pm 2015-11-30 18:16:09.000000000 +0100 @@ -270,13 +270,14 @@ $tx->client_read($bytes); -Read data client-side, used to implement user agents. +Read data client-side, used to implement user agents such as L<Mojo::UserAgent>. =head2 client_write my $bytes = $tx->client_write; -Write data client-side, used to implement user agents. +Write data client-side, used to implement user agents such as +L<Mojo::UserAgent>. =head2 is_empty @@ -304,13 +305,15 @@ $tx->server_read($bytes); -Read data server-side, used to implement web servers. +Read data server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head2 server_write my $bytes = $tx->server_write; -Write data server-side, used to implement web servers. +Write data server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head1 SEE ALSO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Transaction/WebSocket.pm new/Mojolicious-6.36/lib/Mojo/Transaction/WebSocket.pm --- old/Mojolicious-6.33/lib/Mojo/Transaction/WebSocket.pm 2015-11-21 00:56:42.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Transaction/WebSocket.pm 2015-12-08 15:53:47.000000000 +0100 @@ -194,7 +194,7 @@ } # Check message size - $self->finish(1009) and return undef if $len > $self->max_websocket_size; + return 1 if $len > $self->max_websocket_size; # Check if whole packet has arrived $len += 4 if my $masked = $second & 0b10000000; @@ -248,6 +248,7 @@ $self->{read} .= $chunk // ''; while (my $frame = $self->parse_frame(\$self->{read})) { + $self->finish(1009) and last unless ref $frame; $self->emit(frame => $frame); } @@ -350,8 +351,9 @@ =head1 DESCRIPTION L<Mojo::Transaction::WebSocket> is a container for WebSocket transactions based -on L<RFC 6455|http://tools.ietf.org/html/rfc6455>. Note that 64-bit frames -require a Perl with support for quads or they are limited to 32-bit. +on L<RFC 6455|http://tools.ietf.org/html/rfc6455> and +L<RFC 7692|http://tools.ietf.org/html/rfc7692>. Note that 64-bit frames require +a Perl with support for quads or they are limited to 32-bit. =head1 EVENTS @@ -537,25 +539,28 @@ my $bool = $ws->client_challenge; -Check WebSocket handshake challenge client-side, used to implement user agents. +Check WebSocket handshake challenge client-side, used to implement user agents +such as L<Mojo::UserAgent>. =head2 client_handshake $ws->client_handshake; -Perform WebSocket handshake client-side, used to implement user agents. +Perform WebSocket handshake client-side, used to implement user agents such as +L<Mojo::UserAgent>. =head2 client_read $ws->client_read($data); -Read data client-side, used to implement user agents. +Read data client-side, used to implement user agents such as L<Mojo::UserAgent>. =head2 client_write my $bytes = $ws->client_write; -Write data client-side, used to implement user agents. +Write data client-side, used to implement user agents such as +L<Mojo::UserAgent>. =head2 connection @@ -675,31 +680,36 @@ $ws->server_close; -Transaction closed server-side, used to implement web servers. +Transaction closed server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head2 server_handshake $ws->server_handshake; -Perform WebSocket handshake server-side, used to implement web servers. +Perform WebSocket handshake server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head2 server_open $ws->server_open; -WebSocket connection established server-side, used to implement web servers. +WebSocket connection established server-side, used to implement web servers such +as L<Mojo::Server::Daemon>. =head2 server_read $ws->server_read($data); -Read data server-side, used to implement web servers. +Read data server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head2 server_write my $bytes = $ws->server_write; -Write data server-side, used to implement web servers. +Write data server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head2 with_compression diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/Transaction.pm new/Mojolicious-6.36/lib/Mojo/Transaction.pm --- old/Mojolicious-6.33/lib/Mojo/Transaction.pm 2015-11-17 05:42:16.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/Transaction.pm 2015-11-30 19:24:49.000000000 +0100 @@ -24,7 +24,7 @@ $res->error({message => $res->message, code => $res->code}); } - return $self->server_close; + $self->server_close; } sub client_read { croak 'Method "client_read" not implemented by subclass' } @@ -189,21 +189,21 @@ $tx->client_close(1); Transaction closed client-side, no actual connection close is assumed by -default, used to implement user agents. +default, used to implement user agents such as L<Mojo::UserAgent>. =head2 client_read $tx->client_read($bytes); -Read data client-side, used to implement user agents. Meant to be overloaded in -a subclass. +Read data client-side, used to implement user agents such as L<Mojo::UserAgent>. +Meant to be overloaded in a subclass. =head2 client_write my $bytes = $tx->client_write; -Write data client-side, used to implement user agents. Meant to be overloaded -in a subclass. +Write data client-side, used to implement user agents such as +L<Mojo::UserAgent>. Meant to be overloaded in a subclass. =head2 connection @@ -265,21 +265,22 @@ $tx->server_close; -Transaction closed server-side, used to implement web servers. +Transaction closed server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. =head2 server_read $tx->server_read($bytes); -Read data server-side, used to implement web servers. Meant to be overloaded in -a subclass. +Read data server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. Meant to be overloaded in a subclass. =head2 server_write my $bytes = $tx->server_write; -Write data server-side, used to implement web servers. Meant to be overloaded -in a subclass. +Write data server-side, used to implement web servers such as +L<Mojo::Server::Daemon>. Meant to be overloaded in a subclass. =head2 success diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/UserAgent/CookieJar.pm new/Mojolicious-6.36/lib/Mojo/UserAgent/CookieJar.pm --- old/Mojolicious-6.33/lib/Mojo/UserAgent/CookieJar.pm 2015-11-17 05:42:17.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/UserAgent/CookieJar.pm 2015-12-02 12:49:21.000000000 +0100 @@ -3,7 +3,6 @@ use Mojo::Cookie::Request; use Mojo::Path; -use Mojo::Util 'deprecated'; has 'ignore'; has max_cookie_size => 4096; @@ -40,9 +39,6 @@ sub collect { my ($self, $tx) = @_; - # DEPRECATED in Clinking Beer Mugs! - return unless $self->{collecting} // 1; - my $url = $tx->req->url; for my $cookie (@{$tx->res->cookies}) { @@ -60,16 +56,6 @@ } } -# DEPRECATED in Clinking Beer Mugs! -sub collecting { - deprecated 'Mojo::UserAgent::CookieJar::collecting is DEPRECATED in favor of' - . ' Mojo::UserAgent::CookieJar::ignore'; - my $self = shift; - return $self->{collecting} //= 1 unless @_; - $self->{collecting} = shift; - return $self; -} - sub empty { delete shift->{jar} } sub find { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojo/UserAgent.pm new/Mojolicious-6.36/lib/Mojo/UserAgent.pm --- old/Mojolicious-6.33/lib/Mojo/UserAgent.pm 2015-11-21 00:56:42.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojo/UserAgent.pm 2015-12-03 14:48:26.000000000 +0100 @@ -98,9 +98,7 @@ if ($proto eq 'socks') { @options{qw(socks_address socks_port)} = @options{qw(address port)}; ($proto, @options{qw(address port)}) = $t->endpoint($tx); - my $req = $tx->req; - my $userinfo = $req->proxy->userinfo; - $req->via_proxy(0); + my $userinfo = $tx->req->via_proxy(0)->proxy->userinfo; @options{qw(socks_user socks_pass)} = split ':', $userinfo if $userinfo; } @@ -315,7 +313,7 @@ $url->scheme($base->scheme)->authority($base->authority); } - $_ && $_->prepare($tx) for $self->proxy, $self->cookie_jar; + $_->prepare($tx) for $self->proxy, $self->cookie_jar; # Connect and add request timeout if necessary my $id = $self->emit(start => $tx)->_connection($nb, $tx, $cb); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojolicious/Guides/Growing.pod new/Mojolicious-6.36/lib/Mojolicious/Guides/Growing.pod --- old/Mojolicious-6.33/lib/Mojolicious/Guides/Growing.pod 2015-11-18 19:29:05.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojolicious/Guides/Growing.pod 2015-12-02 21:31:39.000000000 +0100 @@ -406,8 +406,8 @@ $app->secrets(['Mojolicious rocks']); -This passphrase is used by the HMAC-SHA1 algorithm to make signed cookies -secure and can be changed at any time to invalidate all existing sessions. +This passphrase is used by the HMAC-SHA1 algorithm to make signed cookies tamper +resistant and can be changed at any time to invalidate all existing sessions. $c->session(user => 'sebastian'); my $user = $c->session('user'); @@ -445,7 +445,7 @@ use lib 'lib'; use MyApp::Model::Users; - # Make signed cookies secure + # Make signed cookies tamper resistant app->secrets(['Mojolicious rocks']); helper users => sub { state $users = MyApp::Model::Users->new }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojolicious/Guides/Tutorial.pod new/Mojolicious-6.36/lib/Mojolicious/Guides/Tutorial.pod --- old/Mojolicious-6.33/lib/Mojolicious/Guides/Tutorial.pod 2015-10-08 18:54:16.000000000 +0200 +++ new/Mojolicious-6.36/lib/Mojolicious/Guides/Tutorial.pod 2015-12-02 21:30:17.000000000 +0100 @@ -734,7 +734,7 @@ Counter: <%= session 'counter' %> Note that you should use custom L<Mojolicious/"secrets"> to make signed cookies -really secure. +really tamper resistant. app->secrets(['My secret passphrase here']); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojolicious/Plugin/DefaultHelpers.pm new/Mojolicious-6.36/lib/Mojolicious/Plugin/DefaultHelpers.pm --- old/Mojolicious-6.33/lib/Mojolicious/Plugin/DefaultHelpers.pm 2015-11-17 05:43:01.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojolicious/Plugin/DefaultHelpers.pm 2015-12-07 16:30:10.000000000 +0100 @@ -128,8 +128,10 @@ } sub _inactivity_timeout { - return unless my $stream = Mojo::IOLoop->stream(shift->tx->connection // ''); - $stream->timeout(shift); + my ($c, $timeout) = @_; + my $stream = Mojo::IOLoop->stream($c->tx->connection // ''); + $stream->timeout($timeout) if $stream; + return $c; } sub _is_fresh { @@ -345,7 +347,7 @@ =head2 inactivity_timeout - $c->inactivity_timeout(3600); + $c = $c->inactivity_timeout(3600); Use L<Mojo::IOLoop/"stream"> to find the current connection and increase timeout if possible. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojolicious/Plugin/PODRenderer.pm new/Mojolicious-6.36/lib/Mojolicious/Plugin/PODRenderer.pm --- old/Mojolicious-6.33/lib/Mojolicious/Plugin/PODRenderer.pm 2015-11-22 00:00:16.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojolicious/Plugin/PODRenderer.pm 2015-11-27 07:04:50.000000000 +0100 @@ -57,7 +57,7 @@ # Rewrite headers my $toc = Mojo::URL->new->fragment('toc'); my @parts; - for my $e ($dom->find('h1, h2, h3')->each) { + for my $e ($dom->find('h1, h2, h3, h4')->each) { push @parts, [] if $e->tag eq 'h1' || !@parts; my $link = Mojo::URL->new->fragment($e->{id}); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/lib/Mojolicious.pm new/Mojolicious-6.36/lib/Mojolicious.pm --- old/Mojolicious-6.33/lib/Mojolicious.pm 2015-11-20 01:58:40.000000000 +0100 +++ new/Mojolicious-6.36/lib/Mojolicious.pm 2015-12-04 18:47:14.000000000 +0100 @@ -43,7 +43,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Clinking Beer Mugs'; -our $VERSION = '6.33'; +our $VERSION = '6.36'; sub AUTOLOAD { my $self = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/mojo/cookie.t new/Mojolicious-6.36/t/mojo/cookie.t --- old/Mojolicious-6.33/t/mojo/cookie.t 2015-11-17 05:38:46.000000000 +0100 +++ new/Mojolicious-6.36/t/mojo/cookie.t 2015-11-30 22:11:21.000000000 +0100 @@ -372,14 +372,26 @@ . ' path=/test; secure; Max-Age=60', 'right result'; is $cookies->[1], undef, 'no more cookies'; -# Parse response cookie with broken Expires value +# Parse response cookie with broken Expires and Domain values $cookies = Mojo::Cookie::Response->parse('foo="ba r"; Expires=Th'); -is $cookies->[0]->name, 'foo', 'right name'; -is $cookies->[0]->value, 'ba r', 'right value'; +is $cookies->[0]->name, 'foo', 'right name'; +is $cookies->[0]->value, 'ba r', 'right value'; +is $cookies->[0]->expires, undef, 'no expires value'; +is $cookies->[0]->domain, undef, 'no domain value'; is $cookies->[1], undef, 'no more cookies'; -$cookies = Mojo::Cookie::Response->parse('foo="ba r"; Expires=Th; Path=/test'); -is $cookies->[0]->name, 'foo', 'right name'; -is $cookies->[0]->value, 'ba r', 'right value'; +$cookies = Mojo::Cookie::Response->parse( + 'foo="ba r"; Expires=Th; Domain=; Path=/test'); +is $cookies->[0]->name, 'foo', 'right name'; +is $cookies->[0]->value, 'ba r', 'right value'; +is $cookies->[0]->expires, undef, 'no expires value'; +is $cookies->[0]->domain, '', 'no domain value'; +is $cookies->[1], undef, 'no more cookies'; +$cookies + = Mojo::Cookie::Response->parse('foo="ba r"; Expires; Domain; Path=/test'); +is $cookies->[0]->name, 'foo', 'right name'; +is $cookies->[0]->value, 'ba r', 'right value'; +is $cookies->[0]->expires, undef, 'no expires value'; +is $cookies->[0]->domain, undef, 'no domain value'; is $cookies->[1], undef, 'no more cookies'; # Response cookie with Max-Age 0 and Expires 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/mojo/daemon.t new/Mojolicious-6.36/t/mojo/daemon.t --- old/Mojolicious-6.33/t/mojo/daemon.t 2015-11-17 05:38:48.000000000 +0100 +++ new/Mojolicious-6.36/t/mojo/daemon.t 2015-11-27 17:53:51.000000000 +0100 @@ -267,7 +267,7 @@ silent => 1 ); is scalar @{$daemon->acceptors}, 0, 'no active acceptors'; -is scalar @{$daemon->start->acceptors}, 1, 'one active acceptor'; +is scalar @{$daemon->start->start->acceptors}, 1, 'one active acceptor'; is $daemon->ioloop->max_connections, 23, 'right value'; $id = $daemon->acceptors->[0]; ok !!Mojo::IOLoop->acceptor($id), 'acceptor has been added'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/mojo/dom.t new/Mojolicious-6.36/t/mojo/dom.t --- old/Mojolicious-6.33/t/mojo/dom.t 2015-11-17 20:29:23.000000000 +0100 +++ new/Mojolicious-6.36/t/mojo/dom.t 2015-11-26 10:33:47.000000000 +0100 @@ -241,6 +241,8 @@ is $dom->at('script')->child_nodes->first->wrap('<i>:)</i>')->root, '<script><i>:)a</i><b>fce</b>1<b>d</b></script>', 'right result'; is $dom->at('i')->child_nodes->first->wrap_content('<b></b>')->root, + '<script><i>:)a</i><b>fce</b>1<b>d</b></script>', 'no changes'; +is $dom->at('i')->child_nodes->first->wrap('<b></b>')->root, '<script><i><b>:)</b>a</i><b>fce</b>1<b>d</b></script>', 'right result'; is $dom->at('b')->child_nodes->first->ancestors->map('tag')->join(','), 'b,i,script', 'right result'; @@ -1268,8 +1270,9 @@ EOF is $dom->at('div')->text, 'A-1', 'right text'; is $dom->at('iv'), undef, 'no result'; -$dom->prepend('l')->prepend('alal')->prepend('a'); -is "$dom", <<EOF, 'no change'; +is $dom->prepend('l')->prepend('alal')->prepend('a')->type, 'root', + 'right type'; +is "$dom", <<EOF, 'no changes'; <ul> 24<div>A-1</div>25<li>A</li><p>A1</p>23 <p>B</p> @@ -1277,8 +1280,8 @@ </ul> <div>D</div> EOF -$dom->append('lalala'); -is "$dom", <<EOF, 'no change'; +is $dom->append('lalala')->type, 'root', 'right type'; +is "$dom", <<EOF, 'no changes'; <ul> 24<div>A-1</div>25<li>A</li><p>A1</p>23 <p>B</p> @@ -2123,7 +2126,10 @@ # Wrap elements $dom = Mojo::DOM->new('<a>Test</a>'); +is "$dom", '<a>Test</a>', 'right result'; is $dom->wrap('<b></b>')->type, 'root', 'right type'; +is "$dom", '<a>Test</a>', 'no changes'; +is $dom->at('a')->wrap('<b></b>')->type, 'tag', 'right type'; is "$dom", '<b><a>Test</a></b>', 'right result'; is $dom->at('b')->strip->at('a')->wrap('A')->tag, 'a', 'right tag'; is "$dom", '<a>Test</a>', 'right result'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/mojo/websocket.t new/Mojolicious-6.36/t/mojo/websocket.t --- old/Mojolicious-6.33/t/mojo/websocket.t 2015-11-17 05:39:08.000000000 +0100 +++ new/Mojolicious-6.36/t/mojo/websocket.t 2015-12-07 16:24:52.000000000 +0100 @@ -111,9 +111,8 @@ }; websocket '/timeout' => sub { - my $c = shift; - $c->inactivity_timeout(0.25); - $c->on(finish => sub { shift->stash->{finished}++ }); + shift->inactivity_timeout(0.25) + ->on(finish => sub { shift->stash->{finished}++ }); }; # URL for WebSocket diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/mojolicious/lib/MojoliciousTest/PODTest.pm new/Mojolicious-6.36/t/mojolicious/lib/MojoliciousTest/PODTest.pm --- old/Mojolicious-6.33/t/mojolicious/lib/MojoliciousTest/PODTest.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Mojolicious-6.36/t/mojolicious/lib/MojoliciousTest/PODTest.pm 2015-12-04 03:41:50.000000000 +0100 @@ -0,0 +1,21 @@ +package MojoliciousTest::PODTest; + +1; + +=head1 One + +PODTest + +=head2 Two + + my $foo = 'bar'; + +=head3 Three + +Hello + +=head4 Four + +World! + +=cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/mojolicious/pod_renderer_lite_app.t new/Mojolicious-6.36/t/mojolicious/pod_renderer_lite_app.t --- old/Mojolicious-6.33/t/mojolicious/pod_renderer_lite_app.t 2015-11-17 05:39:18.000000000 +0100 +++ new/Mojolicious-6.36/t/mojolicious/pod_renderer_lite_app.t 2015-12-04 03:42:55.000000000 +0100 @@ -3,6 +3,10 @@ BEGIN { $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll' } use Test::More; + +use FindBin; +use lib "$FindBin::Bin/lib"; + use Mojolicious::Lite; use Test::Mojo; @@ -51,48 +55,38 @@ # Empty $t->get_ok('/empty')->status_is(200)->content_is(''); -# Perldoc browser (Welcome) -$t->get_ok('/perldoc')->status_is(200)->element_exists('#mojobar') - ->text_is('#TUTORIAL a:nth-of-type(2)', 'TUTORIAL') - ->text_is('#GUIDES a:nth-of-type(2)', 'GUIDES') - ->content_like(qr/Mojolicious guide to the galaxy/); - -# Perldoc browser (Welcome with slash) -$t->get_ok('/perldoc/')->status_is(200) - ->text_is('#TUTORIAL a:nth-of-type(2)', 'TUTORIAL') - ->text_is('#GUIDES a:nth-of-type(2)', 'GUIDES') - ->content_like(qr/Mojolicious guide to the galaxy/) - ->content_unlike(qr/Pirates/); - -# Perldoc browser (Mojo documentation) -$t->get_ok('/perldoc/Mojo')->status_is(200) - ->text_is('h1#SYNOPSIS a:nth-of-type(2)', 'SYNOPSIS') - ->text_is('#handler a:nth-of-type(2)', 'handler') - ->text_like('p', qr/Duct tape for the HTML5 web!/); - -# Perldoc browser (Mojo documentation with format) -$t->get_ok('/perldoc/Mojo.html')->status_is(200) - ->text_is('h1#SYNOPSIS a:nth-of-type(2)', 'SYNOPSIS') - ->text_is('#handler a:nth-of-type(2)', 'handler') - ->text_like('p', qr/Duct tape for the HTML5 web!/); - -# Perldoc browser (negotiated Mojo documentation) -$t->get_ok('/perldoc/Mojo' => {Accept => 'text/html'})->status_is(200) - ->text_is('h1#SYNOPSIS a:nth-of-type(2)', 'SYNOPSIS') - ->text_is('#handler a:nth-of-type(2)', 'handler') - ->text_like('p', qr/Duct tape for the HTML5 web!/); - -# Perldoc browser (Mojo source with format) -$t->get_ok('/perldoc/Mojo.txt')->status_is(200) - ->content_type_is('text/plain;charset=UTF-8') - ->content_like(qr/package Mojo;/); - -# Perldoc browser (negotiated Mojolicious source again) -$t->get_ok('/perldoc/Mojolicious' => {Accept => 'text/plain'})->status_is(200) - ->content_type_is('text/plain;charset=UTF-8')->content_like(qr/\$VERSION/); +# Headings +$t->get_ok('/perldoc/MojoliciousTest/PODTest')->status_is(200) + ->element_exists('h1#One')->element_exists('h2#Two') + ->element_exists('h3#Three')->element_exists('h4#Four') + ->element_exists('a[href=#One]')->element_exists('a[href=#Two]') + ->element_exists('a[href=#Three]')->element_exists('a[href=#Four]') + ->text_like('pre code', qr/\$foo/); + +# Trailing slash +$t->get_ok('/perldoc/MojoliciousTest/PODTest/')->element_exists('#mojobar') + ->text_like('title', qr/PODTest/); + +# Format +$t->get_ok('/perldoc/MojoliciousTest/PODTest.html')->element_exists('#mojobar') + ->text_like('title', qr/PODTest/); + +# Format (source) +$t->get_ok('/perldoc/MojoliciousTest/PODTest' => {Accept => 'text/plain'}) + ->status_is(200)->content_type_is('text/plain;charset=UTF-8') + ->content_like(qr/package MojoliciousTest::PODTest/); + +# Negotiated source +$t->get_ok('/perldoc/MojoliciousTest/PODTest' => {Accept => 'text/plain'}) + ->status_is(200)->content_type_is('text/plain;charset=UTF-8') + ->content_like(qr/package MojoliciousTest::PODTest/); # Perldoc browser (unsupported format) -$t->get_ok('/perldoc/Mojolicious.json')->status_is(204); +$t->get_ok('/perldoc/MojoliciousTest/PODTest.json')->status_is(204); + +# Welcome +$t->get_ok('/perldoc')->status_is(200)->element_exists('#mojobar') + ->text_like('title', qr/Mojolicious guide to the galaxy/); done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-6.33/t/pod_coverage.t new/Mojolicious-6.36/t/pod_coverage.t --- old/Mojolicious-6.33/t/pod_coverage.t 2015-11-18 03:35:46.000000000 +0100 +++ new/Mojolicious-6.36/t/pod_coverage.t 2015-12-02 12:49:40.000000000 +0100 @@ -7,4 +7,4 @@ plan skip_all => 'Test::Pod::Coverage 1.04+ required for this test!' unless eval 'use Test::Pod::Coverage 1.04; 1'; -all_pod_coverage_ok({also_private => [qw(collecting format_regex)]}); +all_pod_coverage_ok({also_private => ['format_regex']});
