Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Mojo-SQLite for 
openSUSE:Factory checked in at 2021-02-17 18:12:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojo-SQLite (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojo-SQLite.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojo-SQLite"

Wed Feb 17 18:12:43 2021 rev:11 rq:873065 version:3.005

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojo-SQLite/perl-Mojo-SQLite.changes        
2020-07-28 17:30:20.878245765 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Mojo-SQLite.new.28504/perl-Mojo-SQLite.changes 
    2021-02-17 18:13:31.654038166 +0100
@@ -1,0 +2,11 @@
+Wed Feb 17 03:10:20 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 3.005
+   see /usr/share/doc/packages/perl-Mojo-SQLite/Changes
+
+  3.005     2021-02-15 21:47:59 EST
+    - Add query_p, select_p, insert_p, update_p, delete_p 
Mojo::Promise-returning methods to Mojo::SQLite::Database.
+      These are for API compatibility with Mojo::Pg and do not provide 
non-blocking query functionality. (#20, Stefan Adams)
+    - Use Mojo::Promise in tests instead of the deprecated and decored 
Mojo::IOLoop::Delay (#20, Stefan Adams)
+
+-------------------------------------------------------------------

Old:
----
  Mojo-SQLite-3.004.tar.gz

New:
----
  Mojo-SQLite-3.005.tar.gz

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

Other differences:
------------------
++++++ perl-Mojo-SQLite.spec ++++++
--- /var/tmp/diff_new_pack.O2Kxw4/_old  2021-02-17 18:13:32.190038605 +0100
+++ /var/tmp/diff_new_pack.O2Kxw4/_new  2021-02-17 18:13:32.194038608 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Mojo-SQLite
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,16 @@
 #
 
 
+%define cpan_name Mojo-SQLite
 Name:           perl-Mojo-SQLite
-Version:        3.004
+Version:        3.005
 Release:        0
-%define cpan_name Mojo-SQLite
 Summary:        Tiny Mojolicious wrapper for SQLite
 License:        Artistic-2.0
-Group:          Development/Libraries/Perl
 URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/D/DB/DBOOK/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(DBD::SQLite) >= 1.64
@@ -57,7 +55,7 @@
 database schema with migrations.
 
 %prep
-%setup -q -n %{cpan_name}-%{version}
+%autosetup  -n %{cpan_name}-%{version}
 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
 
 %build
@@ -72,7 +70,6 @@
 %perl_gen_filelist
 
 %files -f %{name}.files
-%defattr(-,root,root,755)
 %doc Changes CONTRIBUTING.md examples prereqs.yml README
 %license LICENSE
 

++++++ Mojo-SQLite-3.004.tar.gz -> Mojo-SQLite-3.005.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/Build.PL 
new/Mojo-SQLite-3.005/Build.PL
--- old/Mojo-SQLite-3.004/Build.PL      2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/Build.PL      2021-02-16 03:48:01.000000000 +0100
@@ -68,7 +68,7 @@
     }
 
 
-    # This section was automatically generated by 
Dist::Zilla::Plugin::ModuleBuild v6.015.
+    # This section was automatically generated by 
Dist::Zilla::Plugin::ModuleBuild v6.017.
     use strict;
     use warnings;
 
@@ -84,7 +84,7 @@
         "Dan Book <dbook\@cpan.org>"
       ],
       "dist_name" => "Mojo-SQLite",
-      "dist_version" => "3.004",
+      "dist_version" => "3.005",
       "license" => "artistic_2",
       "module_name" => "Mojo::SQLite",
       "recursive_test_files" => 1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/CONTRIBUTING.md 
new/Mojo-SQLite-3.005/CONTRIBUTING.md
--- old/Mojo-SQLite-3.004/CONTRIBUTING.md       2020-07-23 04:50:46.000000000 
+0200
+++ new/Mojo-SQLite-3.005/CONTRIBUTING.md       2021-02-16 03:48:01.000000000 
+0100
@@ -24,8 +24,8 @@
     $ curl -L https://cpanmin.us | perl - --installdeps --with-develop .
     $ wget -qO - https://cpanmin.us | perl - --installdeps --with-develop .
 
-Otherwise, look for either a `cpanfile` or `META.json` file for a list of
-dependencies to satisfy.
+Otherwise, look for either a `cpanfile`, `prereqs.json`/`prereqs.yml`, or
+`META.json` file for a list of dependencies to satisfy.
 
 ## Running tests
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/Changes 
new/Mojo-SQLite-3.005/Changes
--- old/Mojo-SQLite-3.004/Changes       2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/Changes       2021-02-16 03:48:01.000000000 +0100
@@ -1,3 +1,8 @@
+3.005     2021-02-15 21:47:59 EST
+  - Add query_p, select_p, insert_p, update_p, delete_p 
Mojo::Promise-returning methods to Mojo::SQLite::Database.
+    These are for API compatibility with Mojo::Pg and do not provide 
non-blocking query functionality. (#20, Stefan Adams)
+  - Use Mojo::Promise in tests instead of the deprecated and decored 
Mojo::IOLoop::Delay (#20, Stefan Adams)
+
 3.004     2020-07-22 22:50:43 EDT
   - The Mojo::SQLite::Migrations sqlite attribute and the
     Mojo::SQLite::Transaction db attribute are now weak attributes, increasing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/MANIFEST 
new/Mojo-SQLite-3.005/MANIFEST
--- old/Mojo-SQLite-3.004/MANIFEST      2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/MANIFEST      2021-02-16 03:48:01.000000000 +0100
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest 
v6.015.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest 
v6.017.
 Build.PL
 CONTRIBUTING.md
 Changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/META.json 
new/Mojo-SQLite-3.005/META.json
--- old/Mojo-SQLite-3.004/META.json     2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/META.json     2021-02-16 03:48:01.000000000 +0100
@@ -4,7 +4,7 @@
       "Dan Book <[email protected]>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 6.015, CPAN::Meta::Converter version 
2.150010",
+   "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 
2.150010",
    "license" : [
       "artistic_2"
    ],
@@ -66,28 +66,28 @@
    "provides" : {
       "Mojo::SQLite" : {
          "file" : "lib/Mojo/SQLite.pm",
-         "version" : "3.004"
+         "version" : "3.005"
       },
       "Mojo::SQLite::Database" : {
          "file" : "lib/Mojo/SQLite/Database.pm",
-         "version" : "3.004"
+         "version" : "3.005"
       },
       "Mojo::SQLite::Migrations" : {
          "file" : "lib/Mojo/SQLite/Migrations.pm",
-         "version" : "3.004"
+         "version" : "3.005"
       },
       "Mojo::SQLite::PubSub" : {
          "file" : "lib/Mojo/SQLite/PubSub.pm",
-         "version" : "3.004",
+         "version" : "3.005",
          "x_deprecated" : 1
       },
       "Mojo::SQLite::Results" : {
          "file" : "lib/Mojo/SQLite/Results.pm",
-         "version" : "3.004"
+         "version" : "3.005"
       },
       "Mojo::SQLite::Transaction" : {
          "file" : "lib/Mojo/SQLite/Transaction.pm",
-         "version" : "3.004"
+         "version" : "3.005"
       }
    },
    "release_status" : "stable",
@@ -103,13 +103,14 @@
       },
       "x_IRC" : "irc://irc.freenode.net/#mojo"
    },
-   "version" : "3.004",
+   "version" : "3.005",
    "x_contributors" : [
       "Dan Book <[email protected]>",
-      "Dan Book <[email protected]>"
+      "Dan Book <[email protected]>",
+      "Stefan Adams <[email protected]>"
    ],
-   "x_generated_by_perl" : "v5.30.2",
-   "x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
+   "x_generated_by_perl" : "v5.32.0",
+   "x_serialization_backend" : "Cpanel::JSON::XS version 4.25",
    "x_spdx_expression" : "Artistic-2.0"
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/META.yml 
new/Mojo-SQLite-3.005/META.yml
--- old/Mojo-SQLite-3.004/META.yml      2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/META.yml      2021-02-16 03:48:01.000000000 +0100
@@ -9,7 +9,7 @@
 configure_requires:
   Module::Build::Tiny: '0.034'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.015, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 
2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,23 +26,23 @@
 provides:
   Mojo::SQLite:
     file: lib/Mojo/SQLite.pm
-    version: '3.004'
+    version: '3.005'
   Mojo::SQLite::Database:
     file: lib/Mojo/SQLite/Database.pm
-    version: '3.004'
+    version: '3.005'
   Mojo::SQLite::Migrations:
     file: lib/Mojo/SQLite/Migrations.pm
-    version: '3.004'
+    version: '3.005'
   Mojo::SQLite::PubSub:
     file: lib/Mojo/SQLite/PubSub.pm
-    version: '3.004'
+    version: '3.005'
     x_deprecated: 1
   Mojo::SQLite::Results:
     file: lib/Mojo/SQLite/Results.pm
-    version: '3.004'
+    version: '3.005'
   Mojo::SQLite::Transaction:
     file: lib/Mojo/SQLite/Transaction.pm
-    version: '3.004'
+    version: '3.005'
 requires:
   Carp: '0'
   DBD::SQLite: '1.64'
@@ -61,10 +61,11 @@
   bugtracker: https://github.com/Grinnz/Mojo-SQLite/issues
   homepage: https://github.com/Grinnz/Mojo-SQLite
   repository: https://github.com/Grinnz/Mojo-SQLite.git
-version: '3.004'
+version: '3.005'
 x_contributors:
   - 'Dan Book <[email protected]>'
   - 'Dan Book <[email protected]>'
-x_generated_by_perl: v5.30.2
+  - 'Stefan Adams <[email protected]>'
+x_generated_by_perl: v5.32.0
 x_serialization_backend: 'YAML::Tiny version 1.73'
 x_spdx_expression: Artistic-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/README new/Mojo-SQLite-3.005/README
--- old/Mojo-SQLite-3.004/README        2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/README        2021-02-16 03:48:01.000000000 +0100
@@ -76,8 +76,7 @@
     
       helper sqlite => sub { state $sql = Mojo::SQLite->new('sqlite:test.db') 
};
     
-      get '/' => sub {
-        my $c  = shift;
+      get '/' => sub ($c) {
         my $db = $c->sqlite->db;
         $c->render(json => $db->query(q{select datetime('now','localtime') as 
now})->hash);
       };
@@ -145,7 +144,7 @@
     features are not applicable to SQLite queries.
 
       use SQL::Abstract::Pg;
-      my $sql = Mojo::SQLite->new(abstract => SQL::Abstract::Pg->new(name_sep 
=> '.', quote_char => '"'));
+      my $sql = Mojo::SQLite->new->abstract(SQL::Abstract::Pg->new(name_sep => 
'.', quote_char => '"'));
       $sql->db->select(['some_table', ['other_table', foo_id => 'id']],
         ['foo', [bar => 'baz'], \q{datetime('now') as dt}],
         {foo => 'value'},
@@ -166,8 +165,7 @@
 
  connection
 
-      $sql->on(connection => sub {
-        my ($sql, $dbh) = @_;
+      $sql->on(connection => sub ($sql, $dbh) {
         $dbh->do('pragma journal_size_limit=1000000');
       });
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Database.pm 
new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Database.pm
--- old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Database.pm   2020-07-23 
04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Database.pm   2021-02-16 
03:48:01.000000000 +0100
@@ -4,11 +4,12 @@
 use Carp qw(croak shortmess);
 use DBI 'SQL_VARCHAR';
 use Mojo::JSON 'to_json';
+use Mojo::Promise;
 use Mojo::SQLite::Results;
 use Mojo::SQLite::Transaction;
 use Mojo::Util 'monkey_patch';
 
-our $VERSION = '3.004';
+our $VERSION = '3.005';
 
 our @CARP_NOT = qw(Mojo::SQLite::Migrations);
 
@@ -20,6 +21,10 @@
     my ($self, @cb) = (shift, ref $_[-1] eq 'CODE' ? pop : ());
     return $self->query($self->sqlite->abstract->$name(@_), @cb);
   };
+  monkey_patch __PACKAGE__, "${name}_p", sub {
+    my $self = shift;
+    return $self->query_p($self->sqlite->abstract->$name(@_));
+  };
 }
 
 sub DESTROY {
@@ -86,6 +91,13 @@
   return $self;
 }
 
+sub query_p {
+  my $self    = shift;
+  my $promise = Mojo::Promise->new;
+  $self->query(@_ => sub { $_[1] ? $promise->reject($_[1]) : 
$promise->resolve($_[2]) });
+  return $promise;
+}
+
 sub tables {
   my @tables = shift->dbh->tables(undef, undef, undef, 'TABLE,VIEW,LOCAL 
TEMPORARY');
   my %names; # Deduplicate returned temporary table indexes
@@ -201,8 +213,7 @@
 callback for API compatibility with L<Mojo::Pg>; the query is still executed in
 a blocking manner.
 
-  $db->delete(some_table => sub {
-    my ($db, $err, $results) = @_;
+  $db->delete(some_table => sub ($db, $err, $results) {
     ...
   });
   Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
@@ -219,6 +230,20 @@
   # "delete from some_table where foo like '%test%'"
   $db->delete('some_table', {foo => {-like => '%test%'}});
 
+=head2 delete_p
+
+  my $promise = $db->delete_p($table, \%where, \%options);
+
+Same as L</"delete"> but returns a L<Mojo::Promise> object instead of accepting
+a callback. For API compatibility with L<Mojo::Pg>; the query is still executed
+in a blocking manner.
+
+  $db->delete_p('some_table')->then(sub ($results) {
+    ...
+  })->catch(sub ($err) {
+    ...
+  })->wait;
+
 =head2 disconnect
 
   $db->disconnect;
@@ -234,8 +259,7 @@
 callback for API compatibility with L<Mojo::Pg>; the query is still executed in
 a blocking manner.
 
-  $db->insert(some_table => {foo => 'bar'} => sub {
-    my ($db, $err, $results) = @_;
+  $db->insert(some_table => {foo => 'bar'} => sub ($db, $err, $results) {
     ...
   });
   Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
@@ -246,6 +270,20 @@
   # "insert into some_table (foo, baz) values ('bar', 'yada')"
   $db->insert('some_table', {foo => 'bar', baz => 'yada'});
 
+=head2 insert_p
+
+  my $promise = $db->insert_p($table, \@values || \%fieldvals, \%options);
+
+Same as L</"insert"> but returns a L<Mojo::Promise> object instead of accepting
+a callback. For API compatibility with L<Mojo::Pg>; the query is still executed
+in a blocking manner.
+
+  $db->insert_p(some_table => {foo => 'bar'})->then(sub ($results) {
+    ...
+  })->catch(sub ($err) {
+    ...
+  })->wait;
+
 =head2 ping
 
   my $bool = $db->ping;
@@ -267,8 +305,7 @@
 API compatibility with L<Mojo::Pg>; the query is still executed in a blocking
 manner.
 
-  $db->query('insert into foo values (?, ?, ?)' => @values => sub {
-    my ($db, $err, $results) = @_;
+  $db->query('insert into foo values (?, ?, ?)' => @values => sub ($db, $err, 
$results) {
     ...
   });
   Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
@@ -287,6 +324,20 @@
   $db->query('select ? as foo', {json => {bar => 'I ??? SQLite!'}})
     ->expand(json => 'foo')->hash->{foo}{bar};
 
+=head2 query_p
+
+  my $promise = $db->query_p('SELECT * FROM foo');
+
+Same as L</"query"> but returns a L<Mojo::Promise> object instead of accepting
+a callback. For API compatibility with L<Mojo::Pg>; the query is still executed
+in a blocking manner.
+
+  $db->query_p('INSERT INTO foo VALUES (?, ?, ?)' => @values)->then(sub 
($results) {
+    ...
+  })->catch(sub ($err) {
+    ...
+  })->wait;
+
 =head2 select
 
   my $results = $db->select($source, $fields, $where, $order);
@@ -296,8 +347,7 @@
 callback for API compatibility with L<Mojo::Pg>; the query is still executed in
 a blocking manner.
 
-  $db->select(some_table => ['foo'] => {bar => 'yada'} => sub {
-    my ($db, $err, $results) = @_;
+  $db->select(some_table => ['foo'] => {bar => 'yada'} => sub ($db, $err, 
$results) {
     ...
   });
   Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
@@ -320,6 +370,20 @@
   # "select * from some_table where foo like '%test%'"
   $db->select('some_table', undef, {foo => {-like => '%test%'}});
 
+=head2 select_p
+
+  my $promise = $db->select_p($source, $fields, $where, \%options);
+
+Same as L</"select"> but returns a L<Mojo::Promise> object instead of accepting
+a callback. For API compatibility with L<Mojo::Pg>; the query is still executed
+in a blocking manner.
+
+  $db->select_p(some_table => ['foo'] => {bar => 'yada'})->then(sub ($results) 
{
+    ...
+  })->catch(sub ($err) {
+    ...
+  })->wait;
+
 =head2 tables
 
   my $tables = $db->tables;
@@ -342,8 +406,7 @@
 callback for API compatibility with L<Mojo::Pg>; the query is still executed in
 a blocking manner.
 
-  $db->update(some_table => {foo => 'baz'} => {foo => 'bar'} => sub {
-    my ($db, $err, $results) = @_;
+  $db->update(some_table => {foo => 'baz'} => {foo => 'bar'} => sub ($db, 
$err, $results) {
     ...
   });
   Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
@@ -357,6 +420,20 @@
   # "update some_table set foo = 'bar' where foo like '%test%'"
   $db->update('some_table', {foo => 'bar'}, {foo => {-like => '%test%'}});
 
+=head2 update_p
+
+  my $promise = $db->update_p($table, \%fieldvals, \%where, \%options);
+
+Same as L</"update"> but returns a L<Mojo::Promise> object instead of accepting
+a callback. For API compatibility with L<Mojo::Pg>; the query is still executed
+in a blocking manner.
+
+  $db->update_p(some_table => {foo => 'baz'} => {foo => 'bar'})->then(sub 
($results) {
+    ...
+  })->catch(sub ($err) {
+    ...
+  })->wait;
+
 =head1 BUGS
 
 Report any issues on the public bugtracker.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Migrations.pm 
new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Migrations.pm
--- old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Migrations.pm 2020-07-23 
04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Migrations.pm 2021-02-16 
03:48:01.000000000 +0100
@@ -8,7 +8,7 @@
 
 use constant DEBUG => $ENV{MOJO_MIGRATIONS_DEBUG} || 0;
 
-our $VERSION = '3.004';
+our $VERSION = '3.005';
 
 has name => 'migrations';
 has sqlite => undef, weak => 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/lib/Mojo/SQLite/PubSub.pm 
new/Mojo-SQLite-3.005/lib/Mojo/SQLite/PubSub.pm
--- old/Mojo-SQLite-3.004/lib/Mojo/SQLite/PubSub.pm     2020-07-23 
04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/lib/Mojo/SQLite/PubSub.pm     2021-02-16 
03:48:01.000000000 +0100
@@ -3,7 +3,7 @@
 
 use Mojo::Util 'deprecated';
 
-our $VERSION = '3.004';
+our $VERSION = '3.005';
 
 deprecated 'Mojo::SQLite::PubSub is deprecated and should no longer be used';
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Results.pm 
new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Results.pm
--- old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Results.pm    2020-07-23 
04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Results.pm    2021-02-16 
03:48:01.000000000 +0100
@@ -5,7 +5,7 @@
 use Mojo::JSON 'from_json';
 use Mojo::Util 'tablify';
 
-our $VERSION = '3.004';
+our $VERSION = '3.005';
 
 has [qw(db sth)];
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Transaction.pm 
new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Transaction.pm
--- old/Mojo-SQLite-3.004/lib/Mojo/SQLite/Transaction.pm        2020-07-23 
04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/lib/Mojo/SQLite/Transaction.pm        2021-02-16 
03:48:01.000000000 +0100
@@ -3,7 +3,7 @@
 
 use Carp 'croak';
 
-our $VERSION = '3.004';
+our $VERSION = '3.005';
 
 has db => undef, weak => 1;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/lib/Mojo/SQLite.pm 
new/Mojo-SQLite-3.005/lib/Mojo/SQLite.pm
--- old/Mojo-SQLite-3.004/lib/Mojo/SQLite.pm    2020-07-23 04:50:46.000000000 
+0200
+++ new/Mojo-SQLite-3.005/lib/Mojo/SQLite.pm    2021-02-16 03:48:01.000000000 
+0100
@@ -14,7 +14,7 @@
 use URI;
 use URI::db;
 
-our $VERSION = '3.004';
+our $VERSION = '3.005';
 
 has abstract => sub { SQL::Abstract->new(name_sep => '.', quote_char => '"') };
 has 'auto_migrate';
@@ -206,8 +206,7 @@
 
   helper sqlite => sub { state $sql = Mojo::SQLite->new('sqlite:test.db') };
 
-  get '/' => sub {
-    my $c  = shift;
+  get '/' => sub ($c) {
     my $db = $c->sqlite->db;
     $c->render(json => $db->query(q{select datetime('now','localtime') as 
now})->hash);
   };
@@ -271,7 +270,7 @@
 features are not applicable to SQLite queries.
 
   use SQL::Abstract::Pg;
-  my $sql = Mojo::SQLite->new(abstract => SQL::Abstract::Pg->new(name_sep => 
'.', quote_char => '"'));
+  my $sql = Mojo::SQLite->new->abstract(SQL::Abstract::Pg->new(name_sep => 
'.', quote_char => '"'));
   $sql->db->select(['some_table', ['other_table', foo_id => 'id']],
     ['foo', [bar => 'baz'], \q{datetime('now') as dt}],
     {foo => 'value'},
@@ -291,8 +290,7 @@
 
 =head2 connection
 
-  $sql->on(connection => sub {
-    my ($sql, $dbh) = @_;
+  $sql->on(connection => sub ($sql, $dbh) {
     $dbh->do('pragma journal_size_limit=1000000');
   });
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/t/00-report-prereqs.t 
new/Mojo-SQLite-3.005/t/00-report-prereqs.t
--- old/Mojo-SQLite-3.004/t/00-report-prereqs.t 2020-07-23 04:50:46.000000000 
+0200
+++ new/Mojo-SQLite-3.005/t/00-report-prereqs.t 2021-02-16 03:48:01.000000000 
+0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.028
 
 use Test::More tests => 1;
 
@@ -188,6 +188,6 @@
     );
 }
 
-pass;
+pass('Reported prereqs');
 
 # vim: ts=4 sts=4 sw=4 et:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/t/crud.t 
new/Mojo-SQLite-3.005/t/crud.t
--- old/Mojo-SQLite-3.004/t/crud.t      2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/t/crud.t      2021-02-16 03:48:01.000000000 +0100
@@ -40,15 +40,15 @@
 
   subtest 'Non-blocking read' => sub {
     my $result;
-    my $delay = Mojo::IOLoop->delay(sub { $result = pop->hashes->to_array });
-    $db->select('crud_test', $delay->begin);
-    $delay->wait;
+    $db->select_p('crud_test')->then(sub {
+      $result = shift->hashes->to_array;
+    })->wait;
     is_deeply $result, [{id => 1, name => 'foo'}, {id => 2, name => 'bar'}],
       'right structure';
     $result = undef;
-    $delay = Mojo::IOLoop->delay(sub { $result = pop->hashes->to_array });
-    $db->select('crud_test', undef, undef, {-desc => 'id'}, $delay->begin);
-    $delay->wait;
+    $db->select_p('crud_test', undef, undef, {-desc => 'id'})->then(sub {
+      $result = shift->hashes->to_array;
+    })->wait;
     is_deeply $result, [{id => 2, name => 'bar'}, {id => 1, name => 'foo'}],
       'right structure';
   };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/t/database.t 
new/Mojo-SQLite-3.005/t/database.t
--- old/Mojo-SQLite-3.004/t/database.t  2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/t/database.t  2021-02-16 03:48:01.000000000 +0100
@@ -41,20 +41,14 @@
 
 subtest 'Concurrent non-blocking selects' => sub {
   my ($fail, $result);
-  Mojo::IOLoop->delay(
-    sub {
-      my $delay = shift;
-      $sql->db->query('select 1 as one' => $delay->begin);
-      $sql->db->query('select 2 as two' => $delay->begin);
-      $sql->db->query('select 2 as two' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err_one, $one, $err_two, $two, $err_again, $again) = @_;
-      $fail = $err_one || $err_two || $err_again;
-      $result
-        = [$one->hashes->first, $two->hashes->first, $again->hashes->first];
-    }
-  )->wait;
+  my $one   = $sql->db->query_p('select 1 as one');
+  my $two   = $sql->db->query_p('select 2 as two');
+  my $again = $sql->db->query_p('select 2 as two');
+  Mojo::Promise->all($one, $again, $two)->then(sub {
+    $result = [map { $_->[0]->hashes->first } @_];
+  })->catch(sub {
+    $fail = 1;
+  })->wait;
   ok !$fail, 'no error';
   is_deeply $result, [{one => 1}, {two => 2}, {two => 2}], 'right structure';
 };
@@ -62,29 +56,17 @@
 subtest 'Sequential non-blocking selects' => sub {
   my ($fail, $result);
   my $db = $sql->db;
-  Mojo::IOLoop->delay(
-    sub {
-      my $delay = shift;
-      $db->query('select 1 as one' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $one) = @_;
-      $fail = $err;
-      push @$result, $one->hashes->first;
-      $db->query('select 1 as one' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $again) = @_;
-      $fail ||= $err;
-      push @$result, $again->hashes->first;
-      $db->query('select 2 as two' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $two) = @_;
-      $fail ||= $err;
-      push @$result, $two->hashes->first;
-    }
-  )->wait;
+  $db->query_p('select 1 as one')->then(sub {
+    push @$result, shift->hashes->first;
+    $db->query_p('select 1 as one');
+  })->then(sub {
+    push @$result, shift->hashes->first;
+    $db->query_p('select 2 as two');
+  })->then(sub {
+    push @$result, shift->hashes->first;
+  })->catch(sub {
+    $fail = 1;
+  })->wait;
   ok !$fail, 'no error';
   is_deeply $result, [{one => 1}, {one => 1}, {two => 2}], 'right structure';
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-SQLite-3.004/t/results.t 
new/Mojo-SQLite-3.005/t/results.t
--- old/Mojo-SQLite-3.004/t/results.t   2020-07-23 04:50:46.000000000 +0200
+++ new/Mojo-SQLite-3.005/t/results.t   2021-02-16 03:48:01.000000000 +0100
@@ -3,6 +3,7 @@
 use Test::More;
 use Mojo::SQLite;
 use Mojo::IOLoop;
+use Mojo::Promise;
 
 package MojoSQLiteTest::Database;
 use Mojo::Base 'Mojo::SQLite::Database';
@@ -99,31 +100,23 @@
 
   subtest 'Non-blocking query where not all results have been fetched' => sub {
     my ($fail, $result);
-    Mojo::IOLoop->delay(
-      sub {
-        my $delay = shift;
-        $db->query('select name from results_test' => $delay->begin);
-      },
-      sub {
-        my ($delay, $err, $results) = @_;
-        $fail = $err;
+    my @promises = (
+      $db->query_p('select name from results_test')->then(sub {
+        my $results = shift;
         push @$result, $results->array;
         $results->finish;
-        $db->query('select name from results_test' => $delay->begin);
-      },
-      sub {
-        my ($delay, $err, $results) = @_;
-        $fail ||= $err;
+      }),
+      $db->query_p('select name from results_test')->then(sub {
+        my $results = shift;
         push @$result, $results->array_test;
         $results->finish;
-        $db->query('select name from results_test' => $delay->begin);
-      },
-      sub {
-        my ($delay, $err, $results) = @_;
-        $fail ||= $err;
+      }),
+      $db->query_p('select name from results_test')->then(sub {
+        my $results = shift;
         push @$result, $results->array;
-      }
-    )->wait;
+      }),
+    );
+    Mojo::Promise->all(@promises)->catch(sub { $fail = 1 })->wait;
     ok !$fail, 'no error';
     is_deeply $result, [['foo'], ['foo'], ['foo']], 'right structure';
   };

Reply via email to