Hello community, here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2018-03-06 10:47:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious" Tue Mar 6 10:47:05 2018 rev:92 rq:581948 version:7.70 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2018-02-27 16:58:08.995625665 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2018-03-06 10:47:06.900658996 +0100 @@ -1,0 +2,6 @@ +Fri Mar 2 06:39:56 UTC 2018 - [email protected] + +- updated to 7.70 + see /usr/share/doc/packages/perl-Mojolicious/Changes + +------------------------------------------------------------------- Old: ---- Mojolicious-7.69.tar.gz New: ---- Mojolicious-7.70.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious.spec ++++++ --- /var/tmp/diff_new_pack.6j9Yin/_old 2018-03-06 10:47:07.644632120 +0100 +++ /var/tmp/diff_new_pack.6j9Yin/_new 2018-03-06 10:47:07.648631976 +0100 @@ -17,7 +17,7 @@ Name: perl-Mojolicious -Version: 7.69 +Version: 7.70 Release: 0 %define cpan_name Mojolicious Summary: Real-time web framework ++++++ Mojolicious-7.69.tar.gz -> Mojolicious-7.70.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/Changes new/Mojolicious-7.70/Changes --- old/Mojolicious-7.69/Changes 2018-02-24 19:50:34.000000000 +0100 +++ new/Mojolicious-7.70/Changes 2018-03-01 00:42:26.000000000 +0100 @@ -1,4 +1,10 @@ +7.70 2018-03-01 + - Fixed ordering of sources for content negotiation in Mojolicious::Renderer. + - Fixed a content negotiation bug in Mojolicious::Renderer that prevented all + sources from being considered at the same time. + - Fixed source links in documentation browser. + 7.69 2018-02-24 - Improved respond_to method in Mojolicious::Controller and accepts helper in Mojolicious::Plugin::DefaultHelpers to no longer limit support for multiple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/META.json new/Mojolicious-7.70/META.json --- old/Mojolicious-7.69/META.json 2018-02-24 22:58:27.000000000 +0100 +++ new/Mojolicious-7.70/META.json 2018-03-01 00:45:52.000000000 +0100 @@ -58,6 +58,6 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "7.69", + "version" : "7.70", "x_serialization_backend" : "JSON::PP version 2.97001" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/META.yml new/Mojolicious-7.70/META.yml --- old/Mojolicious-7.69/META.yml 2018-02-24 22:58:27.000000000 +0100 +++ new/Mojolicious-7.70/META.yml 2018-03-01 00:45:52.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.69' +version: '7.70' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/lib/Mojolicious/Controller.pm new/Mojolicious-7.70/lib/Mojolicious/Controller.pm --- old/Mojolicious-7.69/lib/Mojolicious/Controller.pm 2018-02-24 18:40:34.000000000 +0100 +++ new/Mojolicious-7.70/lib/Mojolicious/Controller.pm 2018-03-01 00:41:21.000000000 +0100 @@ -768,8 +768,8 @@ any => sub {...} ); -Automatically select best possible representation for resource from C<Accept> -request header, C<format> stash value or C<format> C<GET>/C<POST> parameter, +Automatically select best possible representation for resource from C<format> +stash value, C<format> C<GET>/C<POST> parameter or C<Accept> request header, defaults to L<Mojolicious::Renderer/"default_format"> or rendering an empty C<204> response. Each representation can be handled with a callback or a hash reference containing arguments to be passed to L</"render">. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/lib/Mojolicious/Guides/Rendering.pod new/Mojolicious-7.70/lib/Mojolicious/Guides/Rendering.pod --- old/Mojolicious-7.69/lib/Mojolicious/Guides/Rendering.pod 2018-02-24 18:37:13.000000000 +0100 +++ new/Mojolicious-7.70/lib/Mojolicious/Guides/Rendering.pod 2018-03-01 00:40:46.000000000 +0100 @@ -381,10 +381,10 @@ ); The best possible representation will be automatically selected from the -C<Accept> request header, C<format> stash value or C<format> C<GET>/C<POST> -parameter and stored in the C<format> stash value. To change MIME type mappings -for the C<Accept> request header or the C<Content-Type> response header you can -use L<Mojolicious/"types">. +C<format> stash value, C<format> C<GET>/C<POST> parameter or C<Accept> request +header and stored in the C<format> stash value. To change MIME type mappings for +the C<Accept> request header or the C<Content-Type> response header you can use +L<Mojolicious/"types">. $c->respond_to( json => {json => {hello => 'world'}}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/lib/Mojolicious/Plugin/DefaultHelpers.pm new/Mojolicious-7.70/lib/Mojolicious/Plugin/DefaultHelpers.pm --- old/Mojolicious-7.69/lib/Mojolicious/Plugin/DefaultHelpers.pm 2018-02-19 00:56:48.000000000 +0100 +++ new/Mojolicious-7.70/lib/Mojolicious/Plugin/DefaultHelpers.pm 2018-03-01 00:39:54.000000000 +0100 @@ -215,10 +215,10 @@ my $formats = $c->accepts; my $format = $c->accepts('html', 'json', 'txt'); -Select best possible representation for resource from C<Accept> request header, -C<format> stash value or C<format> C<GET>/C<POST> parameter with -L<Mojolicious::Renderer/"accepts">, defaults to returning the first extension -if no preference could be detected. +Select best possible representation for resource from C<format> stash value, +C<format> C<GET>/C<POST> parameter or C<Accept> request header with +L<Mojolicious::Renderer/"accepts">, defaults to returning the first extension if +no preference could be detected. # Check if JSON is acceptable $c->render(json => {hello => 'world'}) if $c->accepts('json'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/lib/Mojolicious/Plugin/PODRenderer.pm new/Mojolicious-7.70/lib/Mojolicious/Plugin/PODRenderer.pm --- old/Mojolicious-7.69/lib/Mojolicious/Plugin/PODRenderer.pm 2018-02-19 00:56:49.000000000 +0100 +++ new/Mojolicious-7.70/lib/Mojolicious/Plugin/PODRenderer.pm 2018-03-01 00:16:58.000000000 +0100 @@ -26,7 +26,7 @@ # Perldoc browser return undef if $conf->{no_perldoc}; - my $defaults = {module => 'Mojolicious/Guides', format => 'html'}; + my $defaults = {module => 'Mojolicious/Guides'}; return $app->routes->any( '/perldoc/:module' => $defaults => [module => qr/[^.]+/] => \&_perldoc); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/lib/Mojolicious/Renderer.pm new/Mojolicious-7.70/lib/Mojolicious/Renderer.pm --- old/Mojolicious-7.69/lib/Mojolicious/Renderer.pm 2018-02-24 18:37:24.000000000 +0100 +++ new/Mojolicious-7.70/lib/Mojolicious/Renderer.pm 2018-03-01 00:39:36.000000000 +0100 @@ -27,10 +27,9 @@ # List representations my $req = $c->req; - my @exts = @{$c->app->types->detect($req->headers->accept)}; - if (!@exts && (my $format = $c->stash->{format} || $req->param('format'))) { - push @exts, $format; - } + my $fmt = $c->stash->{format} || $req->param('format'); + my @exts = $fmt ? ($fmt) : (); + push @exts, @{$c->app->types->detect($req->headers->accept)}; return \@exts unless @_; # Find best representation @@ -330,8 +329,8 @@ my $best = $renderer->accepts(Mojolicious::Controller->new, 'html', 'json'); Select best possible representation for L<Mojolicious::Controller> object from -C<Accept> request header, C<format> stash value or C<format> C<GET>/C<POST> -parameter, defaults to returning the first extension if no preference could be +C<format> stash value, C<format> C<GET>/C<POST> parameter or C<Accept> request +header, defaults to returning the first extension if no preference could be detected. =head2 add_handler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/lib/Mojolicious.pm new/Mojolicious-7.70/lib/Mojolicious.pm --- old/Mojolicious-7.69/lib/Mojolicious.pm 2018-02-23 19:44:33.000000000 +0100 +++ new/Mojolicious-7.70/lib/Mojolicious.pm 2018-02-24 22:59:17.000000000 +0100 @@ -65,7 +65,7 @@ has validator => sub { Mojolicious::Validator->new }; our $CODENAME = 'Doughnut'; -our $VERSION = '7.69'; +our $VERSION = '7.70'; sub AUTOLOAD { my $self = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/t/mojolicious/pod_renderer_lite_app.t new/Mojolicious-7.70/t/mojolicious/pod_renderer_lite_app.t --- old/Mojolicious-7.69/t/mojolicious/pod_renderer_lite_app.t 2018-02-19 00:43:06.000000000 +0100 +++ new/Mojolicious-7.70/t/mojolicious/pod_renderer_lite_app.t 2018-03-01 00:03:08.000000000 +0100 @@ -76,6 +76,12 @@ ->status_is(200)->content_type_is('text/plain;charset=UTF-8') ->content_like(qr/package MojoliciousTest::PODTest/); +# Format (source with extension) +$t->get_ok('/perldoc/MojoliciousTest/PODTest.txt' => + {Accept => 'text/html,application/xhtml+xml,application/xml'}) + ->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') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.69/t/mojolicious/restful_lite_app.t new/Mojolicious-7.70/t/mojolicious/restful_lite_app.t --- old/Mojolicious-7.69/t/mojolicious/restful_lite_app.t 2018-02-24 18:32:59.000000000 +0100 +++ new/Mojolicious-7.70/t/mojolicious/restful_lite_app.t 2018-03-01 00:31:49.000000000 +0100 @@ -85,7 +85,7 @@ ->json_is({best => 'txt'}); # Accept "txt" with everything -$t->get_ok('/accepts.html?format=json' => {Accept => 'text/plain'}) +$t->get_ok('/accepts.txt?format=json' => {Accept => 'text/html'}) ->status_is(200)->json_is({best => 'txt'}); # Nothing @@ -124,10 +124,6 @@ $t->get_ok('/rest.html' => {Accept => 'text/html'})->status_is(200) ->content_type_is('text/html;charset=UTF-8')->text_is('html > body', 'works'); -# Accept "html" with wrong format -$t->get_ok('/rest.json' => {Accept => 'text/html'})->status_is(200) - ->content_type_is('text/html;charset=UTF-8')->text_is('html > body', 'works'); - # Accept "html" with quality $t->get_ok('/rest' => {Accept => 'text/html;q=9'})->status_is(200) ->content_type_is('text/html;charset=UTF-8')->text_is('html > body', 'works'); @@ -168,11 +164,6 @@ ->content_type_is('application/json;charset=UTF-8') ->json_is({just => 'works'}); -# Accept "json" with wrong format -$t->get_ok('/rest.png' => {Accept => 'application/json'})->status_is(200) - ->content_type_is('application/json;charset=UTF-8') - ->json_is({just => 'works'}); - # Accept "json" with quality $t->get_ok('/rest' => {Accept => 'application/json;q=9'})->status_is(200) ->content_type_is('application/json;charset=UTF-8') @@ -214,10 +205,6 @@ $t->get_ok('/rest.xml' => {Accept => 'application/xml'})->status_is(200) ->content_type_is('application/xml')->text_is(just => 'works'); -# Accept "xml" with wrong format -$t->get_ok('/rest.txt' => {Accept => 'application/xml'})->status_is(200) - ->content_type_is('application/xml')->text_is(just => 'works'); - # Accept "xml" with quality $t->get_ok('/rest' => {Accept => 'application/xml;q=9'})->status_is(200) ->content_type_is('application/xml')->text_is(just => 'works'); @@ -267,11 +254,6 @@ ->content_type_is('text/html;charset=UTF-8') ->text_is('html > body', 'works too'); -# Accept "html" with wrong format -$t->post_ok('/rest.json' => {Accept => 'text/html'})->status_is(200) - ->content_type_is('text/html;charset=UTF-8') - ->text_is('html > body', 'works too'); - # Accept "html" with quality $t->post_ok('/rest' => {Accept => 'text/html;q=9'})->status_is(200) ->content_type_is('text/html;charset=UTF-8') @@ -338,11 +320,6 @@ ->content_type_is('application/json;charset=UTF-8') ->json_is({just => 'works too'}); -# Accept "json" with wrong format -$t->post_ok('/rest.png' => {Accept => 'application/json'})->status_is(200) - ->content_type_is('application/json;charset=UTF-8') - ->json_is({just => 'works too'}); - # Accept "json" with quality $t->post_ok('/rest' => {Accept => 'application/json;q=9'})->status_is(200) ->content_type_is('application/json;charset=UTF-8') @@ -406,10 +383,6 @@ $t->post_ok('/rest.xml' => {Accept => 'application/xml'})->status_is(200) ->content_type_is('application/xml')->text_is(just => 'works too'); -# Accept "xml" with wrong format -$t->post_ok('/rest.txt' => {Accept => 'application/xml'})->status_is(200) - ->content_type_is('application/xml')->text_is(just => 'works too'); - # Accept "xml" with quality $t->post_ok('/rest' => {Accept => 'application/xml;q=9'})->status_is(200) ->content_type_is('application/xml')->text_is(just => 'works too'); @@ -456,9 +429,10 @@ $t->post_ok('/rest' => {Accept => 'image/png'})->status_is(201) ->content_type_is('text/html;charset=UTF-8')->content_is('works too'); -# Unsupported accept with supported query -$t->post_ok('/rest?format=json' => {Accept => 'image/png'})->status_is(201) - ->content_type_is('text/html;charset=UTF-8')->content_is('works too'); +# Unsupported everything +$t->post_ok('/rest.png?format=jpg' => {Accept => 'image/whatever'}) + ->status_is(201)->content_type_is('text/html;charset=UTF-8') + ->content_is('works too'); # Unsupported format $t->post_ok('/rest.png')->status_is(201)
