Fix FTBFS with PostgreSQL 10.6 and above.
This commit is contained in:
parent
632d86ad35
commit
1fbc6a4665
|
@ -0,0 +1 @@
|
||||||
|
ef2bbde400a47744aea9b32948331d0ad318c3d2 pg-1.0.0.gem
|
|
@ -0,0 +1,32 @@
|
||||||
|
# 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
|
||||||
|
@@ -1099,8 +1099,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
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: A Ruby interface to the PostgreSQL RDBMS
|
Summary: A Ruby interface to the PostgreSQL RDBMS
|
||||||
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
|
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
|
||||||
#
|
#
|
||||||
|
@ -19,6 +19,9 @@ Patch0: rubygem-pg-0.17.1-remove-rpath.patch
|
||||||
# Add feature to set testing port.
|
# Add feature to set testing port.
|
||||||
# https://github.com/ged/ruby-pg/commit/104ec67
|
# https://github.com/ged/ruby-pg/commit/104ec67
|
||||||
Patch1: rubygem-pg-1.1.4-add-feature-to-set-testing-port.patch
|
Patch1: rubygem-pg-1.1.4-add-feature-to-set-testing-port.patch
|
||||||
|
# Fix compatibility with PG 10.6 and above.
|
||||||
|
# https://github.com/ged/ruby-pg/issues/287
|
||||||
|
Patch2: rubygem-pg-1.1.3-Fix-specs-for-PostgreSQL-11.patch
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: ruby(release)
|
||||||
BuildRequires: rubygems-devel
|
BuildRequires: rubygems-devel
|
||||||
BuildRequires: ruby-devel
|
BuildRequires: ruby-devel
|
||||||
|
@ -47,6 +50,7 @@ Documentation for %{name}.
|
||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Create the gem as gem install only works on a gem file
|
# Create the gem as gem install only works on a gem file
|
||||||
|
@ -121,6 +125,9 @@ popd
|
||||||
%{gem_instdir}/spec
|
%{gem_instdir}/spec
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 13 2023 Jarek Prokop <jprokop@redhat.com> - 1.0.0-3
|
||||||
|
- Fix FTBFS with PostgreSQL 10.6 and above.
|
||||||
|
|
||||||
* Thu May 23 2019 Jun Aruga <jaruga@redhat.com> - 1.0.0-2
|
* Thu May 23 2019 Jun Aruga <jaruga@redhat.com> - 1.0.0-2
|
||||||
- Assign a random testing port.
|
- Assign a random testing port.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue