mongo_test_server 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -9,10 +9,12 @@ module MongoTestServer
|
|
9
9
|
config_file = File.expand_path(File.join(Rails.root, 'config', 'mongoid.yml'))
|
10
10
|
mongoid_options = YAML.load(ERB.new(File.read(config_file)).result)[ENV['RAILS_ENV']]
|
11
11
|
port = mongoid_options['sessions']['default']['hosts'].first.split(':').last.to_i
|
12
|
+
use_ram_disk = !!mongoid_options['use_ram_disk']
|
12
13
|
MongoTestServer::Mongod.configure do |server|
|
13
14
|
server.name = app_name
|
14
15
|
server.port = port
|
15
16
|
server.path = `which mongod`.chomp
|
17
|
+
server.use_ram_disk = use_ram_disk
|
16
18
|
end
|
17
19
|
MongoTestServer::Mongod.server.start
|
18
20
|
end
|