Skip to content

Commit 5bcfbe9

Browse files
authored
RUBY-3160 fix all parse errors except bson-tutorials (#2672)
1 parent d5bf24d commit 5bcfbe9

11 files changed

+65
-53
lines changed

docs/contribute.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Contribute Code
5858
The MongoDB Ruby driver source is located
5959
`at GitHub <https://github.com/mongodb/mongo-ruby-driver>`_.
6060

61-
The list of known issues in the driver is available
61+
The list of known issues in the driver is available
6262
`in JIRA <https://jira.mongodb.org/browse/RUBY>`_.
6363

6464
We recommend creating a JIRA ticket before starting work on a bug fix or
@@ -73,7 +73,7 @@ the changes to the stable branches, if needed.
7373
A MongoDB deployment is required to run the tests. Setup procedures and
7474
recommendations for various deployments, as well as how to configure the
7575
driver's test suite for the deployments, are covered in the `spec
76-
readme <https://github.com/mongodb/mongo-ruby-driver/blob/master/spec/README.md>`.
76+
readme <https://github.com/mongodb/mongo-ruby-driver/blob/master/spec/README.md>`__.
7777

7878
The driver is tested on `Evergreen <https://github.com/evergreen-ci/evergreen>`_,
7979
MongoDB's in-house continuous integration platform. After a pull request

docs/reference/client-side-encryption.txt

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ enterprise-only feature. If you only intend to use explicit encryption, you may
128128
skip this step.
129129

130130
Mongocryptd comes pre-packaged with enterprise builds of the MongoDB server
131-
(versions 4.2 and newer). For installation instructions, see
132-
`the MongoDB manual <https://mongodb.com/docs/manual/reference/security-client-side-encryption-appendix/#installation>`_.
131+
(versions 4.2 and newer). For installation instructions, see the
132+
`MongoDB manual <https://mongodb.com/docs/manual/reference/security-client-side-encryption-appendix/#installation>`_.
133133

134134
In order to configure mongocryptd (for example, which port it listens on or the
135135
path used to spawn the daemon), it is necessary to pass different options to the
136-
``Mongo::Client`` performing automatic encryption. See the `:extra_options`_
136+
``Mongo::Client`` performing automatic encryption. See the :ref:`:extra_options <cse-extra-options>`
137137
section of this tutorial for more information.
138138

139139
Automatic Encryption
@@ -274,8 +274,8 @@ The example above demonstrates using automatic encryption with a local master ke
274274
For more information about using other key management services to create a
275275
master key and create data keys, see the following sections of this tutorial:
276276

277-
- `Creating A Master Key`_
278-
- `Creating A Data Key`_
277+
- :ref:`Creating A Master Key <creating-a-master-key>`
278+
- :ref:`Creating A Data Key <creating-a-data-key>`
279279

280280
Explicit Encryption
281281
===================
@@ -372,8 +372,8 @@ The example above demonstrates using explicit encryption with a local master key
372372
For more information about using other key management services to create a
373373
master key and create data keys, see the following sections of this tutorial:
374374

375-
- `Creating A Master Key`_,
376-
- `Creating A Data Key`_,
375+
- :ref:`Creating A Master Key <creating-a-master-key>`
376+
- :ref:`Creating A Data Key <creating-a-data-key>`
377377

378378
Queryable Encryption
379379
====================
@@ -485,8 +485,8 @@ The example above demonstrates using automatic encryption with a local master ke
485485
For more information about using other key management services to create a
486486
master key and create data keys, see the following sections of this tutorial:
487487

488-
- `Creating A Master Key`_
489-
- `Creating A Data Key`_
488+
- :ref:`Creating A Master Key <creating-a-master-key>`
489+
- :ref:`Creating A Data Key <creating-a-data-key>`
490490

491491
Below is an example of explicit queryable encryption.
492492

@@ -598,6 +598,7 @@ Below is an example of explicit queryable encryption.
598598
find_result = client['encryption_coll'].find(encrypted_field: find_payload).first['encrypted_field']
599599
# => 'sensitive data'
600600

601+
.. _creating-a-master-key:
601602

602603
Creating a Master Key
603604
=====================
@@ -608,6 +609,8 @@ local key, or by creating a key in a key management service. Currently
608609
Ruby driver supports AWS Key Management Service (KMS), Azure Key Vault, and
609610
Google Cloud Key Management (GCP KMS).
610611

612+
.. _local-master-key:
613+
611614
Local Master Key
612615
~~~~~~~~~~~~~~~~
613616

@@ -626,17 +629,21 @@ Run the following code to generate a local master key using Ruby:
626629
local_master_key = SecureRandom.random_bytes(96)
627630
# => "\xB2\xBE\x8EN\xD4\x14\xC2\x13\xC3..." (a binary blob)
628631

632+
.. _remote-master-key:
633+
629634
Remote Master Key
630635
~~~~~~~~~~~~~~~~~
631636
It is recommended that you use a remote Key Management Service to create and
632637
store your master key. To do so, follow steps of the
633-
:drivers:`"Set up a Remote Master Key" section</security/client-side-field-level-encryption-local-key-to-kms/#set-up-a-remote-master-key>`
638+
`"Set up a Remote Master Key" <https://www.mongodb.com/docs/manual/core/csfle/tutorials/#set-up-a-remote-master-key>`_
634639
in the MongoDB Client-Side Encryption documentation.
635640

636641
For more information about creating a master key, see the
637-
:drivers:`Create a Master Key </security/client-side-field-level-encryption-guide/#a.-create-a-master-key>`
642+
`Create a Master Key <https://www.mongodb.com/docs/manual/core/csfle/#a.-create-a-master-key>`_
638643
section of the MongoDB manual.
639644

645+
.. _creating-a-data-key:
646+
640647
Creating a Data Key
641648
===================
642649

@@ -679,8 +686,8 @@ key with the following code snippet:
679686
data_key_id = client_encryption.create_data_key('local')
680687
# => <BSON::Binary... type=ciphertext...>
681688

682-
See the `Local Master Key`_ section for more information about generating a new
683-
local master key.
689+
See the :ref:`Local Master Key <local-master-key>` section for more information
690+
about generating a new local master key.
684691

685692
Create a Data Key Using a Remote Master Key
686693
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -788,12 +795,12 @@ certificate and private key to authenticate to KMIP server.
788795
)
789796
# => <BSON::Binary... type=ciphertext...>
790797

791-
See the `Remote Master Key`_ section of this tutorial for more information about
792-
generating a new remote master key and finding the information you need to
793-
create data keys.
798+
See the :ref:`Remote Master Key <remote-master-key>` section of this tutorial
799+
for more information about generating a new remote master key and finding the
800+
information you need to create data keys.
794801

795802
For more information about creating a data key, see the
796-
:drivers:`Create a Data Encryption Key </security/client-side-field-level-encryption-guide/#b.-create-a-data-encryption-key>`
803+
`Create a Data Encryption Key <https://www.mongodb.com/docs/manual/core/csfle/#b.-create-a-data-encryption-key>`_
797804
section of the MongoDB manual.
798805

799806
For a list of possible KMS TLS options
@@ -1030,7 +1037,7 @@ When you intend to use your schema map, convert it to a Ruby ``Hash`` using the
10301037

10311038
.. seealso::
10321039

1033-
:drivers:`Specify Encrypted Fields Using JSON Schema</security/client-side-field-level-encryption-guide/#c-specify-encrypted-fields-using-json-schema>`,
1040+
`Specify Encrypted Fields Using JSON Schema <https://www.mongodb.com/docs/manual/core/csfle/#c-specify-encrypted-fields-using-json-schema>`_,
10341041
:manual:`Automatic Encryption Rules</reference/security-client-side-automatic-json-schema/>`
10351042

10361043
.. _schema-map-path:
@@ -1068,6 +1075,8 @@ decryption of any previously-encrypted data.
10681075
}
10691076
)
10701077

1078+
.. _cse-extra-options:
1079+
10711080
``:extra_options``
10721081
~~~~~~~~~~~~~~~~~~
10731082

docs/reference/connection-and-configuration.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ options the driver provides, including authentication.
1212
.. toctree::
1313
:titlesonly:
1414

15-
create-client
16-
authentication
17-
monitoring
18-
user-management
15+
/reference/create-client
16+
/reference/authentication
17+
/reference/monitoring
18+
/reference/user-management

docs/reference/create-client.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ URI options are explained in detail in the :manual:`Connection URI reference
896896
</reference/connection-string/>`.
897897

898898
.. note::
899+
899900
Options that are set in **milliseconds** in the URI are
900901
represented as a ``float`` in Ruby and the units are **seconds**.
901902

@@ -1341,7 +1342,7 @@ It is also possible to remove hooks from ``Mongo.tls_context_hooks`` by storing
13411342
a reference to the Procs somewhere else in the application, and then using
13421343
``Array#delete_if`` to remove the desired hooks.
13431344

1344-
..warning ::
1345+
.. warning::
13451346

13461347
TLS context hooks are global and will affect every instance of ``Mongo::Client``.
13471348
Any library that allows applications to enable these hooks should expose methods to

docs/reference/crud-operations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ for more information on working with these types of fields.
988988
A Note about the BSON Symbol type
989989
=================================
990990

991-
Because the BSON specification deprecated the BSON symbol type, the `bson` gem
991+
Because the BSON specification deprecated the BSON symbol type, the ``bson`` gem
992992
will serialize Ruby symbols into BSON strings when used on its own. However, in
993993
order to maintain backwards compatibility with older datasets, the Ruby driver
994994
overrides this behavior to serialize Ruby symbols as BSON symbols. This is

docs/reference/gridfs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ by default into the ``fs.chunks`` collection and file metadata is inserted into
252252

253253
client.database.fs.insert_one(file)
254254

255-
To insert into collections with a name prefix other than `fs`, access the
255+
To insert into collections with a name prefix other than ``fs``, access the
256256
filesystem with a ``:fs_name`` option.
257257

258258
.. code-block:: ruby

docs/reference/monitoring.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ Server Heartbeats
290290

291291
The application can be notified of each server heartbeat by subscribing
292292
to SERVER_HEARTBEAT topic. A server heartbeat listener must implement
293-
three methods: `started`, `succeeded` and `failed`. Each heartbeat invokes
294-
the `started` method on the listener, and then either `succeeded` or `failed`
295-
method depending on the outcome of the heartbeat.
293+
three methods: ``started``, ``succeeded`` and ``failed``. Each heartbeat
294+
invokes the ``started`` method on the listener, and then either ``succeeded``
295+
or ``failed`` method depending on the outcome of the heartbeat.
296296

297297
All heartbeat events contain the address of the server that the heartbeat
298298
was sent to. Succeeded and failed events contain the round trip time for
@@ -460,9 +460,9 @@ command monitoring mechanism:
460460
- ``copydb``
461461
2. If the command is a handshake command, either ``ismaster`` or ``hello``, on
462462
a non-monitoring connection, no event is published at all.
463-
3. Commands sent over monitoring connections (such as ismaster and hello) do
464-
not publish command monitoring events. Instead, every time a server is
465-
checked a server heartbeat event is published. The server heartbeat events
463+
3. Commands sent over monitoring connections (such as ismaster and hello) do
464+
not publish command monitoring events. Instead, every time a server is
465+
checked a server heartbeat event is published. The server heartbeat events
466466
do not include command or reply payloads.
467467
4. If the command is a handshake command, and the ``speculativeAuthenticate``
468468
options is ``true``, the command will be redacted, and an empty payload will

docs/reference/schema-operations.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ including managing databases, collections, indexes and users.
1212
.. toctree::
1313
:titlesonly:
1414

15-
database-tasks
16-
collection-tasks
17-
indexing
18-
collations
15+
/reference/database-tasks
16+
/reference/collection-tasks
17+
/reference/indexing
18+
/reference/collations

docs/reference/working-with-data.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ implements for inserting, updating and retrieving data from MongoDB.
1212
.. toctree::
1313
:titlesonly:
1414

15-
crud-operations
16-
bulk-operations
17-
projection
18-
aggregation
19-
map-reduce
20-
text-search
21-
geospatial-search
22-
query-cache
23-
gridfs
24-
change-streams
25-
sessions
26-
transactions
27-
client-side-encryption
15+
/reference/crud-operations
16+
/reference/bulk-operations
17+
/reference/projection
18+
/reference/aggregation
19+
/reference/map-reduce
20+
/reference/text-search
21+
/reference/geospatial-search
22+
/reference/query-cache
23+
/reference/gridfs
24+
/reference/change-streams
25+
/reference/sessions
26+
/reference/transactions
27+
/reference/client-side-encryption

docs/release-notes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This release includes the following new features:
6464
specify an arbitrary comment to help trace the operation through the
6565
database profiler, currentOp and logs.
6666
- The ``estimated_document_count`` method is now using the ``count`` server
67-
command instead of `$collStats`` aggregation pipeline stage, to support
67+
command instead of ``$collStats`` aggregation pipeline stage, to support
6868
operation on views. Applications using the Stable API should upgrade to
6969
server versions 5.0.8 (if using MongoDB 5.0) or 5.3.2 (if using MongoDB
7070
5.1/5.2/5.3) or newer to use the ``count`` command when API strict is enabled,

docs/tutorials/common-errors.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ This error was last reported on Ruby Driver version 2.5.1, so updating the drive
9191
can potentially solve this issue. A user has reported that they solved this issue
9292
as follows:
9393

94+
.. blockquote::
95+
9496
DNS servers on EC2 are generated in /etc/resolv.conf by default. Following
95-
the answer `here <https://askubuntu.com/questions/157154/how-do-i-include-lines-in-resolv-conf-that-wont-get-lost-on-reboot?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa>`_
97+
the `answer <https://askubuntu.com/questions/157154/how-do-i-include-lines-in-resolv-conf-that-wont-get-lost-on-reboot?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa>`_
9698
and setting the nameservers to Google NS I was able to fix this issue.
9799

98100
You can find more information about this issue here:
@@ -116,5 +118,5 @@ authorization mechanism using the ``auth_mech`` option in your ``mongoid.yml``
116118
file.
117119

118120
See more on this issue here:
119-
`RUBY-1281 <https://jira.mongodb.org/browse/RUBY-1684>`_.
121+
`RUBY-1684 <https://jira.mongodb.org/browse/RUBY-1684>`_.
120122

0 commit comments

Comments
 (0)