Skip to content

RUBY-3160 fix all parse errors except bson-tutorials #2672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2022
Merged
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
4 changes: 2 additions & 2 deletions docs/contribute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Contribute Code
The MongoDB Ruby driver source is located
`at GitHub <https://github.com/mongodb/mongo-ruby-driver>`_.

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

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

The driver is tested on `Evergreen <https://github.com/evergreen-ci/evergreen>`_,
MongoDB's in-house continuous integration platform. After a pull request
Expand Down
45 changes: 27 additions & 18 deletions docs/reference/client-side-encryption.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ enterprise-only feature. If you only intend to use explicit encryption, you may
skip this step.

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

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

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

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

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

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

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

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

Below is an example of explicit queryable encryption.

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

.. _creating-a-master-key:

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

.. _local-master-key:

Local Master Key
~~~~~~~~~~~~~~~~

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

.. _remote-master-key:

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

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

.. _creating-a-data-key:

Creating a Data Key
===================

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

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

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

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

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

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

.. seealso::

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

.. _schema-map-path:
Expand Down Expand Up @@ -1068,6 +1075,8 @@ decryption of any previously-encrypted data.
}
)

.. _cse-extra-options:

``:extra_options``
~~~~~~~~~~~~~~~~~~

Expand Down
8 changes: 4 additions & 4 deletions docs/reference/connection-and-configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ options the driver provides, including authentication.
.. toctree::
:titlesonly:

create-client
authentication
monitoring
user-management
/reference/create-client
/reference/authentication
/reference/monitoring
/reference/user-management
11 changes: 6 additions & 5 deletions docs/reference/create-client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ URI options are explained in detail in the :manual:`Connection URI reference
</reference/connection-string/>`.

.. note::

Options that are set in **milliseconds** in the URI are
represented as a ``float`` in Ruby and the units are **seconds**.

Expand Down Expand Up @@ -1026,11 +1027,11 @@ URI options are explained in detail in the :manual:`Connection URI reference
invalid values (e.g. negative and non-numeric values), invalid values
provided via this URI option are ignored with a warning.

* - srvMaxHosts=Integer
- ``:srv_max_hosts => Integer``
* - srvMaxHosts=Integer
- ``:srv_max_hosts => Integer``

* - srvServiceName=String
- ``:srv_service_name => String``
* - srvServiceName=String
- ``:srv_service_name => String``

* - ssl=Boolean
- ``:ssl => true|false``
Expand Down Expand Up @@ -1341,7 +1342,7 @@ It is also possible to remove hooks from ``Mongo.tls_context_hooks`` by storing
a reference to the Procs somewhere else in the application, and then using
``Array#delete_if`` to remove the desired hooks.

..warning ::
.. warning::

TLS context hooks are global and will affect every instance of ``Mongo::Client``.
Any library that allows applications to enable these hooks should expose methods to
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/crud-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ for more information on working with these types of fields.
A Note about the BSON Symbol type
=================================

Because the BSON specification deprecated the BSON symbol type, the `bson` gem
Because the BSON specification deprecated the BSON symbol type, the ``bson`` gem
will serialize Ruby symbols into BSON strings when used on its own. However, in
order to maintain backwards compatibility with older datasets, the Ruby driver
overrides this behavior to serialize Ruby symbols as BSON symbols. This is
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/gridfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ by default into the ``fs.chunks`` collection and file metadata is inserted into

client.database.fs.insert_one(file)

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

.. code-block:: ruby
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/monitoring.txt
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ Server Heartbeats

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

All heartbeat events contain the address of the server that the heartbeat
was sent to. Succeeded and failed events contain the round trip time for
Expand Down Expand Up @@ -460,9 +460,9 @@ command monitoring mechanism:
- ``copydb``
2. If the command is a handshake command, either ``ismaster`` or ``hello``, on
a non-monitoring connection, no event is published at all.
3. Commands sent over monitoring connections (such as ismaster and hello) do
not publish command monitoring events. Instead, every time a server is
checked a server heartbeat event is published. The server heartbeat events
3. Commands sent over monitoring connections (such as ismaster and hello) do
not publish command monitoring events. Instead, every time a server is
checked a server heartbeat event is published. The server heartbeat events
do not include command or reply payloads.
4. If the command is a handshake command, and the ``speculativeAuthenticate``
options is ``true``, the command will be redacted, and an empty payload will
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/schema-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ including managing databases, collections, indexes and users.
.. toctree::
:titlesonly:

database-tasks
collection-tasks
indexing
collations
/reference/database-tasks
/reference/collection-tasks
/reference/indexing
/reference/collations
26 changes: 13 additions & 13 deletions docs/reference/working-with-data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ implements for inserting, updating and retrieving data from MongoDB.
.. toctree::
:titlesonly:

crud-operations
bulk-operations
projection
aggregation
map-reduce
text-search
geospatial-search
query-cache
gridfs
change-streams
sessions
transactions
client-side-encryption
/reference/crud-operations
/reference/bulk-operations
/reference/projection
/reference/aggregation
/reference/map-reduce
/reference/text-search
/reference/geospatial-search
/reference/query-cache
/reference/gridfs
/reference/change-streams
/reference/sessions
/reference/transactions
/reference/client-side-encryption
2 changes: 1 addition & 1 deletion docs/release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This release includes the following new features:
specify an arbitrary comment to help trace the operation through the
database profiler, currentOp and logs.
- The ``estimated_document_count`` method is now using the ``count`` server
command instead of `$collStats`` aggregation pipeline stage, to support
command instead of ``$collStats`` aggregation pipeline stage, to support
operation on views. Applications using the Stable API should upgrade to
server versions 5.0.8 (if using MongoDB 5.0) or 5.3.2 (if using MongoDB
5.1/5.2/5.3) or newer to use the ``count`` command when API strict is enabled,
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/common-errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ This error was last reported on Ruby Driver version 2.5.1, so updating the drive
can potentially solve this issue. A user has reported that they solved this issue
as follows:

.. blockquote::

DNS servers on EC2 are generated in /etc/resolv.conf by default. Following
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>`_
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>`_
and setting the nameservers to Google NS I was able to fix this issue.

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

See more on this issue here:
`RUBY-1281 <https://jira.mongodb.org/browse/RUBY-1684>`_.
`RUBY-1684 <https://jira.mongodb.org/browse/RUBY-1684>`_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch