Skip to content

Commit fb8a679

Browse files
authored
Merge pull request #70 from i80and/DOP-4905-v2.19
DOP-4905: Inline docs for v2.19
2 parents fcaaa66 + 1360090 commit fb8a679

Some content is hidden

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

50 files changed

+11403
-10
lines changed

.gitmodules

Lines changed: 0 additions & 8 deletions
This file was deleted.

bson-ruby

Lines changed: 0 additions & 1 deletion
This file was deleted.

mongo-ruby-driver

Lines changed: 0 additions & 1 deletion
This file was deleted.

source/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build

source/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

source/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Ruby MongoDB Driver Documentation
2+
=================================
3+
4+
This subdirectory contains the high-level driver documentation, including
5+
tutorials and the reference.
6+
7+
Building the documentation for publishing is done via the
8+
[docs-ruby repo](https://github.com/mongodb/docs-ruby).
9+
10+
To build the documentation locally for review, install `sphinx` and
11+
`sphinx-book-theme`, then execute `make html` in this directory:
12+
13+
pip install sphinx sphinx-book-theme
14+
make html
15+
16+
Note that the documentation generated in this manner wouldn't have the
17+
BSON documentation included, nor are intersphinx links currently handled.

source/conf.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'Ruby MongoDB Driver'
21+
copyright = '2021, MongoDB'
22+
23+
24+
# -- General configuration ---------------------------------------------------
25+
26+
# Add any Sphinx extension module names here, as strings. They can be
27+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
28+
# ones.
29+
extensions = [
30+
]
31+
32+
# Add any paths that contain templates here, relative to this directory.
33+
templates_path = ['_templates']
34+
35+
# List of patterns, relative to source directory, that match files and
36+
# directories to ignore when looking for source files.
37+
# This pattern also affects html_static_path and html_extra_path.
38+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
39+
40+
41+
# -- Options for HTML output -------------------------------------------------
42+
43+
# The theme to use for HTML and HTML Help pages. See the documentation for
44+
# a list of builtin themes.
45+
#
46+
html_theme = 'alabaster'
47+
48+
# Add any paths that contain custom static files (such as style sheets) here,
49+
# relative to this directory. They are copied after the builtin static files,
50+
# so a file named "default.css" will overwrite the builtin "default.css".
51+
html_static_path = ['_static']
52+
53+
source_suffix = {
54+
'.txt': 'restructuredtext',
55+
}
56+
57+
html_theme = 'sphinx_book_theme'

source/contribute.txt

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
************************
2+
Contribute to the Driver
3+
************************
4+
5+
.. default-domain:: mongodb
6+
7+
Report Bugs and Request Ruby Driver-Specific Features
8+
=====================================================
9+
10+
To report a bug in the driver or request a feature specific to the Ruby driver:
11+
12+
1. Visit `our issue tracker <https://jira.mongodb.org/>`_ and login
13+
(or create an account if you do not have one already).
14+
2. Navigate to the `RUBY project <https://jira.mongodb.org/browse/RUBY>`_.
15+
3. Click :guilabel:`Create Issue` and fill out all of the applicable form
16+
fields.
17+
18+
When creating an issue, please keep in mind that all information in JIRA
19+
for the RUBY project, as well as the core server (the SERVER project),
20+
is publicly visible.
21+
22+
**PLEASE DO:**
23+
24+
- Provide as much information as possible about the issue.
25+
- Provide detailed steps for reproducing the issue.
26+
- Provide any applicable code snippets, stack traces and log data.
27+
Do not include any sensitive data or server logs.
28+
- Specify version numbers of the driver and MongoDB server.
29+
30+
**PLEASE DO NOT:**
31+
32+
- Provide any sensitive data or server logs.
33+
- Report potential security issues publicly (see 'Security Issues' below).
34+
35+
.. note::
36+
37+
Bug reports in JIRA for the Ruby driver and the core server (the **SERVER**)
38+
projects are public.
39+
40+
If you identified a potential security vulnerability in the Ruby driver or
41+
any other MongoDB product, please report it according to the instructions found
42+
in the :manual:`Create a Vulnerability Report
43+
</tutorial/create-a-vulnerability-report>`.
44+
45+
46+
Request Product Features
47+
========================
48+
49+
To request a feature which is not specific to the Ruby driver, or which
50+
affects more than the driver alone (for example, a feature which requires
51+
MongoDB server support), please submit your idea through the
52+
`MongoDB Feedback Forum <https://feedback.mongodb.com/forums/924286-drivers>`_.
53+
54+
55+
Contribute Code
56+
===============
57+
58+
The MongoDB Ruby driver source is located
59+
`at GitHub <https://github.com/mongodb/mongo-ruby-driver>`_.
60+
61+
The list of known issues in the driver is available
62+
`in JIRA <https://jira.mongodb.org/browse/RUBY>`_.
63+
64+
We recommend creating a JIRA ticket before starting work on a bug fix or
65+
an improvement to the driver, to obtain feedback from the Ruby driver team
66+
as to the proposed changes. A JIRA ticket is not required to submit
67+
a pull request but it is appreciated, especially for non-trivial changes.
68+
69+
Pull requests should be made against the ``master`` branch and
70+
include relevant tests, if applicable. The Ruby driver team will backport
71+
the changes to the stable branches, if needed.
72+
73+
A MongoDB deployment is required to run the tests. Setup procedures and
74+
recommendations for various deployments, as well as how to configure the
75+
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>`__.
77+
78+
The driver is tested on `Evergreen <https://github.com/evergreen-ci/evergreen>`_,
79+
MongoDB's in-house continuous integration platform. After a pull request
80+
is created, one of the Ruby driver team engineers will schedule an Evergreen
81+
build.

source/getting-started.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _getting-started:
2+
3+
***************
4+
Getting Started
5+
***************
6+
7+
.. default-domain:: mongodb
8+
9+
This section describes how to install the driver, installation prerequisites
10+
and compatibility considerations.
11+
12+
.. toctree::
13+
:titlesonly:
14+
15+
installation
16+
reference/driver-compatibility
17+
support

source/includes/unicode-checkmark.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. |checkmark| unicode:: U+2713

source/includes/unicode-nbsp.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.. |nbsp| unicode:: 0xA0
2+
:trim:

source/index.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. http://www.mongodb.org/display/DOCS/Ruby+Language+Center
2+
3+
.. _ruby-language-center:
4+
5+
*******************
6+
Ruby MongoDB Driver
7+
*******************
8+
9+
.. default-domain:: mongodb
10+
11+
Welcome to the documentation site for the official MongoDB Ruby driver.
12+
You can add the driver to your application to work with MongoDB in
13+
Ruby.
14+
15+
Get Started
16+
===========
17+
18+
To get started with the Ruby driver, see :doc:`/installation` and
19+
:doc:`/tutorials/quick-start`. Continue to :doc:`/tutorials`
20+
for high level documentation for common operations.
21+
22+
BSON
23+
====
24+
25+
The Ruby BSON implementation is packaged in a separate gem with C and
26+
Java extensions for speed depending on the runtime environment.
27+
28+
For reference on the Ruby BSON gem, see the :doc:`/tutorials/bson`.
29+
30+
Object Mappers
31+
==============
32+
33+
Because MongoDB is so easy to use, the basic Ruby driver can be the
34+
best solution for many applications. But if you need validations,
35+
associations, and other high-level data modeling functions, then you
36+
may need Object Document Mapper.
37+
38+
In the context of a Rails application, an Object Document Mapper
39+
provides functionality equivalent to, but distinct from, ActiveRecord.
40+
Because MongoDB is a document-based database, these mappers are called
41+
Object Document Mappers (ODM) as opposed to Object Relational Mappers
42+
(ORM).
43+
44+
The ODM officially supported by MongoDB is Mongoid, originally written
45+
by Durran Jordan.
46+
47+
For tutorials on Mongoid, see the `Mongoid Manual <https://mongodb.com/docs/mongoid/master>`_.
48+
49+
.. COMMENT For the actual build, see mongodb/docs-ruby repo which pulls the documentation source from:
50+
.. mongo-ruby-driver,
51+
.. bson-ruby, and
52+
.. mongoid repos.
53+
54+
.. class:: hidden
55+
56+
.. toctree::
57+
:titlesonly:
58+
59+
getting-started
60+
tutorials
61+
reference/connection-and-configuration
62+
reference/working-with-data
63+
reference/schema-operations
64+
API <https://mongodb.com/docs/ruby-driver/current/api/>
65+
release-notes
66+
reference/additional-resources
67+
contribute

source/installation.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
************
2+
Installation
3+
************
4+
5+
.. default-domain:: mongodb
6+
7+
The Ruby driver is released as a gem hosted on `Rubygems
8+
<https://rubygems.org/gems/mongo>`_.
9+
10+
11+
Prerequisites
12+
=============
13+
14+
Please see the :ref:`compatibility <compatibility>` page for the list of
15+
Ruby versions and MongoDB server versions that this release of the Ruby
16+
driver is compatible with.
17+
18+
The driver itself is written entirely in Ruby, however it depends on the
19+
`bson library <https://rubygems.org/gems/bson>`_ which includes a C extension
20+
for MRI and a compiled Java extension for JRuby. A working C compiler and Ruby
21+
development headers and libraries are required when installing on MRI.
22+
When installing on JRuby, JRE is sufficient because the ``bson`` gem includes
23+
the compiled extension.
24+
25+
Connecting to TLS-enabled MongoDB servers, using SCRAM authentication
26+
(both SCRAM-SHA-1 and SCRAM-SHA-256) and using X.509 authentication (which
27+
is performed over a TLS connection) requires the Ruby ``openssl`` extension
28+
to be present and working. The :ref:`TLS compatibility <tls-compatibility>`
29+
section provides further details on usage of newer TLS protocols like TLS 1.1.
30+
31+
32+
.. _installation:
33+
34+
Install the Gem
35+
===============
36+
37+
Add ``mongo`` to your ``Gemfile``:
38+
39+
.. code-block:: ruby
40+
41+
gem "mongo", "~> 2"
42+
43+
To install the driver manually:
44+
45+
.. code-block:: sh
46+
47+
gem install mongo -v '~> 2'
48+
49+
50+
What's New
51+
==========
52+
53+
Please see the :ref:`release notes <release-notes>` for the major changes
54+
in each driver release and the `releases page on GitHub
55+
<https://github.com/mongodb/mongo-ruby-driver/releases>`_ for the complete
56+
list of changes for each release of the driver.

source/meta/404.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:orphan:
2+
3+
**************
4+
File not found
5+
**************
6+
7+
The URL you requested does not exist or has been removed.

source/nesting-levels.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
This file is not part of Ruby driver documentation proper, it is an internal
2+
reference for the nesting levels that other files should be using.
3+
4+
Ruby driver documentation nesting levels:
5+
6+
**********
7+
Page Title
8+
**********
9+
10+
First Level Heading
11+
===================
12+
13+
Second Level Heading
14+
--------------------
15+
16+
Third Level Heading
17+
```````````````````

0 commit comments

Comments
 (0)