Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge archSeer's mongo 1.8 changes, bump dependencies.
- Loading branch information
Showing
4 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -10,7 +10,7 @@ module Connection | ||
|
|
||
# @api public | # @api public | ||
def connection | def connection | ||
@@connection ||= Mongo::MongoClient.new | @@connection ||= Mongo::Connection.new | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jnunemaker
Contributor
|
|||
end | end | ||
|
|
||
# @api public | # @api public | ||
|
@@ -75,12 +75,12 @@ def connect(environment, options={}) | ||
|
|
||
MongoMapper.connection = if env['hosts'] | MongoMapper.connection = if env['hosts'] | ||
if env['hosts'].first.is_a?(String) | if env['hosts'].first.is_a?(String) | ||
Mongo::MongoReplicaSetClient.new( env['hosts'], options ) | Mongo::ReplSetConnection.new( env['hosts'], options ) | ||
else | else | ||
Mongo::MongoReplicaSetClient.new( *env['hosts'].push(options) ) | Mongo::ReplSetConnection.new( *env['hosts'].push(options) ) | ||
end | end | ||
else | else | ||
Mongo::MongoClient.new(env['host'], env['port'], options) | Mongo::Connection.new(env['host'], env['port'], options) | ||
end | end | ||
|
|
||
MongoMapper.database = env['database'] | MongoMapper.database = env['database'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm confused - 8d1f3fd replaced Mongo::Connection with Mongo::MongoClient, and this commit swaps them back ?