Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2018-01-09 14:35:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious" Tue Jan 9 14:35:03 2018 rev:85 rq:562419 version:7.60 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2017-12-23 12:17:45.380644644 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2018-01-09 14:35:04.486781430 +0100 @@ -1,0 +2,19 @@ +Thu Jan 4 06:53:25 UTC 2018 - co...@suse.com + +- updated to 7.60 + see /usr/share/doc/packages/perl-Mojolicious/Changes + + 7.60 2018-01-02 + - Deprecated use of Mojo::Promise::all and Mojo::Promise::race as instance + methods. + - Improved all and race methods in Mojo::Promise to be able to handle + arbitrary then-ables. + - Improved number detection in Mojo::JSON with a workaround for an upcoming + breaking change in Perl 5.28. (haarg) + - Improved HTML Living Standard compliance of Mojo::DOM::HTML. + - Fixed a bug in Mojo::Base that prevented composition of multiple roles. + (aferreira, batman) + - Fixed a bug in Mojolicious::Static where text files from DATA sections would + not be UTF-8 encoded. (Grinnz) + +------------------------------------------------------------------- Old: ---- Mojolicious-7.59.tar.gz New: ---- Mojolicious-7.60.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.ear77L/_old 2018-01-09 14:35:05.186748595 +0100 +++ /var/tmp/diff_new_pack.ear77L/_new 2018-01-09 14:35:05.190748408 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Mojolicious # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 7.59 +Version: 7.60 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework ++++++ Mojolicious-7.59.tar.gz -> Mojolicious-7.60.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/Changes new/Mojolicious-7.60/Changes --- old/Mojolicious-7.59/Changes 2017-12-16 01:48:47.000000000 +0100 +++ new/Mojolicious-7.60/Changes 2018-01-03 14:03:42.000000000 +0100 @@ -1,4 +1,17 @@ +7.60 2018-01-02 + - Deprecated use of Mojo::Promise::all and Mojo::Promise::race as instance + methods. + - Improved all and race methods in Mojo::Promise to be able to handle + arbitrary then-ables. + - Improved number detection in Mojo::JSON with a workaround for an upcoming + breaking change in Perl 5.28. (haarg) + - Improved HTML Living Standard compliance of Mojo::DOM::HTML. + - Fixed a bug in Mojo::Base that prevented composition of multiple roles. + (aferreira, batman) + - Fixed a bug in Mojolicious::Static where text files from DATA sections would + not be UTF-8 encoded. (Grinnz) + 7.59 2017-12-15 - Moved home and ua attributes from Mojo to Mojolicious. - Changed Mojo::IOLoop::Client to only start a thread pool with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/META.json new/Mojolicious-7.60/META.json --- old/Mojolicious-7.59/META.json 2017-12-17 18:58:31.000000000 +0100 +++ new/Mojolicious-7.60/META.json 2018-01-03 14:59:45.000000000 +0100 @@ -58,6 +58,6 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "7.59", - "x_serialization_backend" : "JSON::PP version 2.97000" + "version" : "7.60", + "x_serialization_backend" : "JSON::PP version 2.97001" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/META.yml new/Mojolicious-7.60/META.yml --- old/Mojolicious-7.59/META.yml 2017-12-17 18:58:30.000000000 +0100 +++ new/Mojolicious-7.60/META.yml 2018-01-03 14:59:44.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.59' +version: '7.60' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojo/Base.pm new/Mojolicious-7.60/lib/Mojo/Base.pm --- old/Mojolicious-7.59/lib/Mojo/Base.pm 2017-12-14 19:39:45.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojo/Base.pm 2018-01-03 13:49:53.000000000 +0100 @@ -66,24 +66,18 @@ # Base if ($flags[0] eq '-base') { $flags[0] = $class } - # Strict - elsif ($flags[0] eq '-strict') { $flags[0] = undef } - # Role - elsif ($flags[0] eq '-role') { + if ($flags[0] eq '-role') { Carp::croak 'Role::Tiny 2.000001+ is required for roles' unless ROLES; + Mojo::Util::monkey_patch($caller, 'has', sub { attr($caller, @_) }); eval "package $caller; use Role::Tiny; 1" or die $@; } - # Module - elsif ($flags[0] && !$flags[0]->can('new')) { - require(Mojo::Util::class_to_path($flags[0])); - } - - # "has" and possibly ISA - if ($flags[0]) { + # Module and not -strict + elsif ($flags[0] !~ /^-/) { no strict 'refs'; - push @{"${caller}::ISA"}, $flags[0] unless $flags[0] eq '-role'; + require(Mojo::Util::class_to_path($flags[0])) unless $flags[0]->can('new'); + push @{"${caller}::ISA"}, $flags[0]; Mojo::Util::monkey_patch($caller, 'has', sub { attr($caller, @_) }); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojo/DOM/HTML.pm new/Mojolicious-7.60/lib/Mojo/DOM/HTML.pm --- old/Mojolicious-7.59/lib/Mojo/DOM/HTML.pm 2017-12-14 19:39:42.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojo/DOM/HTML.pm 2018-01-03 13:49:50.000000000 +0100 @@ -51,8 +51,9 @@ # HTML elements that break paragraphs map { $END{$_} = 'p' } ( - qw(address article aside blockquote dir div dl fieldset footer form h1 h2), - qw(h3 h4 h5 h6 header hr main menu nav ol p pre section table ul) + qw(address article aside blockquote details div dl fieldset figcaption), + qw(figure footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p), + qw(pre section table ul) ); # HTML table elements with optional end tags diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojo/JSON.pm new/Mojolicious-7.60/lib/Mojo/JSON.pm --- old/Mojolicious-7.59/lib/Mojo/JSON.pm 2017-12-15 17:49:34.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojo/JSON.pm 2018-01-03 13:49:54.000000000 +0100 @@ -251,7 +251,8 @@ # Number no warnings 'numeric'; return $value - if length((my $dummy = '') & $value) + if !utf8::is_utf8($value) + && length((my $dummy = '') & $value) && 0 + $value eq $value && $value * 0 == 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojo/Message/Response.pm new/Mojolicious-7.60/lib/Mojo/Message/Response.pm --- old/Mojolicious-7.59/lib/Mojo/Message/Response.pm 2017-12-14 19:39:38.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojo/Message/Response.pm 2018-01-03 13:49:45.000000000 +0100 @@ -12,7 +12,7 @@ 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', # RFC 2518 (WebDAV) - 103 => 'Early Hints', # RFC XXXX + 103 => 'Early Hints', # RFC 8297 200 => 'OK', 201 => 'Created', 202 => 'Accepted', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojo/Promise.pm new/Mojolicious-7.60/lib/Mojo/Promise.pm --- old/Mojolicious-7.59/lib/Mojo/Promise.pm 2017-12-14 19:39:34.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojo/Promise.pm 2018-01-03 13:49:42.000000000 +0100 @@ -3,13 +3,19 @@ use Mojo::IOLoop; use Scalar::Util qw(blessed weaken); +use Mojo::Util 'deprecated'; has ioloop => sub { Mojo::IOLoop->singleton }; sub all { - my ($class, @promises) = (ref $_[0] ? (undef, @_) : @_); + my ($class, @promises) = @_; - my $all = $promises[0]->_clone; + # DEPRECATED! + unshift(@promises, $class) + and deprecated 'Use of Mojo::Promise::all as instance method is DEPRECATED' + if ref $class; + + my $all = $class->new; my $results = []; my $remaining = scalar @promises; @@ -41,10 +47,17 @@ } sub race { - my ($class, @promises) = (ref $_[0] ? (undef, @_) : @_); - my $race = $promises[0]->_clone; - $_->then(sub { $race->resolve(@_) }, sub { $race->reject(@_) }) for @promises; - return $race; + my ($class, @promises) = @_; + + # DEPRECATED! + unshift(@promises, $class) + and deprecated 'Use of Mojo::Promise::race as instance method is DEPRECATED' + if ref $class; + + my $new = $class->new; + $_->then(sub { $new->resolve(@_) }, sub { $new->reject(@_) }) for @promises; + + return $new; } sub reject { shift->_settle('reject', @_) } @@ -202,14 +215,12 @@ =head2 all my $new = Mojo::Promise->all(@promises); - my $new = $promise->all(@promises); Returns a new L<Mojo::Promise> object that either fulfills when all of the -passed L<Mojo::Promise> objects (including the invocant) have fulfilled or -rejects as soon as one of them rejects. If the returned promise fulfills, it is -fulfilled with the values from the fulfilled promises in the same order as the -passed promises. This method can be useful for aggregating results of multiple -promises. +passed L<Mojo::Promise> objects have fulfilled or rejects as soon as one of them +rejects. If the returned promise fulfills, it is fulfilled with the values from +the fulfilled promises in the same order as the passed promises. This method can +be useful for aggregating results of multiple promises. =head2 catch @@ -253,11 +264,10 @@ =head2 race my $new = Mojo::Promise->race(@promises); - my $new = $promise->race(@promises); Returns a new L<Mojo::Promise> object that fulfills or rejects as soon as one of -the passed L<Mojo::Promise> objects (including the invocant) fulfills or -rejects, with the value or reason from that promise. +the passed L<Mojo::Promise> objects fulfills or rejects, with the value or +reason from that promise. =head2 reject @@ -265,12 +275,18 @@ Reject the promise with one or more rejection reasons. + # Generate rejected promise + my $promise = Mojo::Promise->new->reject('Something went wrong: Oops'); + =head2 resolve $promise = $promise->resolve(@value); Resolve the promise with one or more fulfillment values. + # Generate fulfilled promise + my $promise = Mojo::Promise->new->resolve('The result is: 24'); + =head2 then my $new = $promise->then(sub {...}); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojo.pm new/Mojolicious-7.60/lib/Mojo.pm --- old/Mojolicious-7.59/lib/Mojo.pm 2017-12-16 01:45:44.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojo.pm 2018-01-03 13:49:40.000000000 +0100 @@ -55,6 +55,10 @@ L<Mojo::DOM>, L<Mojo::JSON>, L<Mojo::Server::Daemon>, L<Mojo::Server::Prefork>, L<Mojo::IOLoop> and L<Mojo::Template>. +The class L<Mojo> serves as an abstract base class for web frameworks like +L<Mojolicious> and L<Mojolicious::Lite>. It provides essentials like the +L</"log"> attribute, which web servers like L<Mojo::Server::Daemon> depend on. + See L<Mojolicious::Guides> for more! =head1 ATTRIBUTES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojolicious/Static.pm new/Mojolicious-7.60/lib/Mojolicious/Static.pm --- old/Mojolicious-7.59/lib/Mojolicious/Static.pm 2017-12-14 19:39:50.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojolicious/Static.pm 2018-01-03 13:49:58.000000000 +0100 @@ -6,8 +6,8 @@ use Mojo::Date; use Mojo::File 'path'; use Mojo::Home; -use Mojo::Loader 'data_section'; -use Mojo::Util 'md5_sum'; +use Mojo::Loader qw(data_section file_is_binary); +use Mojo::Util qw(encode md5_sum); # Bundled files my $PUBLIC = Mojo::Home->new(Mojo::Home->new->mojo_lib_dir) @@ -137,9 +137,10 @@ $self->warmup unless $self->{index}; # Find file - return undef - unless defined(my $data = data_section($self->{index}{$rel}, $rel)); - return Mojo::Asset::Memory->new->add_chunk($data); + my @args = ($self->{index}{$rel}, $rel); + return undef unless defined(my $data = data_section(@args)); + return Mojo::Asset::Memory->new->add_chunk( + file_is_binary(@args) ? $data : encode 'UTF-8', $data); } sub _get_file { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojolicious/resources/templates/mojo/menubar.html.ep new/Mojolicious-7.60/lib/Mojolicious/resources/templates/mojo/menubar.html.ep --- old/Mojolicious-7.59/lib/Mojolicious/resources/templates/mojo/menubar.html.ep 2017-11-24 22:34:55.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojolicious/resources/templates/mojo/menubar.html.ep 2017-12-22 12:22:45.000000000 +0100 @@ -121,7 +121,7 @@ }); }); $(function () { - $('a[href^="#"]').addClass('mojoscroll').on('click', function (e) { + $('a[href^="#"]').addClass('mojoscroll').on('click', function (e) { e.preventDefault(); e.stopPropagation(); var hash = '#' + this.href.split('#')[1]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/lib/Mojolicious.pm new/Mojolicious-7.60/lib/Mojolicious.pm --- old/Mojolicious-7.59/lib/Mojolicious.pm 2017-12-16 01:46:36.000000000 +0100 +++ new/Mojolicious-7.60/lib/Mojolicious.pm 2018-01-03 13:49:41.000000000 +0100 @@ -66,7 +66,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Doughnut'; -our $VERSION = '7.59'; +our $VERSION = '7.60'; sub AUTOLOAD { my $self = shift; @@ -767,7 +767,7 @@ =head2 Mojolicious Artwork - Copyright (C) 2010-2017, Sebastian Riedel. + Copyright (C) 2010-2018, Sebastian Riedel. Licensed under the CC-SA License, Version 4.0 L<http://creativecommons.org/licenses/by-sa/4.0>. @@ -1141,7 +1141,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2008-2017, Sebastian Riedel and others. +Copyright (C) 2008-2018, Sebastian Riedel and others. This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/t/mojo/delay.t new/Mojolicious-7.60/t/mojo/delay.t --- old/Mojolicious-7.59/t/mojo/delay.t 2017-12-14 19:38:29.000000000 +0100 +++ new/Mojolicious-7.60/t/mojo/delay.t 2018-01-03 14:03:42.000000000 +0100 @@ -11,7 +11,7 @@ my $delay2 = Mojo::IOLoop::Delay->new->then(sub {@_}); my $delay3 = Mojo::IOLoop::Delay->new->then(sub {@_}); my @results; -$delay->all($delay2, $delay3)->then(sub { @results = @_ }); +Mojo::Promise->all($delay, $delay2, $delay3)->then(sub { @results = @_ }); $delay2->resolve('second'); $delay3->resolve('third'); $delay->resolve('first'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/t/mojo/promise.t new/Mojolicious-7.60/t/mojo/promise.t --- old/Mojolicious-7.59/t/mojo/promise.t 2017-12-14 19:38:25.000000000 +0100 +++ new/Mojolicious-7.60/t/mojo/promise.t 2018-01-03 13:49:01.000000000 +0100 @@ -150,7 +150,7 @@ $promise2 = Mojo::Promise->new->then(sub {@_}); $promise3 = Mojo::Promise->new->then(sub {@_}); (@results, @errors) = (); -$promise->race($promise2, $promise3) +Mojo::Promise->race($promise, $promise2, $promise3) ->then(sub { @results = @_ }, sub { @errors = @_ }); $promise2->reject('second'); $promise3->resolve('third'); @@ -176,7 +176,7 @@ $promise2 = Mojo::Promise->new->then(sub {@_}); $promise3 = Mojo::Promise->new->then(sub {@_}); (@results, @errors) = (); -$promise->all($promise2, $promise3) +Mojo::Promise->all($promise, $promise2, $promise3) ->then(sub { @results = @_ }, sub { @errors = @_ }); $promise2->resolve('second'); $promise3->reject('third'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/t/mojo/roles.t new/Mojolicious-7.60/t/mojo/roles.t --- old/Mojolicious-7.59/t/mojo/roles.t 2017-12-14 19:38:17.000000000 +0100 +++ new/Mojolicious-7.60/t/mojo/roles.t 2018-01-03 13:48:52.000000000 +0100 @@ -97,6 +97,13 @@ is $obj7->whisper, 'psst, joel', 'method from first role'; is $obj7->hello, 'HEY! JOEL!!!', 'method from second role'; +# Multiple Mojo::Base roles +my $obj8 = Mojo::RoleTest->with_roles('+quiet', 'Mojo::RoleTest::Hello') + ->new(name => 'Joel'); +is $obj8->name, 'Joel', 'base attribute'; +is $obj8->whisper, 'psst, joel', 'method from first role'; +is $obj8->hello, 'hello mojo!', 'method from second role'; + # Classes that are not subclasses of Mojo::Base my $stream = Mojo::ByteStream->with_roles('Mojo::RoleTest::Hello')->new; is $stream->hello, 'hello mojo!', 'right result'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/t/mojo/user_agent.t new/Mojolicious-7.60/t/mojo/user_agent.t --- old/Mojolicious-7.59/t/mojo/user_agent.t 2017-12-14 19:38:31.000000000 +0100 +++ new/Mojolicious-7.60/t/mojo/user_agent.t 2018-01-03 14:03:42.000000000 +0100 @@ -136,7 +136,7 @@ my @results; my $p1 = $ua->get_p('/'); my $p2 = $ua->get_p('/'); -$p1->all($p2)->then( +Mojo::Promise->all($p1, $p2)->then( sub { my ($first, $second) = @_; push @results, $first, $second; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.59/t/mojolicious/static_lite_app.t new/Mojolicious-7.60/t/mojolicious/static_lite_app.t --- old/Mojolicious-7.59/t/mojolicious/static_lite_app.t 2017-12-14 19:38:35.000000000 +0100 +++ new/Mojolicious-7.60/t/mojolicious/static_lite_app.t 2018-01-03 13:49:10.000000000 +0100 @@ -216,6 +216,10 @@ ->header_is(Server => 'Mojolicious (Perl)') ->header_is('Accept-Ranges' => 'bytes')->content_is(''); +# UTF-8 encoded inline file +$t->get_ok('/static_utf8.txt')->status_is(200) + ->header_is(Server => 'Mojolicious (Perl)')->content_is("I ♥ Unicode\n"); + done_testing(); __DATA__ @@ -224,3 +228,6 @@ @@ static.txt (base64) dGVzdCAxMjMKbGFsYWxh + +@@ static_utf8.txt +I ♥ Unicode