Hello community,

here is the log from the commit of package perl-Mojolicious for 
openSUSE:Factory checked in at 2017-01-31 12:35:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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        
2017-01-25 22:38:14.827270169 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes   
2017-02-03 18:54:14.324152500 +0100
@@ -1,0 +2,12 @@
+Fri Jan 27 06:05:51 UTC 2017 - [email protected]
+
+- updated to 7.22
+   see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+  7.22  2017-01-25
+    - Added ports method to Mojo::Server::Daemon.
+    - Added remove_tree method to Mojo::File.
+    - Improved spurt method in Mojo::File with support for writing multiple 
chunks
+      at once.
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-7.21.tar.gz

New:
----
  Mojolicious-7.22.tar.gz

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

Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.C6fk00/_old  2017-02-03 18:54:14.908070511 +0100
+++ /var/tmp/diff_new_pack.C6fk00/_new  2017-02-03 18:54:14.912069950 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojolicious
-Version:        7.21
+Version:        7.22
 Release:        0
 %define cpan_name Mojolicious
 Summary:        Real-time web framework

++++++ Mojolicious-7.21.tar.gz -> Mojolicious-7.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/Changes new/Mojolicious-7.22/Changes
--- old/Mojolicious-7.21/Changes        2017-01-21 13:36:10.000000000 +0100
+++ new/Mojolicious-7.22/Changes        2017-01-25 21:17:33.000000000 +0100
@@ -1,4 +1,10 @@
 
+7.22  2017-01-25
+  - Added ports method to Mojo::Server::Daemon.
+  - Added remove_tree method to Mojo::File.
+  - Improved spurt method in Mojo::File with support for writing multiple 
chunks
+    at once.
+
 7.21  2017-01-21
   - Added extract_usage function to Mojo::Util.
   - Improve getopt function in Mojo::Util to use @ARGV by default.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/META.json 
new/Mojolicious-7.22/META.json
--- old/Mojolicious-7.21/META.json      2017-01-22 15:28:30.000000000 +0100
+++ new/Mojolicious-7.22/META.json      2017-01-26 00:09:02.000000000 +0100
@@ -58,6 +58,6 @@
       },
       "x_IRC" : "irc://irc.perl.org/#mojo"
    },
-   "version" : "7.21",
+   "version" : "7.22",
    "x_serialization_backend" : "JSON::PP version 2.27400"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/META.yml 
new/Mojolicious-7.22/META.yml
--- old/Mojolicious-7.21/META.yml       2017-01-22 15:28:30.000000000 +0100
+++ new/Mojolicious-7.22/META.yml       2017-01-26 00:09:02.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.21'
+version: '7.22'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/README.md 
new/Mojolicious-7.22/README.md
--- old/Mojolicious-7.21/README.md      2017-01-12 00:02:48.000000000 +0100
+++ new/Mojolicious-7.22/README.md      2017-01-24 18:44:14.000000000 +0100
@@ -12,7 +12,7 @@
 ## Features
 
   * An amazing **real-time web framework**, allowing you to easily grow single
-    file prototypes into well-structured web applications.
+    file prototypes into well-structured MVC web applications.
     * Powerful out of the box with RESTful routes, plugins, commands, Perl-ish
       templates, content negotiation, session management, form validation,
       testing framework, static file server, CGI/[PSGI](http://plackperl.org)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/lib/Mojo/File.pm 
new/Mojolicious-7.22/lib/Mojo/File.pm
--- old/Mojolicious-7.21/lib/Mojo/File.pm       2017-01-17 18:26:01.000000000 
+0100
+++ new/Mojolicious-7.22/lib/Mojo/File.pm       2017-01-25 21:14:47.000000000 
+0100
@@ -78,6 +78,12 @@
 
 sub path { __PACKAGE__->new(@_) }
 
+sub remove_tree {
+  my $self = shift;
+  File::Path::remove_tree $$self, @_;
+  return $self;
+}
+
 sub slurp {
   my $self = shift;
 
@@ -90,7 +96,7 @@
 }
 
 sub spurt {
-  my ($self, $content) = @_;
+  my ($self, $content) = (shift, join '', @_);
   open my $file, '>', $$self or croak qq{Can't open file "$$self": $!};
   ($file->syswrite($content) // -1) == length $content
     or croak qq{Can't write to file "$$self": $!};
@@ -224,7 +230,8 @@
   my $collection = $path->list({hidden => 1});
 
 List all files in the directory and return a L<Mojo::Collection> object
-containing the results as L<Mojo::File> objects.
+containing the results as L<Mojo::File> objects. The list does not include C<.>
+and C<..>.
 
   # List files
   say for Mojo::File->new('/home/sri/myapp')->list->each;
@@ -253,7 +260,8 @@
   my $collection = $path->list_tree({hidden => 1});
 
 List all files recursively in the directory and return a L<Mojo::Collection>
-object containing the results as L<Mojo::File> objects.
+object containing the results as L<Mojo::File> objects. The list does not
+include C<.> and C<..>.
 
   # List all templates
   say for Mojo::File->new('/home/sri/myapp/templates')->list_tree->each;
@@ -280,7 +288,7 @@
 
   $path = $path->move_to('/home/sri/.vimrc.backup');
 
-Move the file.
+Move the file with L<File::Copy>.
 
 =head2 new
 
@@ -295,6 +303,13 @@
   # "foo/bar/baz.txt" (on UNIX)
   Mojo::File->new('foo', 'bar', 'baz.txt');
 
+=head2 remove_tree
+
+  $path = $path->remove_tree;
+
+Delete this directory and any files and subdirectories it may contain with
+L<File::Path>.
+
 =head2 slurp
 
   my $bytes = $path->slurp;
@@ -304,6 +319,7 @@
 =head2 spurt
 
   $path = $path->spurt($bytes);
+  $path = $path->spurt(@chunks_of_bytes);
 
 Write all data at once to the file.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/lib/Mojo/Server/Daemon.pm 
new/Mojolicious-7.22/lib/Mojo/Server/Daemon.pm
--- old/Mojolicious-7.21/lib/Mojo/Server/Daemon.pm      2017-01-15 
17:02:28.000000000 +0100
+++ new/Mojolicious-7.22/lib/Mojo/Server/Daemon.pm      2017-01-26 
00:07:47.000000000 +0100
@@ -32,6 +32,10 @@
   !$c->{$_}{tx} and $c->{$_}{requests} and $loop->remove($_) for keys %$c;
 }
 
+sub ports {
+  [map { $_[0]->ioloop->acceptor($_)->port } @{$_[0]->acceptors}];
+}
+
 sub run {
   my $self = shift;
 
@@ -469,6 +473,15 @@
 Close all connections without active requests. Note that this method is
 EXPERIMENTAL and might change without warning!
 
+=head2 ports
+
+  my $ports = $daemon->ports;
+
+Get all ports this server is currently listening on.
+
+  # All ports
+  say for @{$daemon->ports};
+
 =head2 run
 
   $daemon->run;
@@ -482,8 +495,7 @@
 Start or resume accepting connections through L</"ioloop">.
 
   # Listen on random port
-  my $id   = $daemon->listen(['http://127.0.0.1'])->start->acceptors->[0];
-  my $port = $daemon->ioloop->acceptor($id)->port;
+  my $port = $daemon->listen(['http://127.0.0.1'])->start->ports->[0];
 
   # Run multiple web servers concurrently
   my $daemon1 = Mojo::Server::Daemon->new(listen => ['http://*:3000'])->start;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/lib/Mojo/UserAgent/Server.pm 
new/Mojolicious-7.22/lib/Mojo/UserAgent/Server.pm
--- old/Mojolicious-7.21/lib/Mojo/UserAgent/Server.pm   2016-07-19 
02:38:18.000000000 +0200
+++ new/Mojolicious-7.22/lib/Mojo/UserAgent/Server.pm   2017-01-25 
19:33:17.000000000 +0100
@@ -37,15 +37,15 @@
     = Mojo::Server::Daemon->new(ioloop => $self->ioloop, silent => 1);
   weaken $server->app($self->app)->{app};
   my $port = $self->{port} ? ":$self->{port}" : '';
-  $self->{port} = $server->listen(["$proto://127.0.0.1$port"])
-    ->start->ioloop->acceptor($server->acceptors->[0])->port;
+  $self->{port}
+    = $server->listen(["$proto://127.0.0.1$port"])->start->ports->[0];
 
   # Non-blocking
   $server = $self->{nb_server} = Mojo::Server::Daemon->new(silent => 1);
   weaken $server->app($self->app)->{app};
   $port = $self->{nb_port} ? ":$self->{nb_port}" : '';
-  $self->{nb_port} = $server->listen(["$proto://127.0.0.1$port"])
-    ->start->ioloop->acceptor($server->acceptors->[0])->port;
+  $self->{nb_port}
+    = $server->listen(["$proto://127.0.0.1$port"])->start->ports->[0];
 }
 
 sub _url {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/lib/Mojolicious/Guides.pod 
new/Mojolicious-7.22/lib/Mojolicious/Guides.pod
--- old/Mojolicious-7.21/lib/Mojolicious/Guides.pod     2017-01-14 
12:44:39.000000000 +0100
+++ new/Mojolicious-7.22/lib/Mojolicious/Guides.pod     2017-01-24 
19:55:50.000000000 +0100
@@ -167,11 +167,23 @@
 
 A tiny wrapper around L<DBD::Pg> that makes
 L<PostgreSQL|http://www.postgresql.org> a lot of fun to use with
-L<Mojolicious>.
+L<Mojolicious>. And it comes with two great
+L<example applications|https://github.com/kraih/mojo-pg/tree/master/examples/>
+you can use for inspiration. The minimal
+L<chat|https://github.com/kraih/mojo-pg/tree/master/examples/chat.pl>
+application will show you how to scale WebSockets to multiple servers, and the
+well-structured
+L<blog|https://github.com/kraih/mojo-pg/tree/master/examples/blog> application
+how to apply the MVC design pattern in practice.
 
 =item L<Minion>
 
-A job queue for L<Mojolicious> with support for multiple backends.
+A full featured job queue for L<Mojolicious> with support for multiple backends
+(such as L<PostgreSQL|http://www.postgresql.org>). Job queues allow you to
+process time and/or computationally intensive tasks in background processes,
+outside of the request/response lifecycle. Among those tasks you'll commonly
+find image resizing, spam filtering, HTTP downloads, building tarballs, warming
+caches and basically everything else you can imagine that's not super fast.
 
 =back
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/lib/Mojolicious.pm 
new/Mojolicious-7.22/lib/Mojolicious.pm
--- old/Mojolicious-7.21/lib/Mojolicious.pm     2017-01-18 10:38:08.000000000 
+0100
+++ new/Mojolicious-7.22/lib/Mojolicious.pm     2017-01-22 15:29:08.000000000 
+0100
@@ -57,7 +57,7 @@
 has validator => sub { Mojolicious::Validator->new };
 
 our $CODENAME = 'Doughnut';
-our $VERSION  = '7.21';
+our $VERSION  = '7.22';
 
 sub AUTOLOAD {
   my $self = shift;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/asset.t 
new/Mojolicious-7.22/t/mojo/asset.t
--- old/Mojolicious-7.21/t/mojo/asset.t 2017-01-09 18:47:43.000000000 +0100
+++ new/Mojolicious-7.22/t/mojo/asset.t 2017-01-25 21:01:02.000000000 +0100
@@ -149,11 +149,11 @@
 ok !-e $path, 'file has been cleaned up';
 is $mem->move_to($path)->slurp, 'abc', 'right content';
 ok -e $path, 'file exists';
-unlink $path;
+ok unlink($path), 'unlinked file';
 ok !-e $path, 'file has been cleaned up';
 is(Mojo::Asset::Memory->new->move_to($path)->slurp, '', 'no content');
 ok -e $path, 'file exists';
-unlink $path;
+ok unlink($path), 'unlinked file';
 ok !-e $path, 'file has been cleaned up';
 
 # Move file asset to file
@@ -169,11 +169,11 @@
 is $file->move_to($path)->slurp, 'bcd', 'right content';
 undef $file;
 ok -e $path, 'file exists';
-unlink $path;
+ok unlink($path), 'unlinked file';
 ok !-e $path, 'file has been cleaned up';
 is(Mojo::Asset::File->new->move_to($path)->slurp, '', 'no content');
 ok -e $path, 'file exists';
-unlink $path;
+ok unlink($path), 'unlinked file';
 ok !-e $path, 'file has been cleaned up';
 
 # Upgrade
@@ -232,7 +232,7 @@
 $path = $file->path;
 undef $file;
 ok -e $path, 'file exists';
-unlink $path;
+ok unlink($path), 'unlinked file';
 ok !-e $path, 'file has been cleaned up';
 
 # Incomplete write
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/daemon.t 
new/Mojolicious-7.22/t/mojo/daemon.t
--- old/Mojolicious-7.21/t/mojo/daemon.t        2017-01-15 14:11:31.000000000 
+0100
+++ new/Mojolicious-7.22/t/mojo/daemon.t        2017-01-25 18:52:02.000000000 
+0100
@@ -236,8 +236,7 @@
 # Pipelined
 $daemon
   = Mojo::Server::Daemon->new({listen => ['http://127.0.0.1'], silent => 1});
-$daemon->start;
-my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+my $port = $daemon->start->ports->[0];
 is $daemon->app->moniker, 'HelloWorld', 'right moniker';
 my $buffer = '';
 my $id;
@@ -314,7 +313,7 @@
   listen => ['http://127.0.0.1'],
   silent => 1
 )->start;
-$port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+$port = $daemon->ports->[0];
 is $daemon->max_requests, 100, 'right value';
 is $daemon->max_requests(2)->max_requests, 2, 'right value';
 $tx = $ua->get("http://127.0.0.1:$port/keep_alive/1";);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/daemon_ipv6_tls.t 
new/Mojolicious-7.22/t/mojo/daemon_ipv6_tls.t
--- old/Mojolicious-7.21/t/mojo/daemon_ipv6_tls.t       2017-01-15 
14:00:47.000000000 +0100
+++ new/Mojolicious-7.22/t/mojo/daemon_ipv6_tls.t       2017-01-25 
19:33:07.000000000 +0100
@@ -104,8 +104,7 @@
   listen => ['https://[::1]'],
   silent => 1
 );
-$daemon->start;
-my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+my $port = $daemon->start->ports->[0];
 my $ua   = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton);
 my $tx   = $ua->get("https://[::1]:$port/";);
 is $tx->res->code, 200,      'right status';
@@ -122,8 +121,7 @@
     . '&127.0.0.1_key=t/mojo/certs/server.key'
     . '&example.com_cert=t/mojo/certs/domain.crt'
     . '&example.com_key=t/mojo/certs/domain.key';
-  $daemon->listen([$listen])->start;
-  $forward = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+  $forward = $daemon->listen([$listen])->start->ports->[0];
   $ua      = Mojo::UserAgent->new(
     ioloop => Mojo::IOLoop->singleton,
     ca     => 't/mojo/certs/ca.crt'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/file.t 
new/Mojolicious-7.22/t/mojo/file.t
--- old/Mojolicious-7.21/t/mojo/file.t  2017-01-10 23:28:10.000000000 +0100
+++ new/Mojolicious-7.22/t/mojo/file.t  2017-01-25 21:21:12.000000000 +0100
@@ -71,6 +71,12 @@
 $subdir->make_path;
 ok -d $subdir, 'directory exists';
 
+# Remove tree
+$dir = tempdir;
+$dir->child('foo', 'bar')->make_path->child('test.txt')->spurt('test!');
+is $dir->child('foo', 'bar', 'test.txt')->slurp, 'test!', 'right content';
+ok !-e $dir->child('foo')->remove_tree->to_string, 'tree has been removed';
+
 # Move to
 $dir = tempdir;
 my $destination = $dir->child('dest.txt');
@@ -123,6 +129,7 @@
 $dir = tempdir;
 my $file = $dir->child('test.txt')->spurt('just works!');
 is $file->slurp, 'just works!', 'right content';
+is $file->spurt('w', 'orks', ' too!')->slurp, 'works too!', 'right content';
 {
   no warnings 'redefine';
   local *IO::Handle::syswrite = sub { $! = 0; 5 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/user_agent_tls.t 
new/Mojolicious-7.22/t/mojo/user_agent_tls.t
--- old/Mojolicious-7.21/t/mojo/user_agent_tls.t        2017-01-15 
14:01:51.000000000 +0100
+++ new/Mojolicious-7.22/t/mojo/user_agent_tls.t        2017-01-25 
19:28:27.000000000 +0100
@@ -31,8 +31,7 @@
   . '?cert=t/mojo/certs/server.crt'
   . '&key=t/mojo/certs/server.key'
   . '&ca=t/mojo/certs/ca.crt';
-$daemon->listen([$listen])->start;
-my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+my $port = $daemon->listen([$listen])->start->ports->[0];
 
 # No certificate
 my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton);
@@ -87,8 +86,7 @@
   . '&ciphers=AES256-SHA:ALL'
   . '&verify=0x00'
   . '&version=TLSv1';
-$daemon->listen([$listen])->start;
-$port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+$port = $daemon->listen([$listen])->start->ports->[0];
 
 # Invalid certificate
 $ua = Mojo::UserAgent->new(ioloop => $ua->ioloop);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/websocket_proxy.t 
new/Mojolicious-7.22/t/mojo/websocket_proxy.t
--- old/Mojolicious-7.21/t/mojo/websocket_proxy.t       2016-08-12 
11:18:56.000000000 +0200
+++ new/Mojolicious-7.22/t/mojo/websocket_proxy.t       2017-01-25 
19:28:46.000000000 +0100
@@ -32,8 +32,7 @@
 # HTTP server for testing
 my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton);
 my $daemon = Mojo::Server::Daemon->new(app => app, silent => 1);
-$daemon->listen(['http://127.0.0.1'])->start;
-my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+my $port = $daemon->listen(['http://127.0.0.1'])->start->ports->[0];
 
 # CONNECT proxy server for testing
 my (%buffer, $connected, $read, $sent);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-7.21/t/mojo/websocket_proxy_tls.t 
new/Mojolicious-7.22/t/mojo/websocket_proxy_tls.t
--- old/Mojolicious-7.21/t/mojo/websocket_proxy_tls.t   2017-01-15 
14:01:58.000000000 +0100
+++ new/Mojolicious-7.22/t/mojo/websocket_proxy_tls.t   2017-01-25 
19:29:10.000000000 +0100
@@ -50,8 +50,7 @@
   . '?cert=t/mojo/certs/server.crt'
   . '&key=t/mojo/certs/server.key'
   . '&ca=t/mojo/certs/ca.crt';
-$daemon->listen([$listen])->start;
-my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;
+my $port = $daemon->listen([$listen])->start->ports->[0];
 
 # Connect proxy server for testing
 my (%buffer, $connected, $read, $sent);


Reply via email to