Skip to content

Commit 8219730

Browse files
authored
Merge pull request #795 from kay-kim/docs-master
Add docs for ruby driver manual
2 parents 1499566 + 17df7d5 commit 8219730

24 files changed

+2826
-0
lines changed

docs/contribute.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
========================
2+
Contribute to the Driver
3+
========================
4+
5+
.. default-domain:: mongodb
6+
7+
For Bugs and Feature Requests
8+
-----------------------------
9+
10+
If you think you have found a bug or want to see a new feature in the
11+
Ruby driver, please open an issue in `JIRA
12+
<https://jira.mongodb.org/>`_:
13+
14+
#. `Create a Jira account and login <https://jira.mongodb.org>`_.
15+
16+
#. Navigate to the `Ruby project
17+
<https://jira.mongodb.org/browse/RUBY>`_.
18+
19+
#. Click :guilabel:`Create Issue`. Provide as much information as
20+
possible about the issue, including:
21+
22+
- Steps to reproduce it.
23+
24+
- Version information for the driver and MongoDB.
25+
26+
- Any applicable code snippets, stack traces and log data. Do not
27+
include any sensitive data or server logs.
28+
29+
.. note::
30+
31+
Bug reports in JIRA for the driver and the Core Server (i.e. **SERVER**)
32+
projects are public.
33+
34+
If you identify a security vulnerability in a driver or any other
35+
MongoDB project, please report it according to the instructions found
36+
in the :manual:`Create a Vulnerability Report
37+
</tutorial/create-a-vulnerability-report>`.
38+
39+
Contribute to the MongoDB Ruby Driver
40+
-------------------------------------
41+
42+
The MongoDB Ruby driver source is located at
43+
`<https://github.com/mongodb/mongo-ruby-driver>`_.
44+
45+
For instructions in contributing to the driver, see
46+
`<https://github.com/mongodb/mongo-ruby-driver/blob/master/CONTRIBUTING.md>`_.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The driver does not support older versions of MongoDB.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
For additional driver versions, see :ref:`Ruby Driver Language Compatibility Reference <reference-compatibility-language-ruby>`.
2+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
For additional driver versions, see :ref:`Ruby Driver MongoDB Compatibility Reference <reference-compatibility-mongodb-ruby>`.
2+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The following compatibility table specifies the recommended
2+
version(s) of the MongoDB Ruby driver for use with a specific version of
3+
Ruby.
4+
5+
The first column lists the driver version(s).
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The following compatibility table specifies the recommended
2+
version(s) of the MongoDB Ruby driver for use with a specific version of
3+
MongoDB.
4+
5+
The first column lists the driver version(s).
6+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. |checkmark| unicode:: U+2713

docs/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+
The MongoDB Ruby driver is the officially supported Ruby driver for
12+
MongoDB. It is written in pure Ruby and is optimized for simplicity. It
13+
can be used on its own, but it also serves as the basis of several
14+
object mapping libraries.
15+
16+
Get Started
17+
-----------
18+
19+
To get started with the Ruby driver, see :doc:`/installation` and
20+
:doc:`/quick-start`.
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 enviroment.
27+
28+
For reference on the Ruby BSON gem, see :doc:`/bson-tutorials`.
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 may be needed.
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 :doc:`/mongoid-tutorials`.
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+
installation
60+
quick-start
61+
ruby-driver-tutorials
62+
bson-tutorials
63+
mongoid-tutorials
64+
API <http://api.mongodb.com/ruby/current/>
65+
/reference/driver-compatibility
66+
/reference/additional-resources
67+
/contribute

docs/installation.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
============
2+
Installation
3+
============
4+
5+
.. default-domain:: mongodb
6+
7+
The Ruby driver is bundled as a gem and is hosted on `Rubygems
8+
<https://rubygems.org/gems/mongo>`_.
9+
10+
.. _ruby-driver-install:
11+
12+
Install the gem
13+
---------------
14+
15+
The driver can be installed manually or with bundler.
16+
17+
To install the gem manually:
18+
19+
.. code-block:: sh
20+
21+
gem install mongo
22+
23+
To install the gem with bundler, include the following in your Gemfile:
24+
25+
.. code-block:: ruby
26+
27+
gem 'mongo', '~> 2.2'
28+
29+
Note the following compatibility matrix to determine if the driver is
30+
supported on your Ruby version and MongoDB server version.
31+
32+
.. list-table::
33+
:header-rows: 1
34+
:widths: 28 30 30 30
35+
36+
* - Ruby Version
37+
- MongoDB Server 2.4.x
38+
- MongoDB Server 2.6.x
39+
- MongoDB Server 3.0.x
40+
41+
* - 1.8.x
42+
- No
43+
- No
44+
- No
45+
46+
* - 1.9.x
47+
- Yes
48+
- Yes
49+
- Yes
50+
51+
* - 2.0.x
52+
- Yes
53+
- Yes
54+
- Yes
55+
56+
* - 2.1.x
57+
- Yes
58+
- Yes
59+
- Yes
60+
61+
* - 2.2.x
62+
- Yes
63+
- Yes
64+
- Yes
65+
66+
* - JRuby 1.7.x
67+
- Yes
68+
- Yes
69+
- Yes

0 commit comments

Comments
 (0)