No commit activity in last 3 years
No release in over 3 years
Mongo data store for Dragonfly
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

~> 1.0
~> 1.7
 Project Readme

Dragonfly::MongoDataStore

Mongo data store for use with the Dragonfly gem.

Gemfile

gem 'dragonfly-mongo_data_store'

Usage

Configuration, with default options (remember the require)

require 'dragonfly/mongo_data_store'

Dragonfly.app.configure do
  # ...

  datastore :mongo

  # ...
end

Or with options:

datastore :mongo, host: 'my.host', database: 'my_database'

Available options

:host              # e.g. 'my.domain'
:hosts             # for replica sets, e.g. ['n1.mydb.net:27017', 'n2.mydb.net:27017']
:connection_opts   # hash that passes through to Mongo::Connection or Mongo::ReplSetConnection
:port              # e.g. 27017
:database          # defaults to 'dragonfly'
:username
:password
:connection        # use this if you already have a Mongo::Connection object
:db                # use this if you already have a Mongo::DB object