Class: DbVcs::Adapters::Mongo::Config

Inherits:
Object
  • Object
show all
Includes:
ConfigAttributes
Defined in:
lib/db_vcs/adapters/mongo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConfigAttributes

#assign_attributes

Constructor Details

#initializeConfig

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_uriObject

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_pathObject

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_pathObject

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