Hello community,

here is the log from the commit of package perl-Mojolicious for 
openSUSE:Factory checked in at 2017-08-06 11:25:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojolicious"

Sun Aug  6 11:25:34 2017 rev:72 rq:514518 version:7.39

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes        
2017-07-28 09:40:00.748744970 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes   
2017-08-06 11:25:37.924915911 +0200
@@ -1,0 +2,26 @@
+Fri Aug  4 05:56:01 UTC 2017 - co...@suse.com
+
+- updated to 7.39
+   see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+  7.39  2017-08-03
+    - Removed experimental close_idle_connections method from
+      Mojo::Server::Daemon.
+    - Increased default graceful_timeout from 60 to 120 seconds in
+      Mojo::Server::Prefork.
+    - Improve Mojo::Server::Daemon to log request errors.
+    - Fixed a bug where Mojo::Server::Daemon would close connections too 
quickly
+      and interrupt requests.
+
+-------------------------------------------------------------------
+Wed Aug  2 05:57:43 UTC 2017 - co...@suse.com
+
+- updated to 7.38
+   see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+  7.38  2017-07-30
+    - Added extra attribute to Mojolicious::Static. (jabberwok)
+    - Improve Mojo::URL performance significantly.
+    - Fixed memory leak in Mojo::URL that was caused by a Perl 5.24 bug.
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-7.37.tar.gz

New:
----
  Mojolicious-7.39.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.JVC7zt/_old  2017-08-06 11:25:39.308720961 +0200
+++ /var/tmp/diff_new_pack.JVC7zt/_new  2017-08-06 11:25:39.324718707 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojolicious
-Version:        7.37
+Version:        7.39
 Release:        0
 %define cpan_name Mojolicious
 Summary:        Real-time web framework

++++++ Mojolicious-7.37.tar.gz -> Mojolicious-7.39.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/Changes new/Mojolicious-7.39/Changes
--- old/Mojolicious-7.37/Changes        2017-07-21 10:00:45.000000000 +0200
+++ new/Mojolicious-7.39/Changes        2017-08-03 10:38:56.000000000 +0200
@@ -1,4 +1,18 @@
 
+7.39  2017-08-03
+  - Removed experimental close_idle_connections method from
+    Mojo::Server::Daemon.
+  - Increased default graceful_timeout from 60 to 120 seconds in
+    Mojo::Server::Prefork.
+  - Improve Mojo::Server::Daemon to log request errors.
+  - Fixed a bug where Mojo::Server::Daemon would close connections too quickly
+    and interrupt requests.
+
+7.38  2017-07-30
+  - Added extra attribute to Mojolicious::Static. (jabberwok)
+  - Improve Mojo::URL performance significantly.
+  - Fixed memory leak in Mojo::URL that was caused by a Perl 5.24 bug.
+
 7.37  2017-07-21
   - Added slugify method to Mojo::ByteStream. (Grinnz)
   - Added slugify function to Mojo::Util. (Grinnz)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/MANIFEST 
new/Mojolicious-7.39/MANIFEST
--- old/Mojolicious-7.37/MANIFEST       2017-07-24 09:54:46.000000000 +0200
+++ new/Mojolicious-7.39/MANIFEST       2017-08-03 10:48:59.000000000 +0200
@@ -7,7 +7,6 @@
 examples/hello-template.pl
 examples/hello.pl
 examples/microhttpd.pl
-lib/.DS_Store
 lib/Mojo.pm
 lib/Mojo/Asset.pm
 lib/Mojo/Asset/File.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/MANIFEST.SKIP 
new/Mojolicious-7.39/MANIFEST.SKIP
--- old/Mojolicious-7.37/MANIFEST.SKIP  2017-07-17 21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/MANIFEST.SKIP  2017-07-28 12:02:41.000000000 +0200
@@ -5,3 +5,4 @@
 ^MYMETA\.
 ^blib
 ^pm_to_blib
+\B\.DS_Store
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/META.json 
new/Mojolicious-7.39/META.json
--- old/Mojolicious-7.37/META.json      2017-07-24 09:54:46.000000000 +0200
+++ new/Mojolicious-7.39/META.json      2017-08-03 10:48:59.000000000 +0200
@@ -58,6 +58,6 @@
       },
       "x_IRC" : "irc://irc.perl.org/#mojo"
    },
-   "version" : "7.37",
+   "version" : "7.39",
    "x_serialization_backend" : "JSON::PP version 2.94"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/META.yml 
new/Mojolicious-7.39/META.yml
--- old/Mojolicious-7.37/META.yml       2017-07-24 09:54:46.000000000 +0200
+++ new/Mojolicious-7.39/META.yml       2017-08-03 10:48:59.000000000 +0200
@@ -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.37'
+version: '7.39'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
Binary files old/Mojolicious-7.37/lib/.DS_Store and 
new/Mojolicious-7.39/lib/.DS_Store differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/lib/Mojo/Server/Daemon.pm 
new/Mojolicious-7.39/lib/Mojo/Server/Daemon.pm
--- old/Mojolicious-7.37/lib/Mojo/Server/Daemon.pm      2017-07-17 
21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/lib/Mojo/Server/Daemon.pm      2017-08-02 
12:19:46.000000000 +0200
@@ -25,13 +25,6 @@
   $loop->remove($_) for keys %{$self->{connections} || {}}, 
@{$self->acceptors};
 }
 
-sub close_idle_connections {
-  my $self = shift;
-  my $c    = $self->{connections};
-  my $loop = $self->ioloop;
-  !$c->{$_}{tx} and $c->{$_}{requests} and $loop->remove($_) for keys %$c;
-}
-
 sub ports {
   [map { $_[0]->ioloop->acceptor($_)->port } @{$_[0]->acceptors}];
 }
@@ -96,8 +89,11 @@
     request => sub {
       my $tx = shift;
 
+      my $req = $tx->req;
+      if (my $error = $req->error) { $self->_debug($id, $error->{message}) }
+
       # WebSocket
-      if ($tx->req->is_handshake) {
+      if ($req->is_handshake) {
         my $ws = $self->{connections}{$id}{next}
           = Mojo::Transaction::WebSocket->new(handshake => $tx);
         $self->emit(request => server_handshake $ws);
@@ -109,7 +105,8 @@
       # Last keep-alive request or corrupted connection
       my $c = $self->{connections}{$id};
       $tx->res->headers->connection('close')
-        if $c->{requests} >= $self->max_requests || $tx->req->error;
+        and ++Mojo::IOLoop->stream($id)->{closed}
+        if $c->{requests} >= $self->max_requests || $req->error;
 
       $tx->on(resume => sub { $self->_write($id) });
       $self->_write($id);
@@ -480,13 +477,6 @@
 L<Mojo::Server::Daemon> inherits all methods from L<Mojo::Server> and
 implements the following new ones.
 
-=head2 close_idle_connections
-
-  $daemon->close_idle_connections;
-
-Close all connections without active requests. Note that this method is
-EXPERIMENTAL and might change without warning!
-
 =head2 ports
 
   my $ports = $daemon->ports;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/lib/Mojo/Server/Prefork.pm 
new/Mojolicious-7.39/lib/Mojo/Server/Prefork.pm
--- old/Mojolicious-7.37/lib/Mojo/Server/Prefork.pm     2017-07-17 
21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/lib/Mojo/Server/Prefork.pm     2017-08-03 
10:37:33.000000000 +0200
@@ -10,7 +10,7 @@
 
 has accepts            => 10000;
 has cleanup            => 1;
-has graceful_timeout   => 60;
+has graceful_timeout   => 120;
 has heartbeat_timeout  => 30;
 has heartbeat_interval => 5;
 has pid_file           => sub { path(tmpdir, 'prefork.pid')->to_string };
@@ -155,7 +155,7 @@
   # Clean worker environment
   $SIG{$_} = 'DEFAULT' for qw(CHLD INT TERM TTIN TTOU);
   $SIG{QUIT} = sub { $loop->stop_gracefully };
-  $loop->on(finish => sub { $self->max_requests(1)->close_idle_connections });
+  $loop->on(finish => sub { $self->max_requests(1) });
   delete $self->{reader};
   srand;
 
@@ -382,8 +382,9 @@
   $prefork    = $prefork->graceful_timeout(15);
 
 Maximum amount of time in seconds stopping a worker gracefully may take before
-being forced, defaults to C<60>. Note that this value should usually be a 
little
-larger than the maximum amount of time you expect any one request to take.
+being forced, defaults to C<120>. Note that this value should usually be a
+little larger than the maximum amount of time you expect any one request to
+take.
 
 =head2 heartbeat_interval
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/lib/Mojo/Util.pm 
new/Mojolicious-7.39/lib/Mojo/Util.pm
--- old/Mojolicious-7.37/lib/Mojo/Util.pm       2017-07-21 09:58:28.000000000 
+0200
+++ new/Mojolicious-7.39/lib/Mojo/Util.pm       2017-07-29 14:34:45.000000000 
+0200
@@ -55,8 +55,8 @@
 # HTML entities
 my $ENTITY_RE = qr/&(?:\#((?:[0-9]{1,7}|x[0-9a-fA-F]{1,6}));|(\w+[;=]?))/;
 
-# Encoding cache
-my %CACHE;
+# Encoding and pattern cache
+my (%ENCODING, %PATTERN);
 
 our @EXPORT_OK = (
   qw(b64_decode b64_encode camelize class_to_file class_to_path decamelize),
@@ -316,8 +316,18 @@
 
 sub url_escape {
   my ($str, $pattern) = @_;
-  if   ($pattern) { $str =~ s/([$pattern])/sprintf '%%%02X', ord $1/ge }
-  else            { $str =~ s/([^A-Za-z0-9\-._~])/sprintf '%%%02X', ord $1/ge }
+
+  if ($pattern) {
+    unless (exists $PATTERN{$pattern}) {
+      (my $quoted = $pattern) =~ s!([/\$\[])!\\$1!g;
+      $PATTERN{$pattern}
+        = eval "sub { \$_[0] =~ s/([$quoted])/sprintf '%%%02X', ord \$1/ge }"
+        or croak $@;
+    }
+    $PATTERN{$pattern}->($str);
+  }
+  else { $str =~ s/([^A-Za-z0-9\-._~])/sprintf '%%%02X', ord $1/ge }
+
   return $str;
 }
 
@@ -361,7 +371,7 @@
 }
 
 sub _encoding {
-  $CACHE{$_[0]} //= find_encoding($_[0]) // croak "Unknown encoding '$_[0]'";
+  $ENCODING{$_[0]} //= find_encoding($_[0]) // croak "Unknown encoding 
'$_[0]'";
 }
 
 sub _entity {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/lib/Mojolicious/Command/prefork.pm 
new/Mojolicious-7.39/lib/Mojolicious/Command/prefork.pm
--- old/Mojolicious-7.37/lib/Mojolicious/Command/prefork.pm     2017-07-17 
21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/lib/Mojolicious/Command/prefork.pm     2017-08-03 
10:39:55.000000000 +0200
@@ -56,7 +56,7 @@
                                          SOMAXCONN
     -c, --clients <number>               Maximum number of concurrent
                                          connections, defaults to 1000
-    -G, --graceful-timeout <seconds>     Graceful timeout, defaults to 60.
+    -G, --graceful-timeout <seconds>     Graceful timeout, defaults to 120.
     -I, --heartbeat-interval <seconds>   Heartbeat interval, defaults to 5
     -H, --heartbeat-timeout <seconds>    Heartbeat timeout, defaults to 30
     -h, --help                           Show this summary of available options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/lib/Mojolicious/Static.pm 
new/Mojolicious-7.39/lib/Mojolicious/Static.pm
--- old/Mojolicious-7.37/lib/Mojolicious/Static.pm      2017-07-17 
21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/lib/Mojolicious/Static.pm      2017-07-27 
00:10:13.000000000 +0200
@@ -9,12 +9,15 @@
 use Mojo::Loader 'data_section';
 use Mojo::Util 'md5_sum';
 
-has classes => sub { ['main'] };
-has paths   => sub { [] };
-
 # Bundled files
 my $PUBLIC = Mojo::Home->new(Mojo::Home->new->mojo_lib_dir)
   ->child('Mojolicious', 'resources', 'public');
+my %EXTRA = $PUBLIC->list_tree->map(
+  sub { join('/', @{$_->to_rel($PUBLIC)}), $_->realpath->to_string })->each;
+
+has classes => sub { ['main'] };
+has extra   => sub { +{%EXTRA} };
+has paths   => sub { [] };
 
 sub dispatch {
   my ($self, $c) = @_;
@@ -48,8 +51,9 @@
   # Search DATA
   if (my $asset = $self->_get_data_file($rel)) { return $asset }
 
-  # Search bundled files
-  return $self->_get_file(path($PUBLIC, split('/', $rel))->to_string);
+  # Search extra files
+  my $extra = $self->extra;
+  return exists $extra->{$rel} ? $self->_get_file($extra->{$rel}) : undef;
 }
 
 sub is_fresh {
@@ -188,6 +192,19 @@
   # Add another class with static files in DATA section and higher precedence
   unshift @{$static->classes}, 'Mojolicious::Plugin::MoreFun';
 
+=head2 extra
+
+  my $extra = $static->extra;
+  $static   = $static->extra({'foo/bar.txt' => '/home/sri/myapp/bar.txt'});
+
+Paths for extra files to be served from locations other than L</"paths">, such
+as the images used by the built-in exception and not found pages. Note that
+extra files are only served if no better alternative could be found in
+L</"paths"> and L</"classes">.
+
+  # Remove built-in favicon
+  delete $static->extra->{'favicon.ico'};
+
 =head2 paths
 
   my $paths = $static->paths;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/lib/Mojolicious.pm 
new/Mojolicious-7.39/lib/Mojolicious.pm
--- old/Mojolicious-7.37/lib/Mojolicious.pm     2017-07-23 17:49:09.000000000 
+0200
+++ new/Mojolicious-7.39/lib/Mojolicious.pm     2017-08-02 12:09:15.000000000 
+0200
@@ -58,7 +58,7 @@
 has validator => sub { Mojolicious::Validator->new };
 
 our $CODENAME = 'Doughnut';
-our $VERSION  = '7.37';
+our $VERSION  = '7.39';
 
 sub AUTOLOAD {
   my $self = shift;
@@ -539,6 +539,9 @@
   # Add another class with static files in DATA section
   push @{$app->static->classes}, 'Mojolicious::Plugin::Fun';
 
+  # Remove built-in favicon
+  delete $app->static->extra->{'favicon.ico'};
+
 =head2 types
 
   my $types = $app->types;
@@ -1090,6 +1093,8 @@
 
 Wes Cravens
 
+William Lindley
+
 Yaroslav Korshak
 
 Yuki Kimoto
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/t/mojo/hypnotoad.t 
new/Mojolicious-7.39/t/mojo/hypnotoad.t
--- old/Mojolicious-7.37/t/mojo/hypnotoad.t     2017-07-17 21:07:54.000000000 
+0200
+++ new/Mojolicious-7.39/t/mojo/hypnotoad.t     2017-08-02 12:18:31.000000000 
+0200
@@ -211,6 +211,12 @@
 is $tx->res->code, 200, 'right status';
 is $tx->res->body, 'Graceful shutdown!', 'right content';
 
+# One uncertain request that may or may not be served by the old worker
+$tx = $ua->get("http://127.0.0.1:$port1/hello";);
+is $tx->res->code, 200, 'right status';
+$tx = $ua->get("http://127.0.0.1:$port2/hello";);
+is $tx->res->code, 200, 'right status';
+
 # Application has been reloaded
 $tx = $ua->get("http://127.0.0.1:$port1/hello";);
 ok $tx->is_finished, 'transaction is finished';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/t/mojo/prefork.t 
new/Mojolicious-7.39/t/mojo/prefork.t
--- old/Mojolicious-7.37/t/mojo/prefork.t       2017-07-17 21:07:54.000000000 
+0200
+++ new/Mojolicious-7.39/t/mojo/prefork.t       2017-08-03 10:39:50.000000000 
+0200
@@ -82,7 +82,7 @@
 like $log, qr/Listening at/,             'right message';
 like $log, qr/Manager $$ started/,       'right message';
 like $log, qr/Creating process id file/, 'right message';
-like $log, qr/Stopping worker $spawn[0] gracefully \(60 seconds\)/,
+like $log, qr/Stopping worker $spawn[0] gracefully \(120 seconds\)/,
   'right message';
 like $log, qr/Worker $spawn[0] stopped/, 'right message';
 like $log, qr/Manager $$ stopped/,       'right message';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/t/mojolicious/lite_app.t 
new/Mojolicious-7.39/t/mojolicious/lite_app.t
--- old/Mojolicious-7.37/t/mojolicious/lite_app.t       2017-07-17 
21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/t/mojolicious/lite_app.t       2017-08-02 
10:15:45.000000000 +0200
@@ -747,10 +747,14 @@
 # With body and max message size
 {
   local $ENV{MOJO_MAX_MESSAGE_SIZE} = 1024;
+  $log = '';
+  $cb = $t->app->log->on(message => sub { $log .= pop });
   $t->get_ok('/', '1234' x 1024)->status_is(200)
     ->header_is(Connection => 'close')
     ->content_is("Maximum message size exceeded\n"
       . "/root.html\n/root.html\n/root.html\n/root.html\n/root.html\n");
+  like $log, qr/Maximum message size exceeded/, 'right message';
+  $t->app->log->unsubscribe(message => $cb);
 }
 
 # Relaxed placeholder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.37/t/mojolicious/production_app.t 
new/Mojolicious-7.39/t/mojolicious/production_app.t
--- old/Mojolicious-7.37/t/mojolicious/production_app.t 2017-07-17 
21:07:54.000000000 +0200
+++ new/Mojolicious-7.39/t/mojolicious/production_app.t 2017-07-26 
20:15:51.000000000 +0200
@@ -35,6 +35,11 @@
 is $t->app->static->file('does_not_exist.html'), undef, 'no file';
 is $t->app->moniker, 'mojolicious_test', 'right moniker';
 
+# Remove extra files
+isnt $t->app->static->file('mojo/jquery/jquery.js'), undef, 'found jQuery';
+delete $t->app->static->extra->{'mojo/jquery/jquery.js'};
+is $t->app->static->file('mojo/jquery/jquery.js'), undef, 'no jQuery';
+
 # Default namespaces
 is_deeply $t->app->routes->namespaces,
   ['MojoliciousTest::Controller', 'MojoliciousTest'], 'right namespaces';


Reply via email to