Hello community, here is the log from the commit of package rubygem-pg for openSUSE:Factory checked in at 2017-03-21 22:48:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-pg (Old) and /work/SRC/openSUSE:Factory/.rubygem-pg.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-pg" Tue Mar 21 22:48:57 2017 rev:34 rq:479639 version:0.20.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-pg/rubygem-pg.changes 2016-10-10 16:23:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-pg.new/rubygem-pg.changes 2017-03-21 22:48:58.575641835 +0100 @@ -1,0 +2,142 @@ +Sat Mar 11 05:56:34 UTC 2017 - [email protected] + +- updated to version 0.20.0 + see installed ChangeLog + + 2017-03-10 Michael Granger <[email protected]> + + * .hgignore: + Ignore .lock files + [379c198c7185] [tip] + + 2017-02-16 Lars Kanis <[email protected]> + + * lib/pg.rb: + Use block.call instead of yield in proc context + + yield in a proc context requires Ruby-2.2. + [aa91b4b14b5c] + + 2017-01-24 Lars Kanis <[email protected]> + + * History.rdoc: + Update History file regarding RI2 support. + [d52339653fe3] + + * lib/pg.rb: + Add support for RubyInstaller2 to Windows binary gem. + + RI2 ignores PATH setting for DLL search, but provides it's own API. + [87fe14131d78] + + 2017-01-14 Lars Kanis <[email protected]> + + * History.rdoc: + Update History file. [ci-skip] + [0d1921b825d7] + + * Rakefile.cross: + Update Windows binary rubies to support 2.0 to 2.4 + [3736e33ce71e] + + * ext/pg_connection.c, ext/pg_result.c: + Change all Fixnum to Integer in documentation. + + Fixnum are deprecated in Ruby-2.4. + [2e17f315848e] + + * ext/pg_type_map.c: + Avoid compiler warnings about noreturn-functions: + + ../../../../ext/pg_type_map.c: In function + ‘pg_typemap_fit_to_result’: ../../../../ext/pg_type_map.c:15:1: + warning: function might be candidate for attribute ‘noreturn’ + [-Wsuggest-attribute=noreturn] pg_typemap_fit_to_result( VALUE self, + VALUE result ) + [2af122820861] + + * spec/pg/type_map_by_class_spec.rb: + Bignum,Fixnum and Integer are the same in Ruby-2.4. + + Fixes #255 : https://bitbucket.org/ged/ruby-pg/issues/255 + [a446dfaf9d8f] + + * Rakefile, pg.gemspec: + Update rake-compiler and rake-compiler-dock + + This adds support for Ruby-2.4 on Windows and Ruby version + constraints for binary gems. + [6ebcebaad39c] + + * ext/pg_coder.c: + Fix method arguments for Coder#encode in documentation. + [ee79cce8b141] + + 2016-12-04 Lars Kanis <[email protected]> + + * History.rdoc, lib/pg/result.rb, spec/pg/result_spec.rb: + Fix Result#inspect on a cleared result. + [0c60865f718e] + + 2016-11-09 Lars Kanis <[email protected]> + + * Merge branch 'master' of github.com:larskanis/ruby-pg + [db7c584532e5] + + 2016-11-09 Lars Kanis <[email protected]> + + * Rakefile.cross: + Don't download gems in the rake-compiler-dock, but use the local + installed gems. + + This saves traffic and avoids download issues. + [14e6fa84d31c] + + * Rakefile.cross: + Update cross postgres and openssl versions. + [a6ec62e2b783] + + * Rakefile: + Fetch the errorcodes from a specific release version. + + This avoids introduction of errorcodes, which are not yet released + and possibly subject to change. + [b399dae9e988] + + * ext/errorcodes.def, ext/errorcodes.txt: + Update errorcodes to PostgreSQL version 9.6.1 + [c1b690f2b47d] + + 2016-11-09 Michael Granger <[email protected]> + + * History.rdoc: + Merged with d62b04efb055 + [cefe252948ed] + + 2016-10-21 Lars Kanis <[email protected]> + + * lib/pg/text_encoder.rb: + Fix typo in JSON#encode + [d62b04efb055] + + * History.rdoc, lib/pg/text_decoder.rb, lib/pg/text_encoder.rb: + Use secure JSON methods for JSON (de)serialisation. + + This fixes issue #248 : https://bitbucket.org/ged/ruby-pg/issues/248 + [fe3e883bead2] + + 2016-09-21 Michael Granger <[email protected]> + + * .hgtags: + Added tag v0.19.0 for changeset bd2aaa2c5797 + [5ed7106cc770] + + * .hgsigs: + Added signature for changeset 8beaa5d72670 + [bd2aaa2c5797] [v0.19.0] + + * History.rdoc, lib/pg.rb: + Bump the minor version, update history. + [8beaa5d72670] + +------------------------------------------------------------------- Old: ---- pg-0.19.0.gem New: ---- pg-0.20.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-pg.spec ++++++ --- /var/tmp/diff_new_pack.kLB3ls/_old 2017-03-21 22:48:59.363530449 +0100 +++ /var/tmp/diff_new_pack.kLB3ls/_new 2017-03-21 22:48:59.367529883 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-pg # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-pg -Version: 0.19.0 +Version: 0.20.0 Release: 0 %define mod_name pg %define mod_full_name %{mod_name}-%{version} ++++++ pg-0.19.0.gem -> pg-0.20.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ChangeLog new/ChangeLog --- old/ChangeLog 2016-09-22 05:24:03.000000000 +0200 +++ new/ChangeLog 2017-03-10 22:57:15.000000000 +0100 @@ -1,3 +1,139 @@ +2017-03-10 Michael Granger <[email protected]> + + * .hgignore: + Ignore .lock files + [379c198c7185] [tip] + +2017-02-16 Lars Kanis <[email protected]> + + * lib/pg.rb: + Use block.call instead of yield in proc context + + yield in a proc context requires Ruby-2.2. + [aa91b4b14b5c] + +2017-01-24 Lars Kanis <[email protected]> + + * History.rdoc: + Update History file regarding RI2 support. + [d52339653fe3] + + * lib/pg.rb: + Add support for RubyInstaller2 to Windows binary gem. + + RI2 ignores PATH setting for DLL search, but provides it's own API. + [87fe14131d78] + +2017-01-14 Lars Kanis <[email protected]> + + * History.rdoc: + Update History file. [ci-skip] + [0d1921b825d7] + + * Rakefile.cross: + Update Windows binary rubies to support 2.0 to 2.4 + [3736e33ce71e] + + * ext/pg_connection.c, ext/pg_result.c: + Change all Fixnum to Integer in documentation. + + Fixnum are deprecated in Ruby-2.4. + [2e17f315848e] + + * ext/pg_type_map.c: + Avoid compiler warnings about noreturn-functions: + + ../../../../ext/pg_type_map.c: In function + ‘pg_typemap_fit_to_result’: ../../../../ext/pg_type_map.c:15:1: + warning: function might be candidate for attribute ‘noreturn’ + [-Wsuggest-attribute=noreturn] pg_typemap_fit_to_result( VALUE self, + VALUE result ) + [2af122820861] + + * spec/pg/type_map_by_class_spec.rb: + Bignum,Fixnum and Integer are the same in Ruby-2.4. + + Fixes #255 : https://bitbucket.org/ged/ruby-pg/issues/255 + [a446dfaf9d8f] + + * Rakefile, pg.gemspec: + Update rake-compiler and rake-compiler-dock + + This adds support for Ruby-2.4 on Windows and Ruby version + constraints for binary gems. + [6ebcebaad39c] + + * ext/pg_coder.c: + Fix method arguments for Coder#encode in documentation. + [ee79cce8b141] + +2016-12-04 Lars Kanis <[email protected]> + + * History.rdoc, lib/pg/result.rb, spec/pg/result_spec.rb: + Fix Result#inspect on a cleared result. + [0c60865f718e] + +2016-11-09 Lars Kanis <[email protected]> + + * Merge branch 'master' of github.com:larskanis/ruby-pg + [db7c584532e5] + +2016-11-09 Lars Kanis <[email protected]> + + * Rakefile.cross: + Don't download gems in the rake-compiler-dock, but use the local + installed gems. + + This saves traffic and avoids download issues. + [14e6fa84d31c] + + * Rakefile.cross: + Update cross postgres and openssl versions. + [a6ec62e2b783] + + * Rakefile: + Fetch the errorcodes from a specific release version. + + This avoids introduction of errorcodes, which are not yet released + and possibly subject to change. + [b399dae9e988] + + * ext/errorcodes.def, ext/errorcodes.txt: + Update errorcodes to PostgreSQL version 9.6.1 + [c1b690f2b47d] + +2016-11-09 Michael Granger <[email protected]> + + * History.rdoc: + Merged with d62b04efb055 + [cefe252948ed] + +2016-10-21 Lars Kanis <[email protected]> + + * lib/pg/text_encoder.rb: + Fix typo in JSON#encode + [d62b04efb055] + + * History.rdoc, lib/pg/text_decoder.rb, lib/pg/text_encoder.rb: + Use secure JSON methods for JSON (de)serialisation. + + This fixes issue #248 : https://bitbucket.org/ged/ruby-pg/issues/248 + [fe3e883bead2] + +2016-09-21 Michael Granger <[email protected]> + + * .hgtags: + Added tag v0.19.0 for changeset bd2aaa2c5797 + [5ed7106cc770] + + * .hgsigs: + Added signature for changeset 8beaa5d72670 + [bd2aaa2c5797] [v0.19.0] + + * History.rdoc, lib/pg.rb: + Bump the minor version, update history. + [8beaa5d72670] + 2016-09-04 Lars Kanis <[email protected]> * ext/pg_connection.c: @@ -5,7 +141,7 @@ We don't really need an Array at all, but storing the values on the stack is enough. - [4d9c4ee44d11] [tip] + [4d9c4ee44d11] * ext/pg_connection.c: Use the asynchronous interface for setting the default_encoding. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.rdoc new/History.rdoc --- old/History.rdoc 2016-09-22 05:24:03.000000000 +0200 +++ new/History.rdoc 2017-03-10 22:57:15.000000000 +0100 @@ -1,3 +1,21 @@ +== v0.20.0 [2017-03-10] Michael Granger <[email protected]> + +Enhancements: +- Update error codes to PostgreSQL-9.6 +- Update Windows binary gems to Ruby-2.4, PostgreSQL 9.6.1 and + OpenSSL 1.0.2j. +- Add support for RubyInstaller2 to Windows binary gems. + +Bugfixes: +- Use secure JSON methods for JSON (de)serialisation. #248 +- Fix Result#inspect on a cleared result. +- Fix test case that failed on Ruby-2.4. #255 + +Documentation fixes: +- Talk about Integer instead of Fixnum. +- Fix method signature of Coder#encode. + + == v0.19.0 [2016-09-21] Michael Granger <[email protected]> - Deprecate Ruby 1.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2016-09-22 05:24:03.000000000 +0200 +++ new/Rakefile 2017-03-10 22:57:15.000000000 +0100 @@ -60,8 +60,8 @@ self.developer 'Michael Granger', '[email protected]' self.developer 'Lars Kanis', '[email protected]' - self.dependency 'rake-compiler', '~> 0.9', :developer - self.dependency 'rake-compiler-dock', '~> 0.5', :developer + self.dependency 'rake-compiler', '~> 1.0.3', :developer + self.dependency 'rake-compiler-dock', '~> 0.6.0', :developer self.dependency 'hoe', '~> 3.12', :developer self.dependency 'hoe-deveiate', '~> 0.6', :developer self.dependency 'hoe-bundler', '~> 1.0', :developer @@ -185,7 +185,7 @@ desc "Update list of server error codes" task :update_error_codes do - URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=HEAD" + URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL9_6_1" ERRORCODES_TXT = "ext/errorcodes.txt" sh "wget #{URL_ERRORCODES_TXT.inspect} -O #{ERRORCODES_TXT.inspect} || curl #{URL_ERRORCODES_TXT.inspect} -o #{ERRORCODES_TXT.inspect}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile.cross new/Rakefile.cross --- old/Rakefile.cross 2016-09-22 05:24:03.000000000 +0200 +++ new/Rakefile.cross 2017-03-10 22:57:15.000000000 +0100 @@ -29,8 +29,8 @@ self.host_platform = toolchain # Cross-compilation constants - self.openssl_version = ENV['OPENSSL_VERSION'] || '1.0.2h' - self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.5.4' + self.openssl_version = ENV['OPENSSL_VERSION'] || '1.0.2j' + self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.6.1' # Check if symlinks work in the current working directory. # This fails, if rake-compiler-dock is running on a Windows box. @@ -291,11 +291,12 @@ # Copy gem signing key and certs to be accessable from the docker container mkdir_p 'build/gem' sh "cp ~/.gem/gem-*.pem build/gem/ || true" + sh "bundle package" RakeCompilerDock.sh <<-EOT mkdir ~/.gem && (cp build/gem/gem-*.pem ~/.gem/ || true) && - bundle install && - rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0:1.9.3 + bundle install --local && + rake cross native gem RUBY_CC_VERSION=2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 EOT end Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/errorcodes.def new/ext/errorcodes.def --- old/ext/errorcodes.def 2016-09-22 05:24:03.000000000 +0200 +++ new/ext/errorcodes.def 2017-03-10 22:57:15.000000000 +0100 @@ -374,6 +374,10 @@ register_error_class( "25P02", klass ); } { + VALUE klass = define_error_class( "IdleInTransactionSessionTimeout", "25" ); + register_error_class( "25P03", klass ); +} +{ VALUE klass = define_error_class( "InvalidSqlStatementName", NULL ); register_error_class( "26000", klass ); register_error_class( "26", klass ); @@ -794,6 +798,11 @@ register_error_class( "58P02", klass ); } { + VALUE klass = define_error_class( "SnapshotTooOld", NULL ); + register_error_class( "72000", klass ); + register_error_class( "72", klass ); +} +{ VALUE klass = define_error_class( "ConfigFileError", NULL ); register_error_class( "F0000", klass ); register_error_class( "F0", klass ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/errorcodes.txt new/ext/errorcodes.txt --- old/ext/errorcodes.txt 2016-09-22 05:24:03.000000000 +0200 +++ new/ext/errorcodes.txt 2017-03-10 22:57:15.000000000 +0100 @@ -15,6 +15,9 @@ # src/pl/plpgsql/src/plerrcodes.h # a list of PL/pgSQL condition names and their SQLSTATE codes # +# src/pl/tcl/pltclerrcodes.h +# the same, for PL/Tcl +# # doc/src/sgml/errcodes-list.sgml # a SGML table of error codes for inclusion in the documentation # @@ -229,6 +232,7 @@ 25007 E ERRCODE_SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED schema_and_data_statement_mixing_not_supported 25P01 E ERRCODE_NO_ACTIVE_SQL_TRANSACTION no_active_sql_transaction 25P02 E ERRCODE_IN_FAILED_SQL_TRANSACTION in_failed_sql_transaction +25P03 E ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT idle_in_transaction_session_timeout Section: Class 26 - Invalid SQL Statement Name @@ -413,6 +417,10 @@ 58P01 E ERRCODE_UNDEFINED_FILE undefined_file 58P02 E ERRCODE_DUPLICATE_FILE duplicate_file +Section: Class 72 - Snapshot Failure +# (class borrowed from Oracle) +72000 E ERRCODE_SNAPSHOT_TOO_OLD snapshot_too_old + Section: Class F0 - Configuration File Error # (PostgreSQL-specific error class) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/pg_coder.c new/ext/pg_coder.c --- old/ext/pg_coder.c 2016-09-22 05:24:03.000000000 +0200 +++ new/ext/pg_coder.c 2017-03-10 22:57:15.000000000 +0100 @@ -105,7 +105,7 @@ /* * call-seq: - * coder.encode( value ) + * coder.encode( value [, encoding] ) * * Encodes the given Ruby object into string representation, without * sending data to/from the database server. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/pg_connection.c new/ext/pg_connection.c --- old/ext/pg_connection.c 2016-09-22 05:24:03.000000000 +0200 +++ new/ext/pg_connection.c 2017-03-10 22:57:15.000000000 +0100 @@ -1,6 +1,6 @@ /* * pg_connection.c - PG::Connection class extension - * $Id: pg_connection.c,v 4d9c4ee44d11 2016/09/04 17:32:03 lars $ + * $Id: pg_connection.c,v 2e17f315848e 2017/01/14 20:05:06 lars $ * */ @@ -352,9 +352,9 @@ #ifdef HAVE_PQPING /* * call-seq: - * PG::Connection.ping(connection_hash) -> Fixnum - * PG::Connection.ping(connection_string) -> Fixnum - * PG::Connection.ping(host, port, options, tty, dbname, login, password) -> Fixnum + * PG::Connection.ping(connection_hash) -> Integer + * PG::Connection.ping(connection_string) -> Integer + * PG::Connection.ping(host, port, options, tty, dbname, login, password) -> Integer * * Check server status. * @@ -457,7 +457,7 @@ /* * call-seq: - * conn.connect_poll() -> Fixnum + * conn.connect_poll() -> Integer * * Returns one of: * [+PGRES_POLLING_READING+] @@ -566,7 +566,7 @@ /* * call-seq: - * conn.reset_poll -> Fixnum + * conn.reset_poll -> Integer * * Checks the status of a connection reset operation. * See #connect_start and #connect_poll for @@ -805,7 +805,7 @@ /* * call-seq: - * conn.socket() -> Fixnum + * conn.socket() -> Integer * * Returns the socket's file descriptor for this connection. * <tt>IO.for_fd()</tt> can be used to build a proper IO object to the socket. @@ -880,7 +880,7 @@ /* * call-seq: - * conn.backend_pid() -> Fixnum + * conn.backend_pid() -> Integer * * Returns the process ID of the backend server * process for this connection. @@ -1234,8 +1234,8 @@ * Each element of the +params+ array may be either: * a hash of the form: * {:value => String (value of bind parameter) - * :type => Fixnum (oid of type of bind parameter) - * :format => Fixnum (0 for text, 1 for binary) + * :type => Integer (oid of type of bind parameter) + * :format => Integer (0 for text, 1 for binary) * } * or, it may be a String. If it is a string, that is equivalent to the hash: * { :value => <string value>, :type => 0, :format => 0 } @@ -1377,7 +1377,7 @@ * SQL query. Each element of the +params+ array may be either: * a hash of the form: * {:value => String (value of bind parameter) - * :format => Fixnum (0 for text, 1 for binary) + * :format => Integer (0 for text, 1 for binary) * } * or, it may be a String. If it is a string, that is equivalent to the hash: * { :value => <string value>, :format => 0 } @@ -1793,8 +1793,8 @@ * Each element of the +params+ array may be either: * a hash of the form: * {:value => String (value of bind parameter) - * :type => Fixnum (oid of type of bind parameter) - * :format => Fixnum (0 for text, 1 for binary) + * :type => Integer (oid of type of bind parameter) + * :format => Integer (0 for text, 1 for binary) * } * or, it may be a String. If it is a string, that is equivalent to the hash: * { :value => <string value>, :type => 0, :format => 0 } @@ -1940,7 +1940,7 @@ * SQL query. Each element of the +params+ array may be either: * a hash of the form: * {:value => String (value of bind parameter) - * :format => Fixnum (0 for text, 1 for binary) + * :format => Integer (0 for text, 1 for binary) * } * or, it may be a String. If it is a string, that is equivalent to the hash: * { :value => <string value>, :format => 0 } @@ -2724,7 +2724,7 @@ /* * call-seq: - * conn.set_error_verbosity( verbosity ) -> Fixnum + * conn.set_error_verbosity( verbosity ) -> Integer * * Sets connection's verbosity to _verbosity_ and returns * the previous setting. Available settings are: @@ -3280,7 +3280,7 @@ /* * call-seq: - * conn.lo_creat( [mode] ) -> Fixnum + * conn.lo_creat( [mode] ) -> Integer * * Creates a large object with mode _mode_. Returns a large object Oid. * On failure, it raises PG::Error. @@ -3307,7 +3307,7 @@ /* * call-seq: - * conn.lo_create( oid ) -> Fixnum + * conn.lo_create( oid ) -> Integer * * Creates a large object with oid _oid_. Returns the large object Oid. * On failure, it raises PG::Error. @@ -3328,7 +3328,7 @@ /* * call-seq: - * conn.lo_import(file) -> Fixnum + * conn.lo_import(file) -> Integer * * Import a file to a large object. Returns a large object Oid. * @@ -3373,7 +3373,7 @@ /* * call-seq: - * conn.lo_open( oid, [mode] ) -> Fixnum + * conn.lo_open( oid, [mode] ) -> Integer * * Open a large object of _oid_. Returns a large object descriptor * instance on success. The _mode_ argument specifies the mode for @@ -3404,7 +3404,7 @@ /* * call-seq: - * conn.lo_write( lo_desc, buffer ) -> Fixnum + * conn.lo_write( lo_desc, buffer ) -> Integer * * Writes the string _buffer_ to the large object _lo_desc_. * Returns the number of bytes written. @@ -3471,7 +3471,7 @@ /* * call-seq: - * conn.lo_lseek( lo_desc, offset, whence ) -> Fixnum + * conn.lo_lseek( lo_desc, offset, whence ) -> Integer * * Move the large object pointer _lo_desc_ to offset _offset_. * Valid values for _whence_ are +SEEK_SET+, +SEEK_CUR+, and +SEEK_END+. @@ -3493,7 +3493,7 @@ /* * call-seq: - * conn.lo_tell( lo_desc ) -> Fixnum + * conn.lo_tell( lo_desc ) -> Integer * * Returns the current position of the large object _lo_desc_. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/pg_result.c new/ext/pg_result.c --- old/ext/pg_result.c 2016-09-22 05:24:03.000000000 +0200 +++ new/ext/pg_result.c 2017-03-10 22:57:15.000000000 +0100 @@ -1,6 +1,6 @@ /* * pg_result.c - PG::Result class extension - * $Id: pg_result.c,v 982082c0d77b 2016/01/31 19:28:55 ged $ + * $Id: pg_result.c,v 2e17f315848e 2017/01/14 20:05:06 lars $ * */ @@ -302,7 +302,7 @@ /* * call-seq: - * res.result_status() -> Fixnum + * res.result_status() -> Integer * * Returns the status of the query. The status value is one of: * * +PGRES_EMPTY_QUERY+ @@ -414,7 +414,7 @@ /* * call-seq: - * res.ntuples() -> Fixnum + * res.ntuples() -> Integer * * Returns the number of tuples in the query result. */ @@ -466,7 +466,7 @@ /* * call-seq: - * res.fnumber( name ) -> Fixnum + * res.fnumber( name ) -> Integer * * Returns the index of the field specified by the string +name+. * The given +name+ is treated like an identifier in an SQL command, that is, @@ -527,7 +527,7 @@ /* * call-seq: - * res.ftablecol( column_number ) -> Fixnum + * res.ftablecol( column_number ) -> Integer * * Returns the column number (within its table) of the table from * which the column _column_number_ is made up. @@ -552,7 +552,7 @@ /* * call-seq: - * res.fformat( column_number ) -> Fixnum + * res.fformat( column_number ) -> Integer * * Returns the format (0 for text, 1 for binary) of column * _column_number_. @@ -696,7 +696,7 @@ /* * call-seq: - * res.getlength( tup_num, field_num ) -> Fixnum + * res.getlength( tup_num, field_num ) -> Integer * * Returns the (String) length of the field in bytes. * @@ -721,7 +721,7 @@ /* * call-seq: - * res.nparams() -> Fixnum + * res.nparams() -> Integer * * Returns the number of parameters of a prepared statement. * Only useful for the result returned by conn.describePrepared diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/pg_type_map.c new/ext/pg_type_map.c --- old/ext/pg_type_map.c 2016-09-22 05:24:03.000000000 +0200 +++ new/ext/pg_type_map.c 2017-03-10 22:57:15.000000000 +0100 @@ -1,6 +1,6 @@ /* * pg_column_map.c - PG::ColumnMap class extension - * $Id: pg_type_map.c,v fcf731d3dff7 2015/09/08 12:25:06 jfali $ + * $Id: pg_type_map.c,v 2af122820861 2017/01/14 19:56:36 lars $ * */ @@ -11,46 +11,53 @@ static ID s_id_fit_to_query; static ID s_id_fit_to_result; +NORETURN( VALUE +pg_typemap_fit_to_result( VALUE self, VALUE result )); +NORETURN( VALUE +pg_typemap_fit_to_query( VALUE self, VALUE params )); +NORETURN( int +pg_typemap_fit_to_copy_get( VALUE self )); +NORETURN( VALUE +pg_typemap_result_value( t_typemap *p_typemap, VALUE result, int tuple, int field )); +NORETURN( t_pg_coder * +pg_typemap_typecast_query_param( t_typemap *p_typemap, VALUE param_value, int field )); +NORETURN( VALUE +pg_typemap_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, int format, int enc_idx )); + VALUE pg_typemap_fit_to_result( VALUE self, VALUE result ) { rb_raise( rb_eNotImpError, "type map %s is not suitable to map result values", rb_obj_classname(self) ); - return Qnil; } VALUE pg_typemap_fit_to_query( VALUE self, VALUE params ) { rb_raise( rb_eNotImpError, "type map %s is not suitable to map query params", rb_obj_classname(self) ); - return Qnil; } int pg_typemap_fit_to_copy_get( VALUE self ) { rb_raise( rb_eNotImpError, "type map %s is not suitable to map get_copy_data results", rb_obj_classname(self) ); - return Qnil; } VALUE pg_typemap_result_value( t_typemap *p_typemap, VALUE result, int tuple, int field ) { rb_raise( rb_eNotImpError, "type map is not suitable to map result values" ); - return Qnil; } t_pg_coder * pg_typemap_typecast_query_param( t_typemap *p_typemap, VALUE param_value, int field ) { rb_raise( rb_eNotImpError, "type map is not suitable to map query params" ); - return NULL; } VALUE pg_typemap_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, int format, int enc_idx ) { rb_raise( rb_eNotImpError, "type map is not suitable to map get_copy_data results" ); - return Qnil; } const struct pg_typemap_funcs pg_typemap_funcs = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pg/result.rb new/lib/pg/result.rb --- old/lib/pg/result.rb 2016-09-22 05:24:03.000000000 +0200 +++ new/lib/pg/result.rb 2017-03-10 22:57:15.000000000 +0100 @@ -19,7 +19,11 @@ ### Return a String representation of the object suitable for debugging. def inspect str = self.to_s - str[-1,0] = " status=#{res_status(result_status)} ntuples=#{ntuples} nfields=#{nfields} cmd_tuples=#{cmd_tuples}" + str[-1,0] = if cleared? + " cleared" + else + " status=#{res_status(result_status)} ntuples=#{ntuples} nfields=#{nfields} cmd_tuples=#{cmd_tuples}" + end return str end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pg/text_decoder.rb new/lib/pg/text_decoder.rb --- old/lib/pg/text_decoder.rb 2016-09-22 05:24:03.000000000 +0200 +++ new/lib/pg/text_decoder.rb 2017-03-10 22:57:15.000000000 +0100 @@ -43,7 +43,7 @@ class JSON < SimpleDecoder def decode(string, tuple=nil, field=nil) - ::JSON.load(string) + ::JSON.parse(string, quirks_mode: true) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pg/text_encoder.rb new/lib/pg/text_encoder.rb --- old/lib/pg/text_encoder.rb 2016-09-22 05:24:03.000000000 +0200 +++ new/lib/pg/text_encoder.rb 2017-03-10 22:57:15.000000000 +0100 @@ -27,7 +27,7 @@ class JSON < SimpleEncoder def encode(value) - ::JSON.dump(value) + ::JSON.generate(value, quirks_mode: true) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pg.rb new/lib/pg.rb --- old/lib/pg.rb 2016-09-22 05:24:03.000000000 +0200 +++ new/lib/pg.rb 2017-03-10 22:57:15.000000000 +0100 @@ -8,11 +8,22 @@ major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}" - # Set the PATH environment variable, so that libpq.dll can be found. - old_path = ENV['PATH'] - ENV['PATH'] = "#{File.expand_path("..", __FILE__)};#{old_path}" - require "#{major_minor}/pg_ext" - ENV['PATH'] = old_path + add_dll_path = proc do |path, &block| + begin + require 'ruby_installer' + RubyInstaller.add_dll_directory(path, &block) + rescue LoadError + old_path = ENV['PATH'] + ENV['PATH'] = "#{path};#{old_path}" + block.call + ENV['PATH'] = old_path + end + end + + # Temporary add this directory for DLL search, so that libpq.dll can be found. + add_dll_path.call(__dir__) do + require "#{major_minor}/pg_ext" + end else raise end @@ -24,10 +35,10 @@ module PG # Library version - VERSION = '0.19.0' + VERSION = '0.20.0' # VCS revision - REVISION = %q$Revision: 8beaa5d72670 $ + REVISION = %q$Revision: 838985377b48 $ class NotAllCopyDataRetrieved < PG::Error end @@ -61,4 +72,3 @@ # Backward-compatible aliase PGError = PG::Error - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-09-22 05:24:03.000000000 +0200 +++ new/metadata 2017-03-10 22:57:15.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: pg version: !ruby/object:Gem::Version - version: 0.19.0 + version: 0.20.0 platform: ruby authors: - Michael Granger @@ -36,7 +36,7 @@ w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA= -----END CERTIFICATE----- -date: 2016-09-22 00:00:00.000000000 Z +date: 2017-03-10 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: hoe-mercurial @@ -100,28 +100,28 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: '0.9' + version: 1.0.3 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '0.9' + version: 1.0.3 - !ruby/object:Gem::Dependency name: rake-compiler-dock requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '0.5' + version: 0.6.0 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '0.5' + version: 0.6.0 - !ruby/object:Gem::Dependency name: hoe requirement: !ruby/object:Gem::Requirement Binary files old/metadata.gz.sig and new/metadata.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/pg/result_spec.rb new/spec/pg/result_spec.rb --- old/spec/pg/result_spec.rb 2016-09-22 05:24:03.000000000 +0200 +++ new/spec/pg/result_spec.rb 2017-03-10 22:57:15.000000000 +0100 @@ -403,6 +403,13 @@ expect( r.cleared? ).to eq(true) end + it "can be inspected before and after clear" do + r = @conn.exec "select 1" + expect( r.inspect ).to match(/status=PGRES_TUPLES_OK/) + r.clear + expect( r.inspect ).to match(/cleared/) + end + context 'result value conversions with TypeMapByColumn' do let!(:textdec_int){ PG::TextDecoder::Integer.new name: 'INT4', oid: 23 } let!(:textdec_float){ PG::TextDecoder::Float.new name: 'FLOAT4', oid: 700 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/pg/type_map_by_class_spec.rb new/spec/pg/type_map_by_class_spec.rb --- old/spec/pg/type_map_by_class_spec.rb 2016-09-22 05:24:03.000000000 +0200 +++ new/spec/pg/type_map_by_class_spec.rb 2017-03-10 22:57:15.000000000 +0100 @@ -59,7 +59,7 @@ it "should retrieve particular conversions" do expect( tm[Integer] ).to eq(binaryenc_int) expect( tm[Float] ).to eq(textenc_float) - expect( tm[Bignum] ).to be_nil + expect( tm[Range] ).to be_nil expect( derived_tm[raise_class] ).to be_kind_of(Proc) expect( derived_tm[Array] ).to eq(:array_type_map_for) end
