Class: DbVcs::Adapters::Mongo::Config
- Inherits:
-
Object
- Object
- DbVcs::Adapters::Mongo::Config
- Includes:
- ConfigAttributes
- Defined in:
- lib/db_vcs/adapters/mongo.rb
Instance Attribute Summary collapse
-
#mongo_uri ⇒ Object
Mongodb connection uri.
-
#mongodump_path ⇒ Object
Path to mongodump util.
-
#mongorestore_path ⇒ Object
Path to mongorestore util.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Methods included from ConfigAttributes
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
17 18 19 20 21 |
# File 'lib/db_vcs/adapters/mongo.rb', line 17 def initialize @mongodump_path = Utils.resolve_exec_path("mongodump") @mongorestore_path = Utils.resolve_exec_path("mongorestore") @mongo_uri = "mongodb://localhost:27017" end |
Instance Attribute Details
#mongo_uri ⇒ Object
Mongodb connection uri. Defaults to “mongodb://localhost:27017”. See docs.mongodb.com/manual/reference/connection-string/ for more info.
15 16 17 |
# File 'lib/db_vcs/adapters/mongo.rb', line 15 def mongo_uri @mongo_uri end |
#mongodump_path ⇒ Object
Path to mongodump util. It is resolved automatically.
10 11 12 |
# File 'lib/db_vcs/adapters/mongo.rb', line 10 def mongodump_path @mongodump_path end |
#mongorestore_path ⇒ Object
Path to mongorestore util. It is resolved automatically.
12 13 14 |
# File 'lib/db_vcs/adapters/mongo.rb', line 12 def mongorestore_path @mongorestore_path end |