Update to pg 1.1.4.

This commit is contained in:
Vít Ondruch 2019-01-10 17:08:10 +01:00
parent a07b7192b7
commit e6f7821a78
4 changed files with 8 additions and 49 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/pg-0.21.0.gem
/pg-1.0.0.gem
/pg-1.1.3.gem
/pg-1.1.4.gem

View File

@ -1,32 +0,0 @@
# HG changeset patch
# User Lars Kanis <lars@greiz-reinsdorf.de>
# Date 1545850926 -3600
# Node ID 74879444e437d42028a636425a4482467a65a711
# Parent 626befee1debcc59472051e64f9ff067522fc3e1
Fix specs for PostgreSQL-11
PG-11 changed the way how/when parameters are interpret.
Fixes 287: https://bitbucket.org/ged/ruby-pg/issues/287/pg-connection-server-ping-returns-correct
diff --git a/spec/pg/connection_spec.rb b/spec/pg/connection_spec.rb
--- a/spec/pg/connection_spec.rb
+++ b/spec/pg/connection_spec.rb
@@ -1140,8 +1140,16 @@
expect( ping ).to eq( PG::PQPING_NO_RESPONSE )
end
+ it "returns error when ping connection arguments are wrong" do
+ ping = described_class.ping('localhost', 'localhost', nil, nil, :test, nil, nil)
+ expect( ping ).to_not eq( PG::PQPING_OK )
+ end
+
it "returns correct response when ping connection arguments are wrong" do
- ping = described_class.ping('localhost', 'localhost', nil, nil, :test, nil, nil)
+ ping = described_class.ping(
+ :host => 'localhost',
+ :invalid_option => 9999,
+ :dbname => :test)
expect( ping ).to eq( PG::PQPING_NO_ATTEMPT )
end

View File

@ -2,8 +2,8 @@
%global gem_name pg
Name: rubygem-%{gem_name}
Version: 1.1.3
Release: 2%{?dist}
Version: 1.1.4
Release: 1%{?dist}
Summary: A Ruby interface to the PostgreSQL RDBMS
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
#
@ -16,9 +16,6 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Disable RPATH.
# https://bitbucket.org/ged/ruby-pg/issue/183
Patch0: rubygem-pg-0.17.1-remove-rpath.patch
# Fix compatibility with PG11.
# https://bitbucket.org/ged/ruby-pg/issues/287/pg-connection-server-ping-returns-correct
Patch1: rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch
# Required in ext/pg_text_decoder.c
Requires: rubygem(bigdecimal)
BuildRequires: ruby(release)
@ -46,10 +43,9 @@ BuildArch: noarch
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
%setup -q -n %{gem_name}-%{version}
%patch0 -p1
%patch1 -p1
%build
# Create the gem as gem install only works on a gem file
@ -82,15 +78,6 @@ done
%check
pushd .%{gem_instdir}
# The values of
# SELECT CAST('4714-11-24 23:58:59.1231-03 BC' AS TIMESTAMP WITHOUT TIME ZONE),
# CAST('294276-12-31 23:58:59.1231-03' AS TIMESTAMP WITHOUT TIME ZONE);
# with format: 1 are unexpected on i686 and arm7hl.
# https://bitbucket.org/ged/ruby-pg/issues/284
sed -i '/^\t\t\t\tit "should convert format #{format} timestamps/,/^\t\t\t\tend$/ s/^.*getvalue(0,[23]).*$/#\0/' \
spec/pg/basic_type_mapping_spec.rb
# Set --verbose to show detail log by $VERBOSE.
# See https://github.com/ged/ruby-pg/blob/master/spec/helpers.rb $VERBOSE
if ! ruby -S --verbose \
@ -125,6 +112,9 @@ popd
%{gem_instdir}/spec
%changelog
* Thu Jan 10 2019 Vít Ondruch <vondruch@redhat.com> - 1.1.4-1
- Update to pg 1.1.4.
* Wed Jan 09 2019 Vít Ondruch <vondruch@redhat.com> - 1.1.3-2
- Fix PostgreSQL 11 compatibility.

View File

@ -1 +1 @@
SHA512 (pg-1.1.3.gem) = 0a1089a3687085169ff3225f93ee0722e93f1d8b05e4034f29d602afd584580036a23d5d2743f77c4023e593ed573b72ca2bcba6400b0ecc428b4717590ad27f
SHA512 (pg-1.1.4.gem) = 442eadb4e9fe51aaef71cb5bbe8786c61dc4cfaa1241491270cb251f062abae88b6b2ef88dec7ab6ba2baa6390e954a2fcf4862cc95be4bc516e029c788fa1d9