Hello community,

here is the log from the commit of package perl-Mojo-Pg for openSUSE:Factory 
checked in at 2017-03-24 02:23:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojo-Pg (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojo-Pg"

Fri Mar 24 02:23:16 2017 rev:3 rq:482152 version:3.05

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojo-Pg/perl-Mojo-Pg.changes        
2017-03-16 09:51:47.159659430 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new/perl-Mojo-Pg.changes   
2017-03-24 02:23:18.622007449 +0100
@@ -1,0 +2,9 @@
+Fri Mar 17 07:03:30 UTC 2017 - [email protected]
+
+- updated to 3.05
+   see /usr/share/doc/packages/perl-Mojo-Pg/Changes
+
+  3.05  2017-03-12
+    - Improved from_string method in Mojo::Pg with search_path support.
+
+-------------------------------------------------------------------

Old:
----
  Mojo-Pg-3.04.tar.gz

New:
----
  Mojo-Pg-3.05.tar.gz

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

Other differences:
------------------
++++++ perl-Mojo-Pg.spec ++++++
--- /var/tmp/diff_new_pack.c5Epyy/_old  2017-03-24 02:23:19.201925394 +0100
+++ /var/tmp/diff_new_pack.c5Epyy/_new  2017-03-24 02:23:19.201925394 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojo-Pg
-Version:        3.04
+Version:        3.05
 Release:        0
 %define cpan_name Mojo-Pg
 Summary:        Mojolicious ♥ PostgreSQL

++++++ Mojo-Pg-3.04.tar.gz -> Mojo-Pg-3.05.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-3.04/Changes new/Mojo-Pg-3.05/Changes
--- old/Mojo-Pg-3.04/Changes    2017-03-08 09:34:08.000000000 +0100
+++ new/Mojo-Pg-3.05/Changes    2017-03-12 12:39:16.000000000 +0100
@@ -1,4 +1,7 @@
 
+3.05  2017-03-12
+  - Improved from_string method in Mojo::Pg with search_path support.
+
 3.04  2017-03-08
   - Fixed array reference handling in queries generated with SQL::Abstract.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-3.04/META.json new/Mojo-Pg-3.05/META.json
--- old/Mojo-Pg-3.04/META.json  2017-03-08 09:45:40.000000000 +0100
+++ new/Mojo-Pg-3.05/META.json  2017-03-12 12:41:43.000000000 +0100
@@ -57,6 +57,6 @@
       },
       "x_IRC" : "irc://irc.perl.org/#mojo"
    },
-   "version" : "3.04",
+   "version" : "3.05",
    "x_serialization_backend" : "JSON::PP version 2.27400"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-3.04/META.yml new/Mojo-Pg-3.05/META.yml
--- old/Mojo-Pg-3.04/META.yml   2017-03-08 09:45:40.000000000 +0100
+++ new/Mojo-Pg-3.05/META.yml   2017-03-12 12:41:43.000000000 +0100
@@ -30,5 +30,5 @@
   homepage: http://mojolicious.org
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/kraih/mojo-pg.git
-version: '3.04'
+version: '3.05'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-3.04/lib/Mojo/Pg.pm 
new/Mojo-Pg-3.05/lib/Mojo/Pg.pm
--- old/Mojo-Pg-3.04/lib/Mojo/Pg.pm     2017-03-08 09:33:16.000000000 +0100
+++ new/Mojo-Pg-3.05/lib/Mojo/Pg.pm     2017-03-12 12:39:27.000000000 +0100
@@ -32,7 +32,7 @@
   return $pubsub;
 };
 
-our $VERSION = '3.04';
+our $VERSION = '3.05';
 
 sub db { $_[0]->database_class->new(dbh => $_[0]->_dequeue, pg => $_[0]) }
 
@@ -53,9 +53,12 @@
   if (defined(my $username = $url->username)) { $self->username($username) }
   if (defined(my $password = $url->password)) { $self->password($password) }
 
-  # Service
+  # Service and search_path
   my $hash = $url->query->to_hash;
   if (my $service = delete $hash->{service}) { $dsn .= "service=$service" }
+  if (my $path = delete $hash->{search_path}) {
+    $self->search_path(ref $path ? $path : [$path]);
+  }
 
   # Options
   @{$self->options}{keys %$hash} = values %$hash;
@@ -128,8 +131,8 @@
   my $db = $pg->db;
 
   # Use SQL::Abstract to generate simple CRUD queries for you
-  $db->insert('names', {name => 'Isabel'});
-  my $id = $db->select('names', ['id'], {name => 'Isabel'})->hash->{id};
+  $db->insert('names', {name => 'Isabell'});
+  my $id = $db->select('names', ['id'], {name => 'Isabell'})->hash->{id};
   $db->update('names', {name => 'Belle'}, {id => $id});
   $db->delete('names', {name => 'Belle'});
 
@@ -454,6 +457,9 @@
   # Service and additional options
   $pg->from_string('postgresql://?service=foo&PrintError=1&RaiseError=0');
 
+  # Username, database, an option and search_path
+  
$pg->from_string('postgres://sri@/db6?&PrintError=1&search_path=test_schema');
+
 =head2 new
 
   my $pg = Mojo::Pg->new;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-3.04/t/connection.t 
new/Mojo-Pg-3.05/t/connection.t
--- old/Mojo-Pg-3.04/t/connection.t     2016-12-30 14:40:14.000000000 +0100
+++ new/Mojo-Pg-3.05/t/connection.t     2017-03-12 12:37:05.000000000 +0100
@@ -11,6 +11,7 @@
 my $options = {AutoCommit => 1, AutoInactiveDestroy => 1, PrintError => 0,
   RaiseError => 1};
 is_deeply $pg->options, $options, 'right options';
+is $pg->search_path, undef, 'no search_path';
 
 # Minimal connection string with database
 $pg = Mojo::Pg->new('postgresql:///test1');
@@ -30,6 +31,26 @@
   RaiseError => 1};
 is_deeply $pg->options, $options, 'right options';
 
+# Connection string with service and search_path
+$pg = Mojo::Pg->new('postgres://?service=foo&search_path=test_schema');
+is $pg->dsn,      'dbi:Pg:service=foo', 'right data source';
+is $pg->username, '',                   'no username';
+is $pg->password, '',                   'no password';
+$options = {AutoCommit => 1, AutoInactiveDestroy => 1, PrintError => 0,
+  RaiseError => 1};
+is_deeply $pg->options, $options, 'right options';
+is_deeply $pg->search_path, ['test_schema'], 'right search_path';
+
+# Connection string with multiple search_path values
+$pg = Mojo::Pg->new('postgres://a:b@/c?search_path=test1&search_path=test2');
+is $pg->dsn,      'dbi:Pg:dbname=c', 'right data source';
+is $pg->username, 'a',               'no username';
+is $pg->password, 'b',               'no password';
+$options = {AutoCommit => 1, AutoInactiveDestroy => 1, PrintError => 0,
+  RaiseError => 1};
+is_deeply $pg->options, $options, 'right options';
+is_deeply $pg->search_path, ['test1', 'test2'], 'right search_path';
+
 # Connection string with host and port
 $pg = Mojo::Pg->new('postgresql://127.0.0.1:8080/test2');
 is $pg->dsn, 'dbi:Pg:dbname=test2;host=127.0.0.1;port=8080',


Reply via email to