Skip to content

Commit 55beb7d

Browse files
Fix typos (#5938)
* Fix typos in code comments * Fix typos in changelog * Fix typos in test descriptions * Fix typo in a test helper method name
1 parent 8d3c92f commit 55beb7d

Some content is hidden

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

46 files changed

+78
-78
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ functions:
3939
git submodule update --init --recursive
4040
4141
"create expansions":
42-
# Make an evergreen exapanstion file with dynamic values
42+
# Make an evergreen expansion file with dynamic values
4343
- command: shell.exec
4444
params:
4545
working_dir: "src"

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ For instructions on upgrading to newer versions, visit
105105

106106
* \#4005 Fixed inclusion of mongoid with Rails components that don't have the Rails environment.
107107

108-
* \#3993 Fixes issue where `dup`/`clone` fails for embedded documents that use store_as without using Mongoid::Atributes::Dynamic
108+
* \#3993 Fixes issue where `dup`/`clone` fails for embedded documents that use store_as without using Mongoid::Attributes::Dynamic
109109

110110
* \#3991 Fixed embedded documents not flagging as changed after calling #changed? and modifying the
111111
child elements.
@@ -798,7 +798,7 @@ child elements.
798798
Band.where(name: "Placebo").unset(:members, :origin)
799799

800800
* \#2669 Passing a block to `Criteria#new` now properly sends the
801-
block through to the model's contructor. (Arthur Neves)
801+
block through to the model's constructor. (Arthur Neves)
802802

803803
* \#2667 `exists?` no longer hits the database in cases where we have
804804
the necessary information in memory.
@@ -1200,7 +1200,7 @@ child elements.
12001200

12011201
* \#2571 Remove blank error message from locales. (Jordan Elver)
12021202

1203-
* \#2568 Fix uniqueness validation for lacalized fields when a scope is also
1203+
* \#2568 Fix uniqueness validation for localized fields when a scope is also
12041204
provided.
12051205

12061206
* \#2552 Ensure `InvalidPath` errors are raised when embedded documents try to
@@ -1609,7 +1609,7 @@ child elements.
16091609

16101610
Band.first.touch
16111611

1612-
Update a specific time field along with the udpated_at.
1612+
Update a specific time field along with the updated_at.
16131613

16141614
Band.first.touch(:founded)
16151615

@@ -1728,7 +1728,7 @@ child elements.
17281728
# { "name" => "foo", "my_preferences" => [{ "value" => "ok" }]}
17291729

17301730
* \#1806 `Model.find_or_create_by` and `Model.find_or_initialize_by` can now
1731-
take documents as paramters for belongs_to relations.
1731+
take documents as parameters for belongs_to relations.
17321732

17331733
person = Person.first
17341734
Game.find_or_create_by(person: person)
@@ -2506,7 +2506,7 @@ child elements.
25062506
* \#2038 Allow inverse relations to be determined by foreign keys alone
25072507
if defined on both sides, not just an inverse_of declaration.
25082508

2509-
* \#2023 Allow serilialization of dynamic types that conflict with core
2509+
* \#2023 Allow serialization of dynamic types that conflict with core
25102510
Ruby methods to still be serialized.
25112511

25122512
* \#2008 Presence validation should hit the db to check validity if the
@@ -2611,7 +2611,7 @@ child elements.
26112611
had the foreign key link persisted.
26122612

26132613
* \#1820 Destroying embedded documents in an embeds_many should also
2614-
removed the document from the underlying _uncoped target and reindex
2614+
removed the document from the underlying _unscoped target and reindex
26152615
the relation.
26162616

26172617
* \#1814 Don't cascade callbacks on after_initialize.
@@ -3059,7 +3059,7 @@ child elements.
30593059
key without error.
30603060

30613061
* \#1350, \#1351 Fixed errors in the string conversions of double quotes and
3062-
tilde when paramterizing keys.
3062+
tilde when parametrizing keys.
30633063

30643064
* \#1349 Mongoid documents should not blow up when including Enumerable.
30653065
(Jonas Nicklas)

lib/mongoid/association/embedded/embeds_many/proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def integrate(document)
484484
#
485485
# @return [ Criteria | Object ] A Criteria or return value from the target.
486486
#
487-
# TODO: make sure we are consistingly using respond_to_missing
487+
# TODO: make sure we are consistently using respond_to_missing
488488
# anywhere we define method_missing.
489489
# rubocop:disable Style/MissingRespondToMissing
490490
ruby2_keywords def method_missing(name, *args, &block)

lib/mongoid/association/referenced/has_many/enumerable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def first(limit = nil)
253253
# Initialize the new enumerable either with a criteria or an array.
254254
#
255255
# @example Initialize the enumerable with a criteria.
256-
# Enumberable.new(Post.where(:person_id => id))
256+
# Enumerable.new(Post.where(:person_id => id))
257257
#
258258
# @example Initialize the enumerable with an array.
259259
# Enumerable.new([ post ])

lib/mongoid/association/referenced/has_many/proxy.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def delete(document)
160160
# @example Delete all documents in the association.
161161
# person.posts.delete_all
162162
#
163-
# @example Conditonally delete all documents in the association.
163+
# @example Conditionally delete all documents in the association.
164164
# person.posts.delete_all({ :title => "Testing" })
165165
#
166166
# @param [ Hash ] conditions Optional conditions to delete with.
@@ -462,7 +462,7 @@ def cascade!(document)
462462
#
463463
# @return [ Criteria | Object ] A Criteria or return value from the target.
464464
#
465-
# TODO: make sure we are consistingly using respond_to_missing
465+
# TODO: make sure we are consistently using respond_to_missing
466466
# anywhere we define method_missing.
467467
# rubocop:disable Style/MissingRespondToMissing
468468
ruby2_keywords def method_missing(name, *args, &block)
@@ -512,7 +512,7 @@ def persistable?
512512
# @example Delete all documents in the association.
513513
# person.posts.delete_all
514514
#
515-
# @example Conditonally delete all documents in the association.
515+
# @example Conditionally delete all documents in the association.
516516
# person.posts.delete_all({ :title => "Testing" })
517517
#
518518
# @param [ Hash ] conditions Optional conditions to delete with.

lib/mongoid/atomic/modifiers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def add_operation(mods, field, value)
119119
end
120120

121121
# Adds or appends an array operation with the $each specifier used
122-
# in conjuction with $push.
122+
# in conjunction with $push.
123123
#
124124
# @example Add the operation.
125125
# modifications.add_operation(mods, field, value)

lib/mongoid/attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def read_attribute_before_type_cast(name)
137137
# @param [ String | Symbol ] name The name of the attribute to remove.
138138
#
139139
# @raise [ Errors::ReadonlyAttribute ] If the field cannot be removed due
140-
# to being flagged as reaodnly.
140+
# to being flagged as readonly.
141141
def remove_attribute(name)
142142
validate_writable_field_name!(name.to_s)
143143
as_writable_attribute!(name) do |access|

lib/mongoid/config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ module Config
166166
#
167167
# Setting this flag to true restores the pre-9.0 behavior, where callbacks
168168
# for embedded documents are called. This may lead to stack overflow errors
169-
# if there are more than cicrca 1000 embedded documents in the root
169+
# if there are more than circa 1000 embedded documents in the root
170170
# document's dependencies graph.
171171
# See https://jira.mongodb.org/browse/MONGOID-5658 for more details.
172172
option :around_callbacks_for_embeds, default: false

lib/mongoid/contextual/aggregable/memory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def min(field = nil)
9090
# @example Get the sum for the provided block.
9191
# aggregable.sum(&:likes)
9292
#
93-
# @param [ Symbol | Numeric ] field The field to sum, or the intial
93+
# @param [ Symbol | Numeric ] field The field to sum, or the initial
9494
# value of the sum when a block is given.
9595
#
9696
# @return [ Numeric ] The sum value.

lib/mongoid/contextual/mongo.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def count(options = {}, &block)
8585
# Get the estimated number of documents matching the query.
8686
#
8787
# Unlike count, estimated_count does not take a block because it is not
88-
# traditionally defined (with a block) on Enumarable like count is.
88+
# traditionally defined (with a block) on Enumerable like count is.
8989
#
9090
# @example Get the estimated number of matching documents.
9191
# context.estimated_count
@@ -1018,7 +1018,7 @@ def demongoize_hash(klass, hash)
10181018
next
10191019
end
10201020

1021-
# does the key represent an emebedded relation on the document?
1021+
# does the key represent an embedded relation on the document?
10221022
aliased_name = klass.aliased_associations[key] || key
10231023
if (assoc = klass.relations[aliased_name])
10241024
case value

0 commit comments

Comments
 (0)