Skip to content
Browse files

Added SSL connection support

  • Loading branch information...
1 parent 4d35c67 commit 243681ffe591721c5e024185de483cbb7948b631 @danielbecker committed Jun 20, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/mongo_mapper/connection.rb
View
8 lib/mongo_mapper/connection.rb
@@ -68,7 +68,13 @@ def connect(environment, options={})
if env['options'].is_a? Hash
options = env['options'].symbolize_keys.merge(options)
end
-
+
+ if env['ssl'].blank? || env['ssl'] == false
+ options[:ssl] = false
+ else
+ options[:ssl] = true
+ end
+
MongoMapper.connection = if env['hosts']
Mongo::ReplSetConnection.new( *env['hosts'].push(options) )
else

1 comment on commit 243681f

@jnunemaker

Any chance we could get a test for this? I'll happily pull after that.

Please sign in to comment.
Something went wrong with that request. Please try again.