Skip to content

Commit 7355473

Browse files
committed
clean up client tutorial file
1 parent ffc3704 commit 7355473

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

docs/tutorials/ruby-driver-create-client.txt

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ Since the URI options are required in camel case, which is not the Ruby standard
7676
following table shows the option in the URI and its corresponding option if passed
7777
to the constructor in Ruby.
7878

79-
.. note::
80-
79+
.. note::
80+
8181
The options passed directly should be symbols.
8282

8383
The options are explained in detail in the :manual:`Connection URI reference
84-
</reference/connection-string/>`.
84+
</reference/connection-string/>`.
8585

8686
.. note::
8787
Options that are set in **milliseconds** in the URI are
@@ -97,8 +97,20 @@ URI Options Conversions
9797
* - URI Option
9898
- Ruby Option
9999

100-
* - replicaSet=String
101-
- ``:replica_set => String``
100+
* - appName=String
101+
- ``:app_name => String``
102+
103+
* - authMechanism=String
104+
- ``:auth_mech => Symbol``
105+
106+
* - authMechanismProperties=Strings
107+
- ``{ :auth_mech_properties => { :service_realm => String, :canonicalize_host_name => true|false, :service_name => String } }``
108+
109+
* - authSource=String
110+
- ``:auth_source => String``
111+
112+
* - compressors=Strings
113+
- ``:compressors => Array<String>``
102114

103115
* - connect=String
104116
- ``:connect => Symbol``
@@ -109,11 +121,11 @@ URI Options Conversions
109121
* - connectTimeoutMS=Integer
110122
- ``:connect_timeout => Float``
111123

112-
* - socketTimeoutMS=Integer
113-
- ``:socket_timeout => Float``
124+
* - fsync=Boolean
125+
- ``{ :write => { :fsync => true|false }}``
114126

115-
* - serverSelectionTimeoutMS=Integer
116-
- ``:server_selection_timeout => Float``
127+
* - journal=Boolean
128+
- ``{ :write => { :j => true|false }}``
117129

118130
* - localThresholdMS=Integer
119131
- ``:local_threshold => Float``
@@ -124,41 +136,29 @@ URI Options Conversions
124136
* - minPoolSize=Integer
125137
- ``:min_pool_size => Integer``
126138

127-
* - waitQueueTimeoutMS=Integer
128-
- ``:wait_queue_timeout => Float``
129-
130-
* - w=Integer|String
131-
- ``{ :write => { :w => Integer|String }}``
132-
133-
* - wtimeoutMS=Integer
134-
- ``{ :write => { :wtimeout => Float }}``
135-
136-
* - journal=Boolean
137-
- ``{ :write => { :j => true|false }}``
138-
139-
* - fsync=Boolean
140-
- ``{ :write => { :fsync => true|false }}``
141-
142139
* - readPreference=String
143140
- ``{ :read => { :mode => Symbol }}``
144141

145142
* - readPreferenceTags=Strings
146143
- ``{ :read => { :tag_sets => Array<String> }}``
147144

148-
* - authSource=String
149-
- ``:auth_source => String``
145+
* - replicaSet=String
146+
- ``:replica_set => String``
150147

151-
* - authMechanism=String
152-
- ``:auth_mech => Symbol``
148+
* - serverSelectionTimeoutMS=Integer
149+
- ``:server_selection_timeout => Float``
153150

154-
* - authMechanismProperties=Strings
155-
- ``{ :auth_mech_properties => { :service_realm => String, :canonicalize_host_name => true|false, :service_name => String } }``
151+
* - socketTimeoutMS=Integer
152+
- ``:socket_timeout => Float``
156153

157-
* - appName=String
158-
- ``:app_name => String``
154+
* - w=Integer|String
155+
- ``{ :write => { :w => Integer|String }}``
159156

160-
* - compressors=Strings
161-
- ``:compressors => Array<String>``
157+
* - waitQueueTimeoutMS=Integer
158+
- ``:wait_queue_timeout => Float``
159+
160+
* - wtimeoutMS=Integer
161+
- ``{ :write => { :wtimeout => Float }}``
162162

163163
* - zlibCompressionLevel=Integer
164164
- ``:zlib_compression_level => Integer``
@@ -178,12 +178,12 @@ Ruby Options
178178

179179
* - ``:replica_set``
180180
- When connecting to a replica set, this is the name of the set to
181-
filter servers by.
181+
filter servers by.
182182
- ``String``
183183
- none
184184

185185
* - ``:ssl``
186-
- Tell the client to connect to the servers via SSL.
186+
- Tell the client to connect to the servers via SSL.
187187
- ``Boolean``
188188
- false
189189

@@ -255,30 +255,30 @@ Ruby Options
255255

256256
* - ``:connect_timeout``
257257
- The number of seconds to wait to establish a socket connection
258-
before raising an exception.
258+
before raising an exception.
259259
- ``Float``
260260
- 10 seconds
261261

262262
* - ``:socket_timeout``
263263
- The number of seconds to wait for an operation to execute on a
264-
socket before raising an exception.
264+
socket before raising an exception.
265265
- ``Float``
266266
- 5 seconds
267267

268268
* - ``:max_pool_size``
269-
- The maximum size of the connection pool for each server.
269+
- The maximum size of the connection pool for each server.
270270
- ``Integer``
271271
- 5
272272

273273
* - ``:min_pool_size``
274274
- The minimum number of connections in the connection pool for each
275-
server.
275+
server.
276276
- ``Integer``
277277
- 1
278278

279279
* - ``:wait_queue_timeout``
280280
- The number of seconds to wait for a connection in the connection
281-
pool to become available.
281+
pool to become available.
282282
- ``Float``
283283
- 1
284284

@@ -291,22 +291,22 @@ Ruby Options
291291
{ :write => { :w => 2 } }
292292
- ``Hash``
293293
- ``{ :w => 1 }``
294-
294+
295295
* - ``:read``
296296
- Specifies the read preference mode and tag sets for selecting servers as a ``Hash``.
297297
Keys in the hash are ``:mode`` and ``:tag_sets``.
298298

299299
.. code-block:: ruby
300300

301-
{ :read =>
302-
{ :mode => :secondary,
303-
:tag_sets => [ "berlin" ]
304-
}
301+
{ :read =>
302+
{ :mode => :secondary,
303+
:tag_sets => [ "berlin" ]
304+
}
305305
}
306306

307307
- ``Hash``
308308
- ``{ :mode => :primary }``
309-
309+
310310
* - ``:auth_source``
311311
- Specifies the authentication source.
312312
- ``String``
@@ -316,7 +316,7 @@ Ruby Options
316316

317317
* - ``:auth_mech``
318318
- Specifies the authenticaion mechanism to use. Can be one of:
319-
``:mongodb_cr``, ``:mongodb_x509``, ``:plain``, ``:scram``.
319+
``:mongodb_cr``, ``:mongodb_x509``, ``:plain``, ``:scram``.
320320
- ``Symbol``
321321
- MongoDB 3.0 and later: ``:scram`` if user credentials
322322
are supplied but an ``:auth_mech`` is not. 2.6 and earlier:
@@ -343,7 +343,7 @@ Ruby Options
343343
``:replica_set`` or ``:sharded``.
344344
- ``Symbol``
345345
- none
346-
346+
347347
* - ``:heartbeat_frequency``
348348
- The number of seconds for the server monitors to refresh
349349
server states asynchronously.
@@ -437,9 +437,9 @@ Details on Timeout Options
437437

438438
``connect_timeout``
439439
On initialization of a connection to a server, this setting is the
440-
number of seconds to wait to connect before raising an exception.
440+
number of seconds to wait to connect before raising an exception.
441441
This timeout is also used when monitor threads ping their servers.
442-
The default is 10 seconds. See the `socket timeout for monitoring
442+
The default is 10 seconds. See the `socket timeout for monitoring
443443
specification <https://github.com/mongodb/specifications/blob/
444444
master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#socket-timeout-for-monitoring
445445
-is-connecttimeoutms>`_ for further explanation.
@@ -457,7 +457,7 @@ Details on Timeout Options
457457
The number of seconds to wait for the driver to find an appropriate server to
458458
which an operation can be sent before raising an exception. Defaults to 30.
459459
It should take the speed of :manual:`elections</core/replica-set-elections/>`
460-
during a failover into account. See the
460+
during a failover into account. See the
461461
`serverSelectionTimeoutMS specification
462462
<https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#serverselectiontimeoutms>`_
463463
for further information.
@@ -466,10 +466,10 @@ Details on Timeout Options
466466
The maximum latency in seconds between the nearest server and the servers that can be considered available to send an
467467
operation to. Defaults to 0.015.
468468

469-
.. note::
469+
.. note::
470470
This is not the latency window between the driver and a server, but
471471
rather the latency between the nearest server and other servers. See
472-
`the localThresholdMS specification
472+
`the localThresholdMS specification
473473
<https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#localthresholdms>`_.
474474

475475
``wait_queue_timeout``
@@ -483,7 +483,7 @@ Details on Timeout Options
483483

484484
``min_pool_size``
485485
Minimum number of connections in the connection pool for each server.
486-
Increase this number to create connections when the pool is
486+
Increase this number to create connections when the pool is
487487
initialized and to reduce the overhead of creating new connections
488488
later on. Defaults to 1.
489489

@@ -669,7 +669,7 @@ You can either use the default global driver logger or set your own. To set your
669669
Mongo::Logger.logger = other_logger
670670

671671
See the `Ruby Logger documentation <http://ruby-doc.org/stdlib-2.2.0/libdoc/logger/rdoc/Logger.html>`_
672-
for more information on the default logger API and available levels.
672+
for more information on the default logger API and available levels.
673673

674674
Changing the Logger Level
675675
`````````````````````````

0 commit comments

Comments
 (0)