Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/pg_cancel_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* The class to represent a connection to cancel a query.
*
* On PostgreSQL-17+ client libaray this class is used to implement PG::Connection#cancel .
* On PostgreSQL-17+ client library this class is used to implement PG::Connection#cancel .
* It works on older PostgreSQL server versions too.
*
* Available since PostgreSQL-17
Expand Down
4 changes: 2 additions & 2 deletions lib/pg/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def sync_cancel
# Returns +nil+ on success, or a string containing the
# error message if a failure occurs.
#
# On PostgreSQL-17+ client libaray the class PG::CancelConnection is used.
# On PostgreSQL-17+ client library the class PG::CancelConnection is used.
# On older client library a pure ruby implementation is used.
def cancel
cancon = PG::CancelConnection.new(self)
Expand Down Expand Up @@ -678,7 +678,7 @@ module Pollable
# - All hosts are passed to PG::Connection.connect_start
# - As soon as the host is tried to connect the related host is removed from the hosts list
# - When the polling status changes to `PG::PGRES_POLLING_OK` the connection is returned and ready to use.
# - When the polling status changes to `PG::PGRES_POLLING_FAILED` connecting is aborted and a PG::ConnectionBad is raised with details to all connection attepts.
# - When the polling status changes to `PG::PGRES_POLLING_FAILED` connecting is aborted and a PG::ConnectionBad is raised with details to all connection attempts.
# - When a timeout occurs, connecting is restarted with the remaining hosts.
#
# The downside is that this connects only once to hosts which are listed twice when they timeout.
Expand Down
2 changes: 1 addition & 1 deletion sample/async_mixed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$stdout.sync = true

# This is a example of how to mix and match synchronous and async APIs. In this case,
# the connection to the server is made syncrhonously, and then queries are
# the connection to the server is made synchronously, and then queries are
# asynchronous.

TIMEOUT = 5.0 # seconds to wait for an async operation to complete
Expand Down
2 changes: 1 addition & 1 deletion spec/pg/cancel_connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

if PG.library_version < 170000

context "query cancelation" do
context "query cancellation" do
it "shouldn't define PG::CancelConnection" do
expect( !defined?(PG::CancelConnection) )
end
Expand Down
4 changes: 2 additions & 2 deletions spec/pg/type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ def expect_deprecated_coder_init
end.to raise_error(ArgumentError, /premature/)
end
end
it 'raises error when binary array has additonal bytes' do
it 'raises error when binary array has additional bytes' do
expect do
binarydec_int_array.decode(bin_int_array_data + "\0")
end.to raise_error(ArgumentError, /trailing/)
Expand Down Expand Up @@ -1453,7 +1453,7 @@ def expect_deprecated_coder_init
to eq("\x00\x02\x00\x00\x00\x01x\x00\x00\x00\x02yz")
end

it "should'nt encode too big array" do
it "shouldn't encode too big array" do
expect{ encoder.encode(["x"]*32768) }.to raise_error(ArgumentError, /too many columns/)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/pg_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
cext_fname = $LOADED_FEATURES.grep(/pg_ext/).first
expect(cext_fname).not_to be_nil
cext_text = File.binread(cext_fname)
expect(cext_text).to match(/Init_pg_ext/) # C-ext shoud contain the init function
expect(cext_text).to match(/Init_pg_ext/) # C-ext should contain the init function
expect(cext_text).not_to match(/usr\/local/) # there should be no rpath to /usr/local/rake-compiler/ruby/x86_64-unknown-linux-musl/ruby-3.4.5/lib or so
expect(cext_text).not_to match(/home\//) # there should be no path to /home/ or so
end
Expand All @@ -89,7 +89,7 @@

path = File.join(PG::POSTGRESQL_LIB_PATH, libpq_fname)
text = File.binread(path)
expect(text).to match(/PQconnectdb/) # libpq shoud contain the connect function
expect(text).to match(/PQconnectdb/) # libpq should contain the connect function
expect(text).not_to match(/usr\/local/) # there should be no rpath to build dirs
expect(text).not_to match(/home\//) # there should be no path to /home/.../ports/ or so
end
Expand Down
Loading