Skip to content

Commit 58f7791

Browse files
authored
Spelling and grammar corrections (mongodb#3023)
* Fix various spelling and grammar issues * typo was masking a duplicate spec; fixing the typo exposed the bad spec
1 parent 1f8e139 commit 58f7791

File tree

91 files changed

+127
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+127
-133
lines changed

lib/mongo/auth/aws/credentials_retriever.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def credentials_from_environment
137137
#
138138
# @raise Auth::InvalidConfiguration if a source contains an invalid set
139139
# of credentials.
140-
# @ raise Error::TimeoutError if credentials cannot be retrieved within
140+
# @raise Error::TimeoutError if credentials cannot be retrieved within
141141
# the timeout defined on the operation context.
142142
def obtain_credentials_from_endpoints(timeout_holder = nil)
143143
if (credentials = web_identity_credentials(timeout_holder)) && credentials_valid?(credentials,
@@ -159,7 +159,7 @@ def obtain_credentials_from_endpoints(timeout_holder = nil)
159159
#
160160
# @return [ Auth::Aws::Credentials | nil ] A set of credentials, or nil
161161
# if retrieval failed.
162-
# @ raise Error::TimeoutError if credentials cannot be retrieved within
162+
# @raise Error::TimeoutError if credentials cannot be retrieved within
163163
# the timeout.
164164
def ec2_metadata_credentials(timeout_holder = nil)
165165
timeout_holder&.check_timeout!
@@ -207,7 +207,7 @@ def ec2_metadata_credentials(timeout_holder = nil)
207207
#
208208
# @return [ Auth::Aws::Credentials | nil ] A set of credentials, or nil
209209
# if retrieval failed.
210-
# @ raise Error::TimeoutError if credentials cannot be retrieved within
210+
# @raise Error::TimeoutError if credentials cannot be retrieved within
211211
# the timeout defined on the operation context.
212212
def ecs_metadata_credentials(timeout_holder = nil)
213213
timeout_holder&.check_timeout!
@@ -290,7 +290,7 @@ def prepare_web_identity_inputs
290290
# @return [ Net::HTTPResponse | nil ] AWS API response if successful,
291291
# otherwise nil.
292292
#
293-
# @ raise Error::TimeoutError if credentials cannot be retrieved within
293+
# @raise Error::TimeoutError if credentials cannot be retrieved within
294294
# the timeout defined on the operation context.
295295
def request_web_identity_credentials(token, role_arn, role_session_name, timeout_holder)
296296
timeout_holder&.check_timeout!
@@ -384,7 +384,7 @@ def credentials_valid?(credentials, source)
384384
#
385385
# @param [ CsotTimeoutHolder | nil ] timeout_holder CSOT timeout.
386386
#
387-
# @ raise Error::TimeoutError if deadline exceeded.
387+
# @raise Error::TimeoutError if deadline exceeded.
388388
def with_timeout(timeout_holder, &block)
389389
timeout = timeout_holder&.remaining_timeout_sec! || METADATA_TIMEOUT
390390
exception_class = (Error::TimeoutError if timeout_holder&.csot?)

lib/mongo/auth/gssapi/conversation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
module Mongo
1818
module Auth
1919
class Gssapi
20-
# Defines behaviour around a single Kerberos conversation between the
20+
# Defines behavior around a single Kerberos conversation between the
2121
# client and the server.
2222
#
2323
# @api private

lib/mongo/auth/scram_conversation_base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def initialize(user, connection, client_nonce: nil)
5252
#
5353
# @see https://jira.mongodb.org/browse/SECURITY-621
5454
#
55-
# @return [ true | fase ] Whether the server's signature was verified.
55+
# @return [ true | false ] Whether the server's signature was verified.
5656
def server_verified?
5757
!!@server_verified
5858
end

lib/mongo/background_thread.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def wait_for_stop
134134
rescue ::Timeout::Error
135135
end
136136

137-
# Some driver objects can be reconnected, for backwards compatibiilty
137+
# Some driver objects can be reconnected, for backwards compatibility
138138
# reasons. Clear the thread instance variable to support this cleanly.
139139
if @thread.alive?
140140
log_warn("Failed to stop the background thread in #{self} in #{(Utils.monotonic_time - start_time).to_i} seconds: #{@thread.inspect} (thread status: #{@thread.status})")

lib/mongo/bulk_write/transformable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module Transformable
8585
doc
8686
}
8787

88-
# Proc to transfor replace one ops.
88+
# Proc to transform replace one ops.
8989
#
9090
# @since 2.1.0
9191
REPLACE_ONE_TRANSFORM = lambda { |doc|

lib/mongo/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Client
4545
# the cluster is initialized it no longer uses this timeout.
4646
# Unfortunately server selector reads server selection timeout out of
4747
# the cluster, and this behavior is required by Cluster#next_primary
48-
# which takes no arguments. When next_primary is removed we can revsit
48+
# which takes no arguments. When next_primary is removed we can revisit
4949
# using the same cluster object with different server selection timeouts.
5050
].freeze
5151

@@ -612,7 +612,7 @@ def initialize(addresses_or_uri, options = nil)
612612
begin
613613
@cluster.close
614614
rescue StandardError => e
615-
log_warn("Eror closing cluster in client constructor's exception handler: #{e.class}: #{e}")
615+
log_warn("Error closing cluster in client constructor's exception handler: #{e.class}: #{e}")
616616
# Drop this exception so that the original exception is raised
617617
end
618618
raise

lib/mongo/cluster.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def initialize(seeds, monitoring, options = Options::Redacted.new)
142142
@server_selection_semaphore = Semaphore.new
143143
@topology = Topology.initial(self, monitoring, options)
144144
# State change lock is similar to the sdam flow lock, but is designed
145-
# to serialize state changes initated by consumers of Cluster
145+
# to serialize state changes initiated by consumers of Cluster
146146
# (e.g. application connecting or disconnecting the cluster), so that
147147
# e.g. an application calling disconnect-connect-disconnect rapidly
148148
# does not put the cluster into an inconsistent state.
@@ -829,13 +829,13 @@ def add(host, add_options = nil)
829829
return if addresses.include?(address)
830830

831831
opts = options.merge(monitor: false)
832-
# If we aren't starting the montoring threads, we also don't want to
832+
# If we aren't starting the monitoring threads, we also don't want to
833833
# start the pool's populator thread.
834834
opts.merge!(populator_io: false) unless options.fetch(:monitoring_io, true)
835835
# Note that in a load-balanced topology, every server must be a
836836
# load balancer (load_balancer: true is specified in the options)
837837
# but this option isn't set here because we are required by the
838-
# specifications to pretent the server started out as an unknown one
838+
# specifications to pretend the server started out as an unknown one
839839
# and publish server description change event into the load balancer
840840
# one. The actual correct description for this server will be set
841841
# by the fabricate_lb_sdam_events_and_set_server_type method.

lib/mongo/cluster/reapers/cursor_reaper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def unregister_cursor(id)
9595

9696
# Read and decode scheduled kill cursors operations.
9797
#
98-
# This method mutates instance variables without locking, so is is not
98+
# This method mutates instance variables without locking, so it is not
9999
# thread safe. Generally, it should not be called itself, this is a helper
100100
# for `kill_cursor` method.
101101
#

lib/mongo/cluster/sdam_flow.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def server_description_changed
167167
# is is imperative to NOT pass updated_desc's RS name to
168168
# topology constructor here.
169169
# During processing we may remove the server whose updated_desc
170-
# we are be processing (e.g. the RS name mismatch case again),
171-
# in which case topoogy type will go back to RS without primary
170+
# we are processing (e.g. the RS name mismatch case again),
171+
# in which case topology type will go back to RS without primary
172172
# in the check_if_has_primary step.
173173
@topology = Topology::ReplicaSetWithPrimary.new(
174174
# Do not pass updated_desc's RS name here

lib/mongo/cluster/topology/load_balanced.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def sharded?
8484

8585
# Returns whether this topology is Single.
8686
#
87-
# @return [ true ] Always false.
87+
# @return [ false ] Always false.
8888
def single?
8989
false
9090
end

0 commit comments

Comments
 (0)