From owner-svn-ports-all@freebsd.org Sat Mar 17 06:09:26 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CF8DF46D23; Sat, 17 Mar 2018 06:09:26 +0000 (UTC) (envelope-from dinoex@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FE3168FCF; Sat, 17 Mar 2018 06:09:26 +0000 (UTC) (envelope-from dinoex@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A7EE699D; Sat, 17 Mar 2018 06:09:26 +0000 (UTC) (envelope-from dinoex@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2H69PoG014268; Sat, 17 Mar 2018 06:09:25 GMT (envelope-from dinoex@FreeBSD.org) Received: (from dinoex@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H69PON014265; Sat, 17 Mar 2018 06:09:25 GMT (envelope-from dinoex@FreeBSD.org) Message-Id: <201803170609.w2H69PON014265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dinoex set sender to dinoex@FreeBSD.org using -f From: Dirk Meyer Date: Sat, 17 Mar 2018 06:09:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r464757 - in head/databases/rubygem-dbd-pg: . files X-SVN-Group: ports-head X-SVN-Commit-Author: dinoex X-SVN-Commit-Paths: in head/databases/rubygem-dbd-pg: . files X-SVN-Commit-Revision: 464757 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 06:09:26 -0000 Author: dinoex Date: Sat Mar 17 06:09:25 2018 New Revision: 464757 URL: https://svnweb.freebsd.org/changeset/ports/464757 Log: - fix API for pg-1.0.0 Added: head/databases/rubygem-dbd-pg/files/ head/databases/rubygem-dbd-pg/files/patch-database.rb (contents, props changed) head/databases/rubygem-dbd-pg/files/patch-statement.rb (contents, props changed) Modified: head/databases/rubygem-dbd-pg/Makefile Modified: head/databases/rubygem-dbd-pg/Makefile ============================================================================== --- head/databases/rubygem-dbd-pg/Makefile Sat Mar 17 05:21:35 2018 (r464756) +++ head/databases/rubygem-dbd-pg/Makefile Sat Mar 17 06:09:25 2018 (r464757) @@ -2,6 +2,7 @@ PORTNAME= dbd-pg PORTVERSION= 0.3.9 +PORTREVISION= 1 CATEGORIES= databases rubygems MASTER_SITES= RG Added: head/databases/rubygem-dbd-pg/files/patch-database.rb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/rubygem-dbd-pg/files/patch-database.rb Sat Mar 17 06:09:25 2018 (r464757) @@ -0,0 +1,74 @@ +--- lib/dbd/pg/database.rb.orig 2018-03-17 05:55:55 UTC ++++ lib/dbd/pg/database.rb +@@ -48,7 +48,7 @@ class DBI::DBD::Pg::Database < DBI::Base + hash['tty'] ||= '' + hash['port'] = hash['port'].to_i unless hash['port'].nil? + +- @connection = PGconn.new(hash['host'], hash['port'], hash['options'], hash['tty'], ++ @connection = PG::Connection.new(hash['host'], hash['port'], hash['options'], hash['tty'], + hash['dbname'] || hash['database'], user, auth) + + @exec_method = :exec +@@ -78,7 +78,7 @@ class DBI::DBD::Pg::Database < DBI::Base + + self['AutoCommit'] = true # Postgres starts in unchained mode (AutoCommit=on) by default + +- rescue PGError => err ++ rescue PG::Error => err + raise DBI::OperationalError.new(err.message) + end + +@@ -443,7 +443,7 @@ class DBI::DBD::Pg::Database < DBI::Base + # + # Create a BLOB. + # +- def __blob_create(mode=PGconn::INV_READ) ++ def __blob_create(mode=PG::Connection::INV_READ) + start_transaction unless @in_transaction + @connection.lo_creat(mode) + rescue PGError => err +@@ -453,7 +453,7 @@ class DBI::DBD::Pg::Database < DBI::Base + # + # Open a BLOB. + # +- def __blob_open(oid, mode=PGconn::INV_READ) ++ def __blob_open(oid, mode=PG::Connection::INV_READ) + start_transaction unless @in_transaction + @connection.lo_open(oid.to_i, mode) + rescue PGError => err +@@ -474,7 +474,7 @@ class DBI::DBD::Pg::Database < DBI::Base + # Read a BLOB and return the data. + # + def __blob_read(oid, length) +- blob = @connection.lo_open(oid.to_i, PGconn::INV_READ) ++ blob = @connection.lo_open(oid.to_i, PG::Connection::INV_READ) + + if length.nil? + data = @connection.lo_read(blob) +@@ -485,7 +485,7 @@ class DBI::DBD::Pg::Database < DBI::Base + # FIXME it doesn't like to close here either. + # @connection.lo_close(blob) + data +- rescue PGError => err ++ rescue PG::Error => err + raise DBI::DatabaseError.new(err.message) + end + +@@ -494,7 +494,7 @@ class DBI::DBD::Pg::Database < DBI::Base + # + def __blob_write(oid, value) + start_transaction unless @in_transaction +- blob = @connection.lo_open(oid.to_i, PGconn::INV_WRITE) ++ blob = @connection.lo_open(oid.to_i, PG::Connection::INV_WRITE) + res = @connection.lo_write(blob, value) + # FIXME not sure why PG doesn't like to close here -- seems to be + # working but we should make sure it's not eating file descriptors +@@ -510,7 +510,7 @@ class DBI::DBD::Pg::Database < DBI::Base + # + def __set_notice_processor(proc) + @connection.set_notice_processor proc +- rescue PGError => err ++ rescue PG::Error => err + raise DBI::DatabaseError.new(err.message) + end + end # Database Added: head/databases/rubygem-dbd-pg/files/patch-statement.rb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/rubygem-dbd-pg/files/patch-statement.rb Sat Mar 17 06:09:25 2018 (r464757) @@ -0,0 +1,20 @@ +--- lib/dbd/pg/statement.rb.orig 2018-03-17 05:55:55 UTC ++++ lib/dbd/pg/statement.rb +@@ -18,7 +18,7 @@ class DBI::DBD::Pg::Statement < DBI::Bas + @result = nil + @bindvars = [] + @prepared = false +- rescue PGError => err ++ rescue PG::Error => err + raise DBI::ProgrammingError.new(err.message) + end + +@@ -58,7 +58,7 @@ class DBI::DBD::Pg::Statement < DBI::Bas + end + + @result = DBI::DBD::Pg::Tuples.new(@db, pg_result) +- rescue PGError, RuntimeError => err ++ rescue PG::Error, RuntimeError => err + raise DBI::ProgrammingError.new(err.message) + end +